API / Webhook Actions
API webhook actions let your chatbot send data to external systems when triggered. This connects your chatbot to your existing tools — like CRMs, helpdesks, email marketing platforms, or custom applications.When to Use Webhooks
Webhook actions are ideal for:- CRM integration — Send lead information directly to your CRM when visitors fill out forms
- Ticket creation — Automatically create support tickets in your helpdesk system
- Email alerts — Trigger email notifications when specific events happen
- Custom workflows — Connect to automation platforms like N8N or Zapier
- Data sync — Push conversation data to your analytics or data warehouse
Creating a Webhook Action
Configure the webhook
Enter the details for your webhook:
- Webhook URL — The endpoint that will receive the data
- Headers — Any custom headers required by your endpoint (like API keys)
- Retry settings — How many times to retry if the webhook fails
How Webhooks Work
When a webhook action is triggered during a conversation:- Chatref collects the relevant data (form fields, conversation context, etc.)
- The data is sent as a request to your specified webhook URL
- Your external system receives the data and processes it
- If the request fails, Chatref retries according to your retry settings
Setting Up Your Endpoint
Your webhook endpoint should be a URL that can receive incoming data. Most platforms provide webhook URLs you can use:- Zapier — Create a Zap with a “Webhooks” trigger to get a URL
- N8N — Use a Webhook node to receive data
- Custom server — Set up an endpoint on your own server
Custom Headers
If your endpoint requires authentication or special headers, you can add them in the webhook configuration. Common examples:Authorization: Bearer your-api-keyContent-Type: application/json- Custom API keys or tokens
Retry Settings
Configure how many times Chatref should retry sending data if the webhook fails. This helps ensure data delivery even if your endpoint has temporary issues.Viewing Webhook Activity
Track all webhook triggers from the Custom Actions tab. You can see:- When each webhook was triggered
- The data that was sent
- Whether the request succeeded or failed