Connecting HubSpot to any API from inside a workflow

Most integrations fail for mundane reasons: broken JSON, missing authentication, or a response nobody captured. Here is how to call an external system from a workflow and bring the answer back.

22 October 2026 · 7 min read

The moment a deal closes, at least one system outside HubSpot needs to know. Finance needs the order, provisioning needs to start, the data warehouse needs the record. The usual answers are a nightly export, a middleware subscription, or someone retyping the details.

Calling the API directly from the workflow removes all three. The interesting part is not the request itself, it is everything around it: authenticating, encoding the payload properly, and doing something useful with the response.

Authentication without hand-written headers

Most APIs want a bearer token, an API key in a named header, or basic credentials. Writing that as raw header JSON is easy to get wrong and easy to leak into a screenshot. Selecting the scheme and supplying the value keeps the credential in one field and builds the header correctly.

For internal services that expect a signed token rather than a static key, the signature can be generated in the same workflow from a secret, so no middleware exists purely to sign requests.

Stop breaking your own JSON

The most common integration failure is not an outage. It is a company name containing an apostrophe, or a notes field containing a line break, pasted into a hand-written JSON body through a personalization token. The payload becomes invalid and the request fails.

Selecting the properties to include avoids the problem entirely: the values are encoded by code rather than by string substitution, so content cannot break structure.

Capture the response

An integration that only pushes data is half an integration. When the receiving system returns an identifier, that identifier belongs on the HubSpot record, so both systems share a reference and anyone can follow the trail.

Listing the paths you care about pulls those values out of the response and into workflow outputs you can write back onto the record.

Build it

Each of these is a working pattern with the exact steps, using the actions this article describes.

Run Custom Code
Call an internal API with a signed JWT
Internal services usually expect a signed token rather than a static key, which HubSpot's native actions cannot produce. The usual workaround is a middleware service that exists only to sign requests.
Read the walkthrough
Send Webhook
Sync a closed deal into your ERP
The CRM and the finance system disagree the moment a deal closes. Teams bridge the gap with a nightly export or by retyping the order, and both introduce delay and error.
Read the walkthrough
Send Webhook
Enrich a contact from a data provider
Enrichment usually means exporting a list, running it through a provider, and importing the result, by which point the data is already stale and the new contact has been routed badly.
Read the walkthrough
Send Webhook
Trigger a provisioning pipeline
Handing off to provisioning by email or ticket adds hours to onboarding, and a failed call is discovered only when a customer complains.
Read the walkthrough

Retries matter more than they look. Endpoints time out, deploys happen mid-request, and a failed handoff discovered a day later is a support ticket. Automatic retry on timeouts and server errors turns most of those into a non-event.

Put this to work in your workflows

Install AuPerate once and every action appears in your HubSpot workflow editor.

Get Started