Build and Earn! Check out the bounties!

📊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

Setup

  1. Clone the Repository

    git clone https://github.com/mavericb/HubSpot-LinkedIn-AgentSync.git
    cd HubSpot-LinkedIn-AgentSync
  2. Install Dependencies

    pip install -r requirements.txt

    Note: If requirements.txt is missing, install:

    pip install python-dotenv hubspot-api-client requests schedule phi
  3. Configure Environment Variables

    • Create a .env file:

      touch .env
    • Add your keys:

      HUBSPOT_ACCESS_TOKEN=your-private-app-token
      RAPIDAPI_KEY=your-default-app-token
      API_KEY=your-openai-compatible-key
      BASE_URL=https://anura-testnet.lilypad.tech/api/v1  # Adjust for your provider
      AGENT_MODEL=qwen2.5:7b  # Adjust for your provider

Usage

  1. Start the Daemon

    python main.py
    • 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).

  2. 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?