This guide explains how to connect external forms on your website or other platforms to TalkWiz.ai using Form Webhooks. This allows you to automatically enroll a lead into an SMS Nurturing campaign the moment they submit a form.
This method is the technical implementation behind the form_submission
event type trigger in your nurturing campaigns.
A webhook is a way for an external application (like your website's contact form) to send real-time data to another application (TalkWiz.ai). When a user fills out your form, the webhook sends their information to TalkWiz, which can then trigger a specific nurturing campaign step.
Use this feature when you want to capture leads from forms that are not built inside TalkWiz.ai, such as:
Follow these steps to get your unique webhook URL and configure your external form.
On the Form Webhooks page, you will find two key pieces of information:
Warning: Regenerating your token will invalidate any existing webhook integrations. Only do this if your token has been compromised.
This step requires technical setup within the system that handles your form submissions. You need to configure it to send an HTTP POST
request to the Webhook URL you copied.
The request must include:
A Custom Header: You must include your Webhook Token in the request header like this:
X-Webhook-Token: [Your Webhook Token]
A JSON Payload: The body of the request must be in JSON format and contain the following required parameters:
form_name
: The name of the form being submitted. This name must exactly match the form name you specify in your Nurturing Campaign step.lead_email
: The email address of the person who submitted the form.campaign_id
: The ID of the nurturing campaign you want the lead to be added to.Example Code (JavaScript fetch
):
The example below shows how to structure the POST
request. You can find more examples in PHP and Ruby directly on the Form Webhooks page in your account.
// JavaScript example
fetch('https://app.talkwiz.ai/form_webhooks/5/form_submitted', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Webhook-Token': '897d238a3d62156259151bfb4c2eb6e64c8df29d6cadf7a3' // <-- Paste Your Token Here
},
body: JSON.stringify({
form_name: "contact_form", // <-- Must match the form name in your nurturing step
lead_email: "lead@example.com", // <-- The lead's email from the form
campaign_id: 123 // <-- The ID of the campaign to trigger
})
});
Finally, create the step in your SMS Nurturing Campaign that will be triggered by this webhook.
form_submission
.form_name
you are sending in your webhook payload (e.g., "contact_form").Now, when someone submits your external form, the webhook will send their data to TalkWiz.ai, and the system will automatically trigger this specific SMS nurturing step for that lead.