Using Webhooks to Trigger SMS Nurturing from External Forms

Using Webhooks to Trigger SMS Nurturing from External Forms

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.

What is a Webhook?

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.

When to Use Form Webhooks:

Use this feature when you want to capture leads from forms that are not built inside TalkWiz.ai, such as:

  • Contact forms on your website (WordPress, Squarespace, Webflow, custom HTML, etc.)
  • Lead generation forms from landing page builders (Leadpages, Unbounce)
  • Forms within other software or CRMs

How to Set Up Form Webhooks

Follow these steps to get your unique webhook URL and configure your external form.

Step 1: Navigate to Form Webhooks in TalkWiz.ai

  1. Log into your TalkWiz.ai account.
  2. Click on "Integrations" in the left-hand navigation menu.
  3. Select the "Form Webhooks" tab.

Step 2: Get Your Webhook URL and Token

On the Form Webhooks page, you will find two key pieces of information:

  • Your Webhook URL: This is the unique endpoint where your form needs to send its data. Copy this URL.
  • Your Webhook Token: This is a secret key that authenticates your requests. Copy this token.

Warning: Regenerating your token will invalidate any existing webhook integrations. Only do this if your token has been compromised.

Step 3: Configure Your External Form to Send Data

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:

  1. A Custom Header: You must include your Webhook Token in the request header like this:

    X-Webhook-Token: [Your Webhook Token]

  2. 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
// 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
    })
});

Step 4: Connect the Webhook to an Event-Based Nurturing Step

Finally, create the step in your SMS Nurturing Campaign that will be triggered by this webhook.

  1. Navigate to Leads > Nurturing Campaigns and select the campaign you want to use.
  2. Click "Add New Step".
  3. For the trigger type, select Event-based.
  4. In the "Event Type" dropdown, choose form_submission.
  5. In the configuration field that appears, enter the exact form_name you are sending in your webhook payload (e.g., "contact_form").
  6. Configure your SMS message and save the step.

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.


    • Related Articles

    • SMS Lead Nurturing User Guide

      Welcome to SMS Lead Nurturing! Hello and welcome! This guide will walk you through the first steps of using TalkWiz's SMS Lead Nurturing feature. We're excited to help you boost engagement and conversions with the power of SMS. Let's dive in. What is ...
    • SMS Marketing Opt-Out Requirements

      SMS Marketing Compliance Guidelines Introduction SMS marketing is a powerful tool for businesses aiming to reach customers directly. Due to regulations in the United States, primarily under the Telephone Consumer Protection Act (TCPA) and Cellular ...
    • SMS Marketing Compliance Guide - US

      Introduction In today's dynamic business environment, direct and immediate communication with customers is paramount. SMS marketing offers instant consumer engagement, delivering timely information, promotions, and updates. Compliance with ...
    • Welcome to TalkWiz.ai: Your Guide to Automated Business Growth

      Hello and welcome to the TalkWiz.ai family! We're thrilled to have you on board. This guide is designed to introduce you to the core concepts of our platform and show you how TalkWiz.ai can become your most valuable employee—one that works 24/7 to ...
    • Mastering A2P 10DLC: A Guide to Successful Registration

      Introduction: What is A2P 10DLC and Why is it Essential? A2P 10DLC is a system in the United States that allows businesses to send Application-to-Person (A2P) messages over standard 10-digit long code (10DLC) phone numbers. As a customer of ...