Skip to content
Workflows

Use webhooks with HubSpot workflows

Last updated: February 28, 2022

Applies to:

Operations Hub Professional, Enterprise

Use webhooks in workflows to send POST or GET requests from your workflows.  There are a variety of uses for webhooks, examples of popular use cases for webhooks include:

  • Posting HubSpot contacts data to another system, such as a CRM, when that contact fills out a particular form on your site.

  • Sending deal data to an external shipment-handling system to create a purchase order.

  • Sending chat alerts from your external system to your company's chat stream to notify employees that something important has occurred.

  • Retrieving data from another system to update your HubSpot records. 

HubSpot regulates webhook traffic separately from other workflow processes. This is done to streamline workflow and webhook performance. When a webhook is slow or times out, the workflow action may take longer than expected to execute.

Please note: HubSpot will retry failed webhooks for up to three days, starting one minute after failure. Subsequent failures will be retried at increasing intervals, with a maximum gap of eight hours between tries. Learn about specific error code exceptions in HubSpot's developer documentation.

Learn more about webhooks in the developers webhooks documentation. If you have questions about your specific implementation of webhooks with HubSpot, reach out on the HubSpot Developers Forums.

 Set up a webhook in your workflow

  • In your HubSpot account, navigate to Automation > Workflows.
  • Click the name of the workflow.
  • Click the + icon to add an action.
  • In the right panel, select Send a webhook.
  • Click the Method dropdown menu, then select POST or GET
  • Enter the webhook URL. Webhook URLs are restricted to a secure protocol and must begin with HTTPS. To request specific information,  add query parameters to the Webhook URL. If no query parameters have been added, a generic POST or GET request will be sent.  
  • To authenticate any requests to your webhook:
    • Click the Authentication type dropdown menu, then select Include request signature in header.
    • Enter your HubSpot App ID. Learn how to verify request signatures.
  • Click Save


Test your webhook within HubSpot

When setting up your POST or GET webhook, you can execute a test to view the webhook response. During the test, while data is sent to and retrieved from a third party, existing records in HubSpot will not be affected. 

After testing your webhook, you can select which fields to output for use as inputs later in your workflow. Select only outputs available in every response. If the output is used in a later action but is not available in the response, the action will fail.   

  • In the side panel, click Test action to expand the section. 
  • Click the Object dropdown menu, then select a Record to test with.
  • Click Test
  • To check the webhook details, select the Response or Request tab. On each tab, you can click Open all to expand all sections, or Collapse all to collapse all sections. 
    • In the Response tab, click headers: or body: to expand each section. 
    • In the Request tab, click httpHeaders: to expand the section.

Test your webhook externally

After you create your workflow with a webhook action, you can run a quick test with a dummy webhook URL:

  • In your browser, navigate to https://webhook.site and copy the unique URL.
  • In the Webhook URL field in your webhook action, paste the URL.

If a webhook action with a POST request is triggered, a JSON response body will be sent to the webhook containing all information about the contact, including form submissions, list memberships, and all contact property values. The receiving system can then parse the JSON data, and use it for its own application.

If a webhook action with a GET request is triggered, a generic GET request will be sent, unless additional query parameters have been applied.   

Please note: historical property values will only be returned in contact-based workflows. Webhooks used in all other workflow types will only return the most recent value.

Verify request signatures in workflow webhooks

Where you've selected Request signature in the Authentication section for your Trigger a webhook action, HubSpot will populate the webhook with a X-HubSpot-Signature header with a SHA-256 hash of the concatenation of the app-secret for your application, the HTTP method, the URI, and the unparsed body. Learn more about this in the developers documentation.

To verify that the requests received at your URL are from HubSpot:

Was this article helpful?
This form is used for documentation feedback only. Learn how to get help with HubSpot.