Workflows

Use webhooks with HubSpot workflows

Last updated: November 17, 2018

Applies to:

Marketing Hub
marketing-enterprise
Enterprise
Sales Hub
sales-enterprise
Enterprise
Service Hub
service-enterprise
Enterprise

Use webhooks in workflows to pass information from HubSpot to another web application.

Please note: users who purchased Marketing Hub Professional or Sales Hub Professional before November 1, 2018 will also have access to the Trigger a webhook workflow action. Users after November 1, 2018 will need to purchase Marketing Hub Enterprise or Sales Hub Enterprise to gain access to the Trigger a webhook workflow action.

What are webhooks?

Webhooks are used to send data from one web application to another after an action is completed in the source application. You can use webhooks to send data, notifications, alerts, or any other real-time updates.

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 contact data into an external system that creates a trial of the software for the contact.

  • Chat alerts sent from your external system to your company's chat stream that lets employees know something important has happened.

Set up a webhook in a contact-based workflow

These steps apply to contact-based workflows only.

  • In your HubSpot account, navigate to Automation > Workflows.
  • Click the name of the contact-based workflow to edit.
  • Click the + icon to add an action.
  • In the right pane, click Trigger a webhook.
  • Click the Method dropdown menu and select GET or POST.
    • GET - sends a GET request to the specified URL.
    • POST - sends a POST request (submits data) to the specified URL.
  • Enter the webhook URL.

Please note: webhook URLs are restricted to a secure protocol and must begin with HTTPS.

  • If the request to your system requires authentication, select the Use authentication? checkbox and add a username and password.
  • Click Save.

Set up a webhook in other types of workflows

These steps apply to company-based, deal-based, ticket-based and quote-based workflows.

  • In your HubSpot account, navigate to Automation > Workflows.
  • Click the name of the company-based, deal-based, ticket-based or quote-based workflow to edit.
  • Click the + icon to add an action and in the right pane, click Trigger a webhook.
  • Enter the webhook URL.

Please note: webhook URLs are restricted to a secure protocol and must begin with HTTPS.

  • Click Save.

Please note: the Trigger a webhook action in company-based, deal-based, ticket-based and quote-based workflows only supports the POST method.

Test your webhook

After you create your workflow with a webhook action, you can run a quick test with a dummy webhook URL. In your browser, go to https://webhook.site and copy the unique URL that is automatically created. In the Webhook URL field in your webhook action, paste the URL.

The example below shows the Request Body of the webhook above, which reveals meta information about the specific contact, including contact information, form submissions, list memberships, etc. When the workflow action was triggered, HubSpot sent the contact's entire record formatted in JSON to the specified URL.

User-added image
User-added image

The receiving system can then parse the JSON data, and use it for its own application.

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.

Was this article helpful?

If you still need help you can get answers from the , or to contact support.