Skip to Content

Webhook automations

For call and WhatsApp tasks, open Advanced settings → Country for numbers without a country code to choose how local lead numbers are interpreted. Webhooks need a manual country choice; international numbers keep their existing prefix.

Webhook automations turn leads from your website, forms or application into follow-up work in Versafy. For example, a quotation request can start a WhatsApp message with an email on failure and create a CRM opportunity. You do not need a Meta Ads connection.

To schedule a call, email, or message for a local clock time, select Fixed time in the task’s Delay card. Choose the next day or a cutoff based on the previous task, then select the timezone and time. Keep inside working hours can shift the scheduled task into the next allowed organization working window.

Marketing navigation

Open Marketing → Campaigns for phone and WhatsApp campaigns. Open Marketing → Lead Automation → Overview to check Instant Form and Webhook results and configure CRM. Use Automation Editor to edit automation. Connections remain in General → Integrations → Ads Platforms. Connect Meta Ads takes you there and opens connection setup. Manage templates in Marketing → WhatsApp Templates, then select a WhatsApp channel. Unsaved edits require confirmation before leaving.

Review lead applications

The chart groups applications into daily intervals, or hourly intervals when viewing one day. Hover over a line point or focus it with the keyboard to reveal its marker, then select it to see the group’s applications. Each application keeps its exact received time.

Use Marketing → Lead Automation → Overview → Lead applications over time to compare which forms and webhooks bring in leads. Each line shows the running total received during the selected period; choose the last 1, 7, 30 or 90 days. Select a trigger below the chart to hide or show its line.

Select a dot to see the applicant’s name and received date/time in your timezone. Names require access to Contacts and may be unavailable for leads without a name. Overlapping dots show all applications received at that instant. Test leads are included, and receipt of a lead does not mean its follow-up task succeeded. The received time may differ from the time a form was submitted.

The chart refreshes automatically; use Refresh applications for an immediate update. If the period contains more than 5,000 applications, only the earliest 5,000 are shown and lines stop at the last included application. Choose a shorter period to inspect later activity.

Before you begin

You need access to Integrations and an API key you can select for the webhook. Open the API Keys page  to manage your keys, or create one when configuring the webhook. To run follow-up tasks, prepare the relevant agent and its sending channel: a connected WhatsApp channel, email mailbox or outbound phone number. Connect your CRM if you want to create opportunities.

Add a webhook and its automation

  1. Open Marketing → Lead Automation → Automation Editor.
  2. Under Add a node, select Webhook or drag it onto the canvas.
  3. Enter a name and select an API key. Create new API Key… creates and selects a key in the popup. You can also manage keys on the API Keys page .
  4. Edit Test lead data to include the contact fields and custom values your application will send, such as your_field_1. This makes those fields available in task and CRM mappings.
  5. If needed, select Configure CRM and choose where to create opportunities. Webhook CRM settings are separate from shared Instant Form defaults.
  6. Select Apply. Connect the webhook to Send WhatsApp message, Send email or Schedule call, and configure the task. Use On success or On failure on any task to continue the path. A webhook can start multiple independent paths.
  7. Select Save in the editor before sending any requests.

You can connect a webhook to an existing Instant Form task to share its settings and outcome paths. Changes to a shared task affect both triggers; field mappings remain specific to each trigger. Without tasks or CRM actions, the webhook saves the contact only.

Keep both Ad account and Page filters set to All to see webhook nodes.

Email and WhatsApp tasks in a webhook automation can follow up with leads who do not reply, the same way as for Instant Forms. See Choose follow-ups for a task.

Call the webhook

You can map task or CRM fields to full_name even when sending only first_name and last_name: Versafy combines them automatically. If you supply a nonblank full_name, that value is used instead.

Opportunity names can include lead field values as well as the standard contact and campaign variables. Select a variable below Opportunity name to insert it at the cursor. Instant Forms offer their answer fields; webhooks offer fields from Test lead data. Missing values become empty text, and multiple answers are separated by commas. Existing opportunities keep their names.

New contacts captured from webhook submissions appear in Contacts with source Webhook. Existing matched contacts keep their original source. WhatsApp automation captures the contact before sending; later CRM synchronization reuses the linked contact.

Also update latest matching opportunity if it already exists (email or phone contact match) uses the same matching and update rules as Instant Forms, including contacts not yet synchronized to Versafy. Apply these CRM settings to other webhooks copies the CRM settings to the other webhooks you select. All selected webhooks must support the mappings and name variables; an incompatible selection saves nothing.

Expand Apply these CRM settings to other webhooks to search other webhooks and tick the ones you want. The section starts collapsed; closing it keeps your selections for saving.

Saving remembers the selected group. Reopening any webhook in the group automatically checks the others. Uncheck a webhook before saving to separate it from the group. For settings copied before this behavior was introduced, save once with the intended webhooks checked.

To find your webhook’s URL and trigger ID, open Marketing → Lead Automation → Automation Editor, then open the settings on your saved Webhook node. Copy Endpoint URL; Sample request includes your trigger_id. If the settings are already open, you can copy the complete sample request directly. Manage the selected key on the API Keys page .

Send the request from your application’s backend. Keep the API key out of public website code. Use the key selected for this webhook in the Authorization: Bearer header.

Replace the placeholders below with the URL, key and trigger ID from your settings:

curl -X POST 'YOUR_WEBHOOK_URL' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ --data '{ "trigger_id": "YOUR_TRIGGER_ID", "event_id": "quote-request-123", "first_name": "Alex", "last_name": "Smith", "company_name": "Example Company", "email": "alex@example.com", "phone_number": "+351916000000", "your_field_1": "Example value 1", "your_field_2": "Example value 2" }'

trigger_id, event_id, first_name, and at least one of email or phone_number are required. Last name and company name are optional. Custom fields go alongside the standard fields in the same flat JSON object, without nested objects. See the webhook API reference  for the full request limits and responses. The API docs link in the webhook settings opens the same reference.

Use a unique event_id for each new submission. When retrying the same submission, keep both its event ID and payload unchanged. An identical retry returns the original receipt; changed data with the same event ID returns 409 Conflict.

Test and observe results

Test leads require valid email addresses and phone numbers, including any custom recipient fields used by primary or fallback tasks. Correct the highlighted fields before sending; placeholder text is rejected. Phone numbers without a country code use the task’s configured country. Validation checks the format, not whether an address or number can receive messages.

To try an email without running the webhook automation, open its Send email task, select a connected sender, enter a subject and instructions, and select Send test email. Edit the JSON under Sample payload. It starts with your current test lead data and your signed-in email address prefilled. The test uses the unsaved task and style settings and sends only to your signed-in email address; it does not save the task, create a contact, or trigger other automation actions.

To review conversations from a webhook, open Marketing → Lead Automation → Overview and select a nonzero WhatsApp, email or call task total. Chats opens filtered by that webhook and task type. Remove its filter chip or use Clear all to widen the list. This filter is available through these links, not the Chats filter picker. Pending tasks or failures before contact may have no conversation; several tasks can share one conversation.

On a webhook’s statistics card, select Set up CRM or Configure CRM to edit opportunity creation directly. Select Save to apply the CRM settings without opening the automation editor.

Under Marketing → Lead Automation → Overview, each saved webhook shows its lead count and the WhatsApp, email and call tasks created. Test submissions are included. Created tasks may still be pending or fail later; these totals do not confirm delivery. A new webhook shows zero counts until it receives leads.

Tests run real automations and can send messages, place calls and create CRM records. Use contact details you control.

After saving, reopen the editor and choose Test lead on the webhook node. Edit the prefilled payload and select Send test lead. Keep the popup open to see its receipt and processing state.

After a successful send, the popup prepares a fresh event ID. Keep or edit the contact data and select Send another test lead to run another test. Last submission identifies the previous receipt. If a connection error interrupts the request, retry the unchanged payload to avoid creating a duplicate.

  • HTTP response: 202 Accepted means the request was accepted for background processing. Keep the returned receipt_id for troubleshooting; acceptance does not confirm delivery.
  • General → Contacts: search by the submitted email or phone to find the captured contact. An existing matching contact may be updated instead of creating a second one.
  • General → Agent Tasks: find the lead’s tasks and open them to inspect status and results. Webhook tasks show API as their source. A scheduled task may still be waiting for its delay or working hours.
  • Your CRM: if you configured CRM creation, check the selected pipeline and stage for the opportunity and its lead details and follow-up notes.

A task without a usable contact channel can take its On failure connection. A WhatsApp task with a next step waits for confirmed delivery, read status or a definite failure before continuing. No task or CRM action runs unless you configured it.

Troubleshooting

If the Email Agent is in Dry Run or draft-review mode, the automation skips sending email and continues through its On failure connection when one is configured. Switch the agent to Send mode to allow automated emails.

  • Request rejected: check that the editor is saved, the URL and trigger ID were copied correctly, and the API key matches the one selected on the webhook. Check required fields and the response error.
  • Accepted but no message: inspect Agent Tasks for delays, failures or unavailable sending channels. Check that the webhook is connected to a task and the editor changes were saved.
  • Receipt shows suppressed: follow-up was skipped by duplicate-contact protection. Check existing tasks before retrying.
  • No CRM opportunity: confirm that CRM is configured for this webhook and inspect the selected CRM stage. Instant Form defaults do not configure webhook CRM actions.
Last updated on