Skip to content

Webhook Action

Send HTTP requests to any API endpoint. Perfect for integrating with external services, triggering third-party automations, or enriching data from external sources.

The Webhook action allows you to make HTTP requests to any external API from within your HubSpot workflows. It supports all standard HTTP methods, custom headers, request bodies, and can extract up to 5 values from JSON responses to use in your workflow.

  • Supports GET, POST, PUT, PATCH, and DELETE methods
  • Custom headers for authentication and content type
  • JSON, Plain Text, Form Data, and XML request/response formats
  • Extract up to 5 values from JSON responses using dot notation
  • 30-second timeout with graceful error handling
  • Returns HTTP status code for conditional workflow branching

The complete URL of the API endpoint you want to call. Must include the protocol (https:// or http://).

https://api.example.com/v1/users
https://my-webhook.com/notify?key=abc123

The HTTP method to use for the request:

  • POST - Create new resources or send data
  • GET - Retrieve data from the API
  • PUT - Update existing resources completely
  • PATCH - Partially update existing resources
  • DELETE - Remove resources

The format of data you’re sending:

  • JSON - Most common for modern APIs
  • Plain Text - Simple text data
  • Form Data - URL-encoded form submissions
  • XML - XML documents

The format of data you expect to receive back. This determines how the response is parsed.

Add up to 3 custom headers in the format HeaderName=HeaderValue:

Authorization=Bearer your_api_token_here
X-API-Key=abc123def456
Content-Type=application/json

The data to send with POST, PUT, PATCH, or DELETE requests. Format depends on Request Content Type.

For JSON:

{
"name": "John Doe",
"email": "john@example.com",
"userId": 12345
}

For Form Data:

name=John+Doe&email=john@example.com&userId=12345

When Response Content Type is JSON, specify up to 5 dot-notation paths to extract values:

data.id
user.email
result.items[0].name
status.code
metadata.timestamp
  • success - “true” or “false” indicating if the request succeeded (2xx status)
  • statusCode - HTTP status code (200, 404, 500, etc.)
  • rawOutput - Complete response body as string
  • output1-5 - Extracted values from the paths you specified

Call an external API to get additional data about a contact:

Webhook URL: https://api.clearbit.com/v2/people/find?email=
HTTP Method: GET
Headers: Authorization=Bearer your_clearbit_api_key
Output Path 1: person.employment.name (company name)
Output Path 2: person.employment.title (job title)
Output Path 3: person.location.city (city)

Push HubSpot data to another platform:

Webhook URL: https://your-system.com/api/contacts
HTTP Method: POST
Request Content Type: JSON
Request Body:
{
"email": "contact.email",
"name": "contact.firstname contact.lastname",
"company": "company.name"
}

Send alerts to Slack when important events happen:

Webhook URL: https://hooks.slack.com/services/YOUR/WEBHOOK/URL
HTTP Method: POST
Request Content Type: JSON
Request Body:
{
"text": "New deal created: deal.dealname - $deal.amount"
}

4. Validate Phone Number with External Service

Section titled “4. Validate Phone Number with External Service”

Check if a phone number is valid using a validation API:

Webhook URL: https://phonevalidation.abstractapi.com/v1/
HTTP Method: GET
Headers: X-API-Key=your_api_key
Output Path 1: valid (true/false)
Output Path 2: format.international (formatted number)
Output Path 3: country.code (country code)
  • Test with GET first - Start with read-only requests to verify connectivity
  • Use authentication - Always use API keys or tokens in headers
  • Handle errors - Branch on the success field to handle failed requests
  • Validate responses - Check statusCode before using extracted values
  • Mind timeouts - Requests timeout after 30 seconds
  • Use HTTPS - Always use secure HTTPS endpoints

The action will return success: "false" if the request fails. Common reasons for failure:

  • Invalid URL or unreachable endpoint
  • Authentication failure (401 or 403 status)
  • Timeout (request took longer than 30 seconds)
  • Invalid JSON in request body
  • Server error (5xx status codes)

Use an if/then branch on the success field to handle errors gracefully in your workflow.

  • 30-second timeout per request
  • Maximum 5 output values can be extracted
  • Request body limited to HubSpot’s workflow action size limits
  • Only JSON responses support value extraction
  • Parse JSON - For more complex JSON parsing
  • Add Note - To log webhook responses in timeline