Webhook
Call external APIs with contact data. Perfect for creating tickets, updating CRM records, or triggering workflows.
Custom Actions allow you to create action buttons that appear in the chat header when viewing a conversation. These buttons enable quick integrations with external systems like CRMs, help desks, or custom workflows.
Webhook
Call external APIs with contact data. Perfect for creating tickets, updating CRM records, or triggering workflows.
URL
Open external URLs in a new tab with contact data embedded in the URL parameters.
JavaScript
Run custom JavaScript code server-side in a sandboxed VM to compute clipboard values, toast notifications, or a redirect URL from contact data.
Navigate to Settings > Custom Actions to manage your action buttons.
Webhook actions call external APIs when triggered. Configure:
https://api.helpdesk.com/tickets)Example webhook body:
{ "subject": "WhatsApp: {{contact.name}}", "phone": "{{contact.phone_number}}", "description": "Support request from WhatsApp", "assignee": "{{user.email}}"}URL actions open a web page with contact data in the URL:
https://crm.example.com/contact?phone={{contact.phone_number}}&name={{contact.name}}Options:
JavaScript actions run custom code server-side in a sandboxed goja VM — the code has no access to the filesystem, network, or any host globals. The VM is seeded with the contact, user, and organization data objects, and your code returns a structured result (clipboard, toast, and/or url). Only that returned result is sent back to the browser, which applies it (copies to clipboard, shows the toast, or opens the redirect).
Example - Copy phone to clipboard:
return { clipboard: contact.phone_number }Example - Show toast notification:
return { toast: { message: 'Contact: ' + contact.name, type: 'success' }}Example - Open URL:
return { url: 'https://crm.example.com?phone=' + contact.phone_number}Use these variables in webhook URLs, bodies, and JavaScript code:
| Variable | Description |
|---|---|
{{contact.id}} | Contact's unique ID |
{{contact.phone_number}} | Contact's phone number |
{{contact.name}} | Contact's display name |
{{contact.profile_name}} | Contact's WhatsApp profile name |
{{contact.tags}} | Contact's tags |
{{contact.metadata}} | Contact's custom metadata object |
| Variable | Description |
|---|---|
{{user.id}} | Current user's ID |
{{user.name}} | Current user's full name |
{{user.email}} | Current user's email |
{{user.role}} | Current user's role |
| Variable | Description |
|---|---|
{{organization.id}} | Organization's ID |
{{organization.name}} | Organization's name |
Configure a webhook action to create tickets in your help desk:
https://api.zendesk.com/v2/tickets.jsonAuthorization: Bearer YOUR_TOKEN{ "ticket": { "subject": "WhatsApp: {{contact.name}}", "comment": { "body": "Contact from WhatsApp" }, "requester": { "name": "{{contact.name}}" } }}Configure a URL action to open the contact in your CRM:
https://crm.example.com/contacts?phone={{contact.phone_number}}Configure a JavaScript action for quick clipboard access:
return { clipboard: contact.phone_number, toast: { message: 'Phone copied!', type: 'success' } }