> ## 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.

# Outbound Actions

> Outbound Actions sends data from ChatSyncs to another application whenever a specific action happens — a subscriber submits a WhatsApp Flow, completes an Input Flow, clicks a Postback button, or shares their location. Instead of that data living only inside ChatSyncs, it's automatically forwarded to Google Sheets, a CRM, your own server, Zapier, Make.com, Airtable, or any other endpoint that can receive an HTTP request.

<Frame caption="Chatbot Manager → Automation → Outbound Actions, with the Create button highlighted on an empty list.">
  <img src="https://mintcdn.com/chatsyncs/KBWIuAfBOnKg9V2U/images/learn/whatsapp-outbound-actions/step-01-open-outbound-actions.png?fit=max&auto=format&n=KBWIuAfBOnKg9V2U&q=85&s=f4bceb8c1a64a7a854fa88f51ef0eb1e" alt="ChatSyncs left navigation with Chatbot Manager selected, the Automation tab highlighted, and the Outbound Actions sub-tab highlighted, showing an empty Out-bound Webhook list with a Create button" width="1260" height="528" data-path="images/learn/whatsapp-outbound-actions/step-01-open-outbound-actions.png" />
</Frame>

## Example: send Input Flow submissions to Google Sheets

Say you built a **Customer Registration Form** using an [Input Flow](/learn/whatsapp-input-flow)
or [WhatsApp Flow](/learn/whatsapp-flows) with fields for Full Name, Phone Number, Business
Type, Service Interested, and Demo Date. When a subscriber submits it, an Outbound Action can
push that submission straight into a Google Sheet — no manual copying, no server of your own
required. The rest of this page walks through that exact setup, since it's the most common use
case.

```
User submits WhatsApp Flow or Input Flow
            ↓
ChatSyncs Triggered
            ↓
Outbound Action
            ↓
Google Apps Script
            ↓
Google Sheet
            ↓
Columns Created Automatically
            ↓
Data Stored Automatically
```

## Set up Google Sheets as the destination

<Steps>
  <Step title="Create a Google Sheet">
    Create a new, empty Google Sheet. You don't need to add any columns — they're created
    automatically later.
  </Step>

  <Step title="Open Apps Script">
    <Frame caption="Opening the Apps Script editor from a Google Sheet's Extensions menu.">
      <img src="https://mintcdn.com/chatsyncs/ouLOR-saCHwHFKKf/images/learn/whatsapp-outbound-actions/step-02-open-apps-script.png?fit=max&auto=format&n=ouLOR-saCHwHFKKf&q=85&s=c787f496b220f5b3cf31b14055359141" alt="Google Sheets Extensions menu with Apps Script highlighted" width="1270" height="584" data-path="images/learn/whatsapp-outbound-actions/step-02-open-apps-script.png" />
    </Frame>

    Inside the sheet, go to **Extensions → Apps Script**.
  </Step>

  <Step title="Paste the script">
    <Frame caption="The Apps Script editor with the webhook-receiving script pasted in, ready to deploy.">
      <img src="https://mintcdn.com/chatsyncs/ouLOR-saCHwHFKKf/images/learn/whatsapp-outbound-actions/step-03-paste-script.png?fit=max&auto=format&n=ouLOR-saCHwHFKKf&q=85&s=3ced2aaefe953f5838f76d87539efa46" alt="Apps Script Code.gs editor with a doPost script and the Deploy button highlighted" width="1270" height="567" data-path="images/learn/whatsapp-outbound-actions/step-03-paste-script.png" />
    </Frame>

    Delete any existing code and paste a `doPost(e)` function that reads the incoming webhook
    payload and appends it as a row — creating header columns automatically the first time
    each field name is seen:

    ```javascript theme={null}
    function doPost(e) {
      var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();
      var data = JSON.parse(e.postData.contents);
      var headers = Object.keys(data);

      if (sheet.getLastRow() == 0) {
        sheet.appendRow(headers);
      }

      var values = headers.map(function(key) {
        return data[key];
      });
      sheet.appendRow(values);

      return ContentService
        .createTextOutput("Success")
        .setMimeType(ContentService.MimeType.TEXT);
    }
    ```
  </Step>

  <Step title="Deploy as a Web App">
    Click **Deploy → New deployment**, set **Select type** to **Web app**, **Execute as** to
    **Me (your Google account)**, and **Who has access** to **Anyone** (or **Anyone with the
    link**) — not **Only myself**, or ChatSyncs won't be able to reach it. Click **Deploy** and
    authorize the requested Google permissions.
  </Step>

  <Step title="Copy the Web App URL">
    <Frame caption="The deployment confirmation with the Web app URL and its Copy button.">
      <img src="https://mintcdn.com/chatsyncs/ouLOR-saCHwHFKKf/images/learn/whatsapp-outbound-actions/step-05-deployment-url.png?fit=max&auto=format&n=ouLOR-saCHwHFKKf&q=85&s=32ea494ad62559168aa8cd9b42ac059d" alt="Apps Script deployment success dialog showing the Web app URL and a Copy button" width="1277" height="581" data-path="images/learn/whatsapp-outbound-actions/step-05-deployment-url.png" />
    </Frame>

    Google gives you a URL like
    `https://script.google.com/macros/s/XXXXXXXXXXXX/exec`. Copy it — this is your webhook URL.
  </Step>
</Steps>

## Create the Outbound Action in ChatSyncs

Go to **Chatbot Manager → Automation → Outbound Actions → Create**, then fill in one form covering
the webhook, its triggers, and the data it sends:

<Frame caption="The Outbound Actions creation form — Webhook Name, Out-bound Webhook URL, all three trigger toggles (Postback, User Input Flow, Location), and the data fields to send.">
  <img src="https://mintcdn.com/chatsyncs/ouLOR-saCHwHFKKf/images/learn/whatsapp-outbound-actions/step-06-create-webhook-form.png?fit=max&auto=format&n=ouLOR-saCHwHFKKf&q=85&s=9d7717e9b677defd57e8f634ec775554" alt="Outbound Actions form with Webhook Name, Out-bound Webhook URL, Postback/User Input Flow/Location trigger toggles all enabled, Select Postbacks and Select Input Flows dropdowns, and data field toggles for Subscriber ID, Subscriber Name, Phone Number, Date of Birth, Location, Labels, Postback ID, and Input Flow Data" width="530" height="538" data-path="images/learn/whatsapp-outbound-actions/step-06-create-webhook-form.png" />
</Frame>

* **Webhook Name** — e.g. `Customer Registration Data`.
* **Out-bound Webhook URL** — paste the Web App URL you copied above.

### Select the trigger(s)

Unlike separate configurations per event, **Postback**, **User Input Flow**, and **Location**
are all toggles on this same form — turn on whichever one(s) should trigger this webhook.
Whenever an enabled action happens, ChatSyncs sends the data to that particular webhook URL:

* **Postback** — fires when a subscriber clicks a postback button. Pick which postback(s) in
  **Select Postbacks**.
* **User Input Flow** — fires when a subscriber submits an Input Flow. Pick which flow(s) in
  **Select Input Flows** (e.g. `Appointment Booking`, `Customer Registration Form`).
* **Location** — fires when a subscriber shares their live location.

You can enable more than one trigger on the same Outbound Action — each fires independently and
sends to the same configured webhook URL.

### Select fields to send

Enable whichever fields you need: **Subscriber ID, Subscriber Name, Phone Number, Date of
Birth, Location, Labels, Postback ID, Input Flow Data**.

<Warning>
  **Turn on Input Flow Data.** Without it, the subscriber's actual form answers won't be sent —
  only metadata like the subscriber ID or name.
</Warning>

Click **Save** — the webhook is now active.

## How automatic columns work

Whenever a webhook payload arrives, the Apps Script reads its JSON keys and adds any column
that doesn't already exist — you never edit the sheet by hand. For example, a payload from a
Postback trigger like:

```json theme={null}
{
  "first_name": "Rahul",
  "chat_id": "919959623255",
  "postbackid": "73vwwaEqCBJt...",
  "reply_message_id": "wamid.HBgMOTE5..."
}
```

<Frame caption="A Google Sheet automatically populated by the Outbound Action, with columns created from the payload's keys.">
  <img src="https://mintcdn.com/chatsyncs/ouLOR-saCHwHFKKf/images/learn/whatsapp-outbound-actions/step-10-google-sheet-auto-columns.png?fit=max&auto=format&n=ouLOR-saCHwHFKKf&q=85&s=7a13913a660a348adaf13cb6f53f32b7" alt="Google Sheet with columns first_name, chat_id, postbackid, reply_message_id, wa_message_id, and whatsapp_bot_username auto-populated from a webhook payload" width="1270" height="566" data-path="images/learn/whatsapp-outbound-actions/step-10-google-sheet-auto-columns.png" />
</Frame>

produces the sheet shown above, with `first_name`, `chat_id`, `postbackid`, and
`reply_message_id` as columns, populated automatically — no manual setup per field.

If you add a new field later (e.g. `budget`), the next submission that includes it
automatically gets its own column — no need to edit the sheet first.

## Real business examples

| Use case             | Fields collected                                | Destination   |
| -------------------- | ----------------------------------------------- | ------------- |
| Lead Collection      | Name, Phone, Business Type                      | Google Sheets |
| Appointment Booking  | Name, Date, Time                                | Google Sheets |
| Property Enquiry     | Name, Phone, Property Type, Budget, Location    | Google Sheets |
| AI Automation Agency | Name, Company, Service Required, Monthly Budget | Google Sheets |

This is the simplest and most common way to connect a ChatSyncs WhatsApp Flow or Input Flow
directly to Google Sheets without running your own server — the same approach works for any
endpoint that accepts an HTTP POST, including a CRM, Zapier, Make.com, or Airtable.

## Manage Outbound Actions

<Frame caption="The Outbound Actions list showing a saved webhook, its OUT-BOUND WEBHOOK URL column, and the View, Edit, and Delete action icons highlighted.">
  <img src="https://mintcdn.com/chatsyncs/KBWIuAfBOnKg9V2U/images/learn/whatsapp-outbound-actions/step-11-webhook-list-actions.png?fit=max&auto=format&n=KBWIuAfBOnKg9V2U&q=85&s=b4ff014703785c806d33a4738a03dc03" alt="Outbound Actions list with a saved Subscribe data webhook row, and its View, Edit, and Delete action icons highlighted" width="1274" height="553" data-path="images/learn/whatsapp-outbound-actions/step-11-webhook-list-actions.png" />
</Frame>

Saved webhooks appear in the **Outbound Actions** list with three actions:

* **View Report** — see webhook logs and activity, and check whether data was sent
  successfully.
* **Edit** — update the webhook URL, triggers, or selected data fields at any time.
* **Delete** — permanently remove the webhook; ChatSyncs stops sending it data immediately.

<Tip>
  Use **View Report** to confirm your Google Sheet, CRM, or server is actually receiving the
  data — don't assume it's working just because the webhook saved successfully.
</Tip>

## Frequently asked

<AccordionGroup>
  <Accordion title="How do I send WhatsApp form submissions to Google Sheets automatically?">
    Deploy a Google Apps Script `doPost` web app on the target sheet, copy its URL, then create
    an **Outbound Action** in Chatbot Manager → Automation with that URL, turn on **User Input
    Flow** (or **Postback** / **Location**), and make sure **Input Flow Data** is turned on.
  </Accordion>

  <Accordion title="Can I trigger the same webhook from more than one event?">
    Yes — **Postback**, **User Input Flow**, and **Location** are all toggles on the same
    Outbound Action form, not separate configurations. Enable as many as you need; each fires
    independently and sends to the same webhook URL.
  </Accordion>

  <Accordion title="Why isn't my Google Sheet receiving any data?">
    Check three things: the Apps Script deployment's **Who has access** is set to **Anyone**
    (not "Only myself"), the **Out-bound Webhook URL** in ChatSyncs exactly matches the deployed
    Web App URL, and the right trigger/fields are enabled. Use **View Report** on the webhook to
    see whether ChatSyncs is sending anything at all.
  </Accordion>

  <Accordion title="Why are my form answers missing even though the webhook fires?">
    The **Input Flow Data** field toggle is probably off. Without it, the webhook still fires
    and sends subscriber metadata, but not the actual question answers.
  </Accordion>

  <Accordion title="Do I need to manually create columns in my Google Sheet?">
    No — the Apps Script reads the JSON keys in each payload and adds any missing column
    automatically, including for new fields you start sending later.
  </Accordion>

  <Accordion title="Can I send data to something other than Google Sheets?">
    Yes — an Outbound Action sends a plain HTTP request, so any endpoint that can receive one
    works: a CRM, your own server, Zapier, Make.com, or Airtable.
  </Accordion>
</AccordionGroup>

<Warning>
  * **"Only myself" access blocks ChatSyncs entirely** — the Apps Script deployment's **Who has
    access** must be **Anyone** or **Anyone with the link**.
  * **Input Flow Data must be explicitly enabled** — it's the one field that carries the actual
    form answers; everything else is just subscriber metadata.
  * **The webhook URL must match the live deployment** — redeploying a new version in Apps
    Script can change the URL, which then needs updating in ChatSyncs too.
</Warning>
