For the complete documentation index, see llms.txt. This page is also available as Markdown.

Calling real time workflows from HubSpot

Using HubSpot's Send a webhook workflow action, you can call Middle in real-time to execute a synchronous workflow and provide a response to HubSpot.

This allows you to integrate Middle's integrations and flexibility into your HubSpot workflows

Real-time Workflow API

How to call Middle from a HubSpot workflow

1

Create a HubSpot workflow that sends a webhook

Create a workflow in HubSpot and a Send a webhook step

2

Configure your webhook step

Configure your Send a webhook step as follows:

Method

Select POST. The endpoint to run a workflow in Middle is a POST endpoint.

Webhook URL

The Invoke URL from your real-time workflow API endpoint.

It will look something like this:

https://integrate.middle.app/api/workflow-invoke/239j4023r2323rimno32r/

Authentication type

Select API Key.

API key

Click to create a new HubSpot secret. Enter the API key for the relevant Middle account with "Bearer " prefixed to the key.

If your API key is 1234abcd56789efghij then you'd enter Bearer 239j4023r2323rimno32r.

API key location

Select Request header.

Request body

Build out the properties and static values for your request to match the input variables in the begin step of the workflow you want to call.

3

Test your webhook action

Use HubSpot's webhook testing to run a test call to your workflow. You can then review the workflow executions for the workflow in Middle.

Error troubleshooting

401

If you receive a 401 response from Middle, ensure that you correctly filled out the inputs in the previous step. Ensure that you prefixed your Middle API key with "Bearer " when creating your HubSpot secreat.

404

If Middle returns a 404, make sure the webhook URL matches the Invoke URL in the real-time trigger for your Middle workflow.

Last updated

Was this helpful?