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.
Overview
Section titled “Overview”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.
Key Features
Section titled “Key Features”- 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
Configuration
Section titled “Configuration”Input Fields
Section titled “Input Fields”Webhook URL (Required)
Section titled “Webhook URL (Required)”The complete URL of the API endpoint you want to call. Must include the protocol (https:// or http://).
https://api.example.com/v1/usershttps://my-webhook.com/notify?key=abc123HTTP Method (Required)
Section titled “HTTP Method (Required)”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
Request Content Type (Required)
Section titled “Request Content Type (Required)”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
Response Content Type (Required)
Section titled “Response Content Type (Required)”The format of data you expect to receive back. This determines how the response is parsed.
Headers (Optional)
Section titled “Headers (Optional)”Add up to 3 custom headers in the format HeaderName=HeaderValue:
Authorization=Bearer your_api_token_hereX-API-Key=abc123def456Content-Type=application/jsonRequest Body (Optional)
Section titled “Request Body (Optional)”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=12345Output Paths (Optional)
Section titled “Output Paths (Optional)”When Response Content Type is JSON, specify up to 5 dot-notation paths to extract values:
data.iduser.emailresult.items[0].namestatus.codemetadata.timestampOutput Fields
Section titled “Output Fields”- 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
Use Cases
Section titled “Use Cases”1. Enrich Contact Data from External API
Section titled “1. Enrich Contact Data from External API”Call an external API to get additional data about a contact:
Webhook URL: https://api.clearbit.com/v2/people/find?email=HTTP Method: GETHeaders: 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)2. Send Data to External System
Section titled “2. Send Data to External System”Push HubSpot data to another platform:
Webhook URL: https://your-system.com/api/contactsHTTP Method: POSTRequest Content Type: JSONRequest Body:{ "email": "contact.email", "name": "contact.firstname contact.lastname", "company": "company.name"}3. Trigger Slack Notification
Section titled “3. Trigger Slack Notification”Send alerts to Slack when important events happen:
Webhook URL: https://hooks.slack.com/services/YOUR/WEBHOOK/URLHTTP Method: POSTRequest Content Type: JSONRequest 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: GETHeaders: 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)Best Practices
Section titled “Best Practices”- 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
Error Handling
Section titled “Error Handling”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.
Limitations
Section titled “Limitations”- 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
Related Actions
Section titled “Related Actions”- Parse JSON - For more complex JSON parsing
- Add Note - To log webhook responses in timeline