📊HubSpot-LinkedIn Agent
An agent-based system that monitors HubSpot for recently modified contacts, fetches enriched data from LinkedIn, and updates HubSpot automatically.
Agent Details
Automate customer relationship management, internal company management, etc. with the HubSpot-LinkedIn agent! Scale inference using the Lilypad network deploying any of the models supported by the Lilypad Inference API.
This workflow serves as a proof of concept (PoC) illustrating the capabilities of agents to interface with platform APIs, specifically those of HubSpot and RapidAPI.
Github repo here.
Getting Started
A guide to launch the HubSpot-LinkedIn agent locally and run inference on the Lilypad Network with the Lilypad Inference API.
Prerequisites
Python 3.8+
A HubSpot account with a Private App token
Create a Private App Steps: Log in > Settings > Integrations > Private Apps > Create private app > Name it > Scopes:
crm.objects.contacts
(read/write contacts) > Create app > Click app name > Auth tab > View access token > Copy token
A RapidAPI account with a LinkedIn Data API key
Sign up for RapidAPI Steps: Create an account > Subscribe to LinkedIn Data API > Go to Developer Dashboard > Authorization > Select "default-application" > Copy "Application Key"
An OpenAI-compatible API
Lilypad Inference API (Sign up and generate an API key)'
Choose the model you would like to use
Setup
Clone the Repository
Install Dependencies
Note: If
requirements.txt
is missing, install:Configure Environment Variables
Create a
.env
file:Add your keys:
Usage
Start the Daemon
Checks HubSpot every minute for contacts modified in the last 7 days (or since
last_processed.json
).Fetches LinkedIn data and updates HubSpot.
Runs for 5 minutes (adjustable in
main.py
).
Monitor Logs
Look for "Found X contacts", "HubSpot update: ...", "Attempting to save last_processed timestamp".
If no contacts are found,
last_processed.json
won’t save—edit a HubSpot contact to test.
File Structure
main.py
: Entry point and daemon logic./tools/hubspot_tools.py
: HubSpot API utilities (fetch/update contacts)./tools/linkedin_tools.py
: LinkedIn API utility (fetch profile data)./agents/hubspot_agent.py
: Agent for updating HubSpot./agents/linkedin_agent.py
: Agent for fetching LinkedIn data.
Last updated
Was this helpful?