Connect HubSpot's native workflow automation with Cotonity agents using webhooks, enabling powerful hybrid human-AI automation pipelines.
Two-way trigger architecture
Cotonity and HubSpot workflows can trigger each other in both directions. HubSpot can call Cotonity via a webhook action in a HubSpot workflow, passing contact or deal data as the payload. Cotonity can trigger HubSpot workflows indirectly by updating a contact property that serves as a HubSpot workflow enrollment trigger. Understanding this two-way pattern lets you design hybrid automations where each platform handles what it does best: HubSpot manages CRM state and email sequencing, while Cotonity handles conversational interactions, complex logic, and multi-system integrations.
Calling Cotonity from a HubSpot workflow
In HubSpot, add a Webhook action to your workflow and paste the Cotonity inbound webhook URL from Settings → Triggers → Inbound Webhook. Set the method to POST and include relevant contact or deal properties as JSON in the request body. HubSpot does not natively sign webhook payloads, so Cotonity validates the source using a shared secret you configure in both HubSpot and Cotonity. When HubSpot fires the webhook, Cotonity receives the payload and starts the linked workflow, making all payload fields available as trigger variables.
Triggering HubSpot workflows from Cotonity
The simplest way to trigger a HubSpot workflow from Cotonity is to update a contact property — a dedicated boolean or date stamp field — whose change serves as the enrollment trigger in HubSpot. For example, create a custom property called cotonity_event_registered (boolean). When Cotonity's registration workflow completes, it sets this property to true. A HubSpot workflow enrolled on this property fires and handles downstream CRM actions like assigning an owner, creating a deal, or starting a sequence.
Avoiding feedback loops
Connecting two automation platforms bidirectionally introduces the risk of infinite loops: Cotonity updates a property, HubSpot fires a workflow, the HubSpot workflow calls Cotonity again, and so on. Prevent this by using dedicated trigger properties that are only set by one system and cleared (or never re-evaluated) by the other. Cotonity also has a built-in loop detection mechanism that identifies if the same workflow run chain has been invoked more than five times in 60 seconds and halts with an error, providing a safety net for configuration mistakes.