Skip to content

feat: add HubSpot action #41

Description

@nicosammito

Summary

Add a HubSpot action so Hercules flows can react to and drive HubSpot CRM. HubSpot is one of the most-integrated CRMs on both n8n and Zapier and unlocks the classic "lead in → enrich → route → notify" automations that pair naturally with the e-commerce and comms actions already in centaurus (e.g. a Shopify order or GLS shipment updating a HubSpot deal/contact).

n8n/Zapier validation: HubSpot has first-party nodes on n8n and is one of the top CRM apps on Zapier, consistently used for contact/deal sync and marketing automation.

Suggested directory

actions/hubspot-action

Triggers

HubSpot pushes changes through webhook subscriptions (app-level) — this maps onto the existing Rest-based event pattern used by the Shopify action (event classes extend Rest, payload registered as a data type).

  • HubSpotContactCreated — new contact created
  • HubSpotContactPropertyChanged — a watched contact property changed (setting: propertyName)
  • HubSpotDealCreated — new deal created
  • HubSpotDealStageChanged — deal moved pipeline stage
  • HubSpotCompanyCreated — new company created
  • HubSpotFormSubmitted — form submission (lead capture)

Functions

  • hubspotCreateContact(email, properties?): HUBSPOT_CONTACT
  • hubspotUpdateContact(contactId, properties): HUBSPOT_CONTACT
  • hubspotGetContactByEmail(email): HUBSPOT_CONTACT
  • hubspotCreateDeal(name, pipeline, stage, amount?, properties?): HUBSPOT_DEAL
  • hubspotUpdateDeal(dealId, properties): HUBSPOT_DEAL
  • hubspotCreateCompany(name, properties?): HUBSPOT_COMPANY
  • hubspotAssociate(fromObjectType, fromId, toObjectType, toId, associationType): BOOLEAN — link contact↔deal↔company
  • hubspotAddNote(objectType, objectId, body): HUBSPOT_NOTE
  • hubspotSearchObjects(objectType, filters): HUBSPOT_SEARCH_RESULT — CRM search API

Utils (data-type builders, mirroring GLS create* utils): hubspotCreatePropertyMap(...).

Data types

One class per file in src/data_types/ (zod schema + @Identifier/@Name/@Schema), plus webhook payload schemas per trigger:

  • HubSpotContact, HubSpotDeal, HubSpotCompany, HubSpotNote, HubSpotSearchResult, HubSpotAssociation
  • Webhook payloads: HubSpotContactCreatedWebhookPayload, HubSpotDealStageChangedWebhookPayload, etc.

Auth / config via ConfigurationDefinition on the Action (like GLS client_id/client_secret):

Identifier Type Description
access_token TEXT Private-app access token (Bearer) for the CRM v3 API
app_id TEXT (optional) App ID for webhook subscription management
client_secret TEXT (optional) Used to validate the X-HubSpot-Signature on inbound webhooks

Beyond the shared Hercules vars (HERCULES_AUTH_TOKEN, HERCULES_AQUILA_URL, HERCULES_ACTION_ID, HERCULES_SDK_VERSION) an action-specific HUBSPOT_ACCESS_TOKEN may back the config default.

Rationale

HubSpot is a CRM — a domain not covered by any implemented action (gls, shopify, shopware, twilio, woocommerce), any in-development branch (stripe, github, twilio), or any open issue/PR (S3, SFTP, MCP, Stripe, Discord, GitHub, SMTP, Cron, Rest, AI, WebSocket, MQTT). It complements the existing e-commerce actions by giving flows a place to sync customer/deal records.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions