How to Use OpenClaw with HubSpot — CRM Automation Guide
Automate HubSpot CRM tasks with OpenClaw. Create contacts, log deals, pull pipeline data, and trigger workflows — hands-free from your AI agent.
OpenClaw + HubSpot: Why It Works
HubSpot is where your sales and marketing data lives. OpenClaw is the agent that can act on it. Together, they mean your AI can log a new lead, update a deal stage, send a sequence, or pull a pipeline report — all from a message in Slack.
Get Your HubSpot API Key
HubSpot uses private app tokens (OAuth-style). Go to Settings → Integrations → Private Apps → Create a private app. Scope it to:
- crm.objects.contacts.read/write
- crm.objects.deals.read/write
- crm.objects.companies.read/write
Store the token:
HUBSPOT_TOKEN=pat-na1-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxxConfigure TOOLS.md
### HubSpot CRM
- Base URL: https://api.hubapi.com
- Auth: Bearer $HUBSPOT_TOKEN
- Key endpoints:
- POST /crm/v3/objects/contacts (create contact)
- GET /crm/v3/objects/deals (list deals)
- PATCH /crm/v3/objects/deals/{id} (update deal stage)
- POST /crm/v3/objects/contacts/search (search contacts)Create a HubSpot Skill
In ~/.openclaw/workspace/skills/hubspot/SKILL.md:
# HubSpot Skill
## Create Contact
curl -X POST https://api.hubapi.com/crm/v3/objects/contacts \
-H "Authorization: Bearer $HUBSPOT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"properties": {"email": "$EMAIL", "firstname": "$FIRST", "lastname": "$LAST"}}'
## Update Deal Stage
curl -X PATCH https://api.hubapi.com/crm/v3/objects/deals/$DEAL_ID \
-H "Authorization: Bearer $HUBSPOT_TOKEN" \
-d '{"properties": {"dealstage": "closedwon"}}'
## Search Contacts by Email
curl https://api.hubapi.com/crm/v3/objects/contacts/search \
-H "Authorization: Bearer $HUBSPOT_TOKEN" \
-d '{"filterGroups": [{"filters": [{"propertyName": "email", "operator": "EQ", "value": "$EMAIL"}]}]}'Practical Automations
Once the skill is live, you unlock real workflows:
- Lead capture: Form submission → agent creates HubSpot contact + assigns owner
- Deal updates: "Mark the Acme deal as closed won" → agent patches the deal via API
- Pipeline reports: Daily cron pulls open deals and posts summary to Slack
- Follow-up reminders: Agent checks deals with no activity in 7 days and pings the owner
Example AGENTS.md Rule
## HubSpot Workflow
When a new lead comes in via webhook: create HubSpot contact, assign to sales team, notify #sales channel.
When asked for pipeline status: query HubSpot for open deals grouped by stage, return summary.Handling Webhooks
HubSpot can push events to your OpenClaw gateway endpoint. Set a webhook subscription in HubSpot pointing to your gateway URL + hook token. Your agent receives deal stage changes, new contacts, and form submissions in real time.
openclaw config set gateway.publicUrl https://your-server.com
# Set in HubSpot: Webhook URL = https://your-server.com/hooks/agent?token=YOUR_TOKENReady to unlock this for your workflow? The OpenClaw Playbook walks you through setup, config, and advanced patterns — $9.99, one-time.
Frequently Asked Questions
Get The OpenClaw Playbook
The complete operator's guide to running OpenClaw. 40+ pages covering identity, memory, tools, safety, and daily ops. Written by an AI with a real job.