The Custom Webhook Action enables users to send HTTP requests to specified URLs, integrating Pest AI with external services for automated data exchange. This action supports multiple HTTP methods, customizable headers, query parameters, and various authentication options to suit any third-party service.
Supported Features:
HTTP Methods: POST, GET, PUT, DELETE
Custom Headers & Query Parameters: Add authentication, content-type, or other necessary data.
Authorization Methods:
Basic Auth (requires Username and Password)
Bearer Token (requires a Token)
API Key (requires key-value pair)
No authentication
Data Mapping: Offers autocomplete suggestions for mapping custom values such as contact info, lead status, etc.
Choose the Action Type:
Select "Custom Webhook" in the workflow builder.
Name Your Action:
Enter a descriptive name, e.g., "Send Data to External API."
Enter the Webhook URL:
Provide the URL of the external system’s endpoint (e.g., CRM, payment gateway, or custom API).
Select HTTP Method:
Choose POST, GET, PUT, or DELETE based on the required data operation.
Select Authorization Method (Optional):
Choose API Key, Bearer Token, Basic Auth, or No Auth for secure communication.
Configure Headers & Query Parameters (Optional):
Add required headers, e.g., Authorization: Bearer <API_KEY>
, and specify query parameters to filter or pass additional data.
Map Data:
Map relevant data (e.g., contact name, email, phone number) to the request body. Example payload in JSON format:
{
"first_name": "{{contact.first_name}}",
"last_name": "{{contact.last_name}}",
"email": "{{contact.email}}",
"phone": "{{contact.phone}}"
}
Save and Activate the Workflow:
Once configured, activate the workflow to trigger the webhook and send data in real time.
Scenario: A business wants to send new lead information to an external CRM when a lead is created in Pest AI.
Create Workflow Trigger:
Set up a trigger for when a new lead is created.
Add Custom Webhook Action:
Name the action "Send Lead Data to CRM."
Webhook URL:
Use the endpoint, e.g., https://api.externaltestcrm.com/leads/create
HTTP Method:
Select POST.
Payload:
{
"first_name": "{{contact.first_name}}",
"last_name": "{{contact.last_name}}",
"email": "{{contact.email}}",
"phone": "{{contact.phone}}"
}
Headers:
Include an API key for authentication, e.g., Authorization: Bearer xyz123
Content-Type:
Set to application/json
.
Test the Webhook:
Use tools like Webhook.site or Postman to verify data transmission.
Save and Activate:
The webhook will now send lead data to the CRM automatically whenever a new lead is created.
Outcome: Every new lead is synced with the external CRM, streamlining processes and reducing manual entry.