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.
Real-time Workflow APIHow to call Middle from a HubSpot workflow
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 1234abcd56789efghij.
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.
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 secret.
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?

