> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chatsyncs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Webhook Workflow in ChatSyncs

> Step-by-step: create a Webhook Workflow in ChatSyncs, get its callback URL, capture a test response, and map the JSON data to your template's variables.

Setting up a [Webhook Workflow](/learn/chatsyncs-webhook-workflow/introduction) has four parts: create the
workflow, get its callback URL, capture a real test payload, then map that payload's fields to
your template's variables.

<Tip>
  Before you start, have an **approved Message Template** with variables ready — see [Creating a
  WhatsApp Message Template](/learn/chatsyncs-message-templates/creating-a-whatsapp-message-template-in-chatsyncs). The webhook data fills those variables;
  you can't map anything without them.
</Tip>

<Steps>
  <Step title="Create a new workflow">
    Go to **Chatbot Manager → Automation → Webhook Workflows** and click **Create**. Fill in the
    workflow details:

    * **Workflow Name** — a recognizable name, e.g. `Cal.com Booking Confirmation`.
    * **Select Number** — the WhatsApp number to send messages from.
    * **Select Template** — the approved message template to use.

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/SZDz719X3xT3_1vE/images/learn/whatsapp-webhook-workflow/step-05d-create-workflow-button.png?fit=max&auto=format&n=SZDz719X3xT3_1vE&q=85&s=315b3ab5d3a7fc290473cc7ed00a5d76" alt="Workflow Details form with Workflow Name set to Abandoned Cart Recovery, Message Template set to orderdetails, and a Create Workflow button, alongside the AI Workflow Assistant panel" width="786" height="518" data-path="images/learn/whatsapp-webhook-workflow/step-05d-create-workflow-button.png" />
    </Frame>

    <Tip>
      The **AI Workflow Assistant** panel next to the form can do most of this for you — tell it
      the provider or workflow name, or paste a sample JSON payload, and it offers shortcuts like
      **Set name & template**, **Map webhook data**, and **Paste JSON sample**.
    </Tip>
  </Step>

  <Step title="Get the callback URL">
    After saving, ChatSyncs generates a unique **Webhook Callback URL**, e.g.
    `https://platform.chatsyncs.com/webhook/whatsapp-workflow/xxxxxxx`. Copy it and paste it into
    your third-party app's webhook or notification settings — for example, in Cal.com that's
    **Settings → Webhooks → Event Triggers**.

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/SZDz719X3xT3_1vE/images/learn/whatsapp-webhook-workflow/step-06b-configure-webhook-data.png?fit=max&auto=format&n=SZDz719X3xT3_1vE&q=85&s=1fead3eaf93fdb18deb889ca4547eef3" alt="Configure Webhook Data panel with the Webhook Callback URL, Google Sheet Instruction link, Real-time Response and Custom JSON Body tabs, and a Capture Webhook Response button" width="450" height="310" data-path="images/learn/whatsapp-webhook-workflow/step-06b-configure-webhook-data.png" />
    </Frame>

    Each workflow has its own URL, so a test call to it only ever affects this one workflow. No
    live form yet? Use the **Custom JSON Body** tab to paste a sample payload instead of
    capturing a real one.
  </Step>

  <Step title="Capture a test response">
    Click **Capture Webhook Response** — this tells ChatSyncs to start listening for the next
    call to this workflow's URL.

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/SZDz719X3xT3_1vE/images/learn/whatsapp-webhook-workflow/step-12c-capturing-response.png?fit=max&auto=format&n=SZDz719X3xT3_1vE&q=85&s=c56af62eca37e34683911512515186d8" alt="Configure Webhook Data panel with the Capture Webhook Response button showing a Capturing Response... state" width="454" height="307" data-path="images/learn/whatsapp-webhook-workflow/step-12c-capturing-response.png" />
    </Frame>

    With ChatSyncs still capturing, trigger a real event in your third-party app (e.g. make a
    test booking), or send a POST request straight to the callback URL from a tool like Postman:

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/SZDz719X3xT3_1vE/images/learn/whatsapp-webhook-workflow/step-12b-postman-test-request.png?fit=max&auto=format&n=SZDz719X3xT3_1vE&q=85&s=c6ed7fc3af5a6e08181dce83fc95ea84" alt="Postman POST request to a ChatSyncs webhook workflow URL with a JSON body containing phone, customer_name, order_id, product_list, total_price, delivery_date, tracking_url, and status fields" width="716" height="321" data-path="images/learn/whatsapp-webhook-workflow/step-12b-postman-test-request.png" />
    </Frame>

    <Warning>
      **Capture before you send, not after.** Clicking Capture *after* the test event fires can
      leave the field list empty or show data from an older, unrelated capture.
    </Warning>
  </Step>

  <Step title="Map the data to template variables">
    Once ChatSyncs receives the test payload, the **Webhook Response Mapping** section lists
    every field it found:

    <Frame>
      <img src="https://mintcdn.com/chatsyncs/SZDz719X3xT3_1vE/images/learn/whatsapp-webhook-workflow/step-12d-webhook-response-mapping.png?fit=max&auto=format&n=SZDz719X3xT3_1vE&q=85&s=93322ae741f6dde655fd38bfd46cee1d" alt="Webhook Response Mapping screen with Phone Number, Variable: PRODUCTLIST, Variable: TOTALPRICE, and Variable: DELIVERYDATE, each mapped to a detected field with a Select Formatter option" width="525" height="333" data-path="images/learn/whatsapp-webhook-workflow/step-12d-webhook-response-mapping.png" />
    </Frame>

    * **Phone Number** — select the JSON path that holds the recipient's phone number. This is
      required — without it ChatSyncs has no destination for the message.
    * **Variables** — for each template variable (e.g. `USERNAME`, `BOOKINGDATE`,
      `MEETINGLINK`), select the matching JSON path from the webhook response, e.g.
      `payload > attendees > 0 > name` → the customer's name.
    * **Data Formatters** — optionally transform a field before sending (e.g. reformat a date).

    Click **Save** once every variable is mapped.

    <Note>
      **ChatSyncs maps the field name, not the sample value.** A dropdown showing
      `customer_name : Rahul Reddy` means *"use whatever comes in under the `customer_name` key"*
      — not literally "Rahul Reddy" every time. A later submission with a different name fills the
      template automatically, as long as the field name stays the same.
    </Note>
  </Step>

  <Step title="Verify and activate">
    After saving, the workflow appears on the dashboard. Its **Verified** column shows whether a
    successful test webhook has been received. Once verified, the workflow is live and sends
    messages automatically every time the webhook fires.
  </Step>
</Steps>

<Tip>
  Want a worked example end to end? See
  [How to Send Automated WhatsApp Messages on WP Form Submission](/learn/chatsyncs-integrations/send-automated-whatsapp-messages-on-wp-form-submission-in-chatsyncs)
  for wiring a WordPress form plugin to a workflow like this one.
</Tip>

## Frequently asked

<AccordionGroup>
  <Accordion title="Why isn't my workflow detecting any fields?">
    Click **Capture Webhook Response** *before* triggering the test event, not after — ChatSyncs
    only reads fields from a call made while it's actively capturing.
  </Accordion>

  <Accordion title="Can I test a workflow without a live third-party app connected yet?">
    Yes — use the **Custom JSON Body** tab to paste a sample payload, or send a POST request to
    the callback URL yourself from Postman or curl.
  </Accordion>

  <Accordion title="Do I need to remap fields if future events send different values?">
    No — ChatSyncs maps by **field name** (the JSON key), not the sample value shown during
    setup. Only a renamed or removed field breaks the mapping.
  </Accordion>

  <Accordion title="What happens if the Phone Number field isn't mapped?">
    The workflow can't send anything — Phone Number tells ChatSyncs who to message, so it's
    required before the workflow can go live.
  </Accordion>
</AccordionGroup>

<Warning>
  * **The Phone Number mapping is mandatory** — without it, ChatSyncs has no recipient for the
    message.
  * **Only an approved template can be selected** — a workflow can't send a template that hasn't
    come back **Approved** from Sync Template.
  * **A renamed field breaks its mapping silently** — if a third-party app changes a field name
    later, re-capture a response and remap it.
</Warning>
