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

# Automations

> When something happens, message customers, alert your team, or save the data

An automation is **when something happens, do one thing**. For example: *When a call is missed, text the customer.* Automations live under **Build → Automations**.

An automation is different from a workflow tool: the AI agent chooses a workflow tool during a conversation, while an automation runs because its trigger happened.

## Create an automation

**1. What starts it**

Select **Create automation**, then select the box for the event, such as **Conversation or call finished** or **Call missed**. Events are grouped under **Conversations and calls**, **Bookings**, **Shopify orders**, **Business alerts**, **AI agent**, and **Your system (webhook)**. A Shopify event also needs the store; a webhook needs an event name.

**2. What to do**

Select the box for what to do. Only the actions that event allows are shown. Then fill in the fields that appear below. See [Actions](#actions).

**3. Name and review**

The name fills in for you; change it if you like. Check the sentence, leave **On** switched on, and select **Create automation**.

To do two things when the same event happens, create two automations.

## Triggers

| Starts when | Can do |
| - | - |
| A conversation or call finishes, is handed to a human, goes quiet, or a call is answered or missed | Every action |
| A booking is made, rescheduled, or cancelled | Message the customer, alert the team |
| A Shopify order is placed, changes status, is cancelled, or ships | Message the customer, alert the team |
| Calls spike far above the usual for that hour | Alert the team |
| The AI agent asks for help (its **Escalate to on-call** action) | Alert the team |
| Your system sends an event (webhook) | Message the customer, alert the team |

**Call answered** and **Call missed** happen on outbound campaign calls only.

## Actions

| Action | Fields |
| - | - |
| Send a WhatsApp | Template and its variables, **Send** |
| Send an SMS | From number, message, **Send** |
| Send an email | From inbox, subject, message, **Send** |
| Call the customer | Campaign, **Send** |
| Post to Slack | Slack connection, channel or member, message |
| Alert the on-call team | Channel, people in order, message, **Try the next person after**, **Keep trying until someone replies** |
| Add a row to Google Sheets | Google account, sheet, and the columns to fill. For each column, pick what fills it: the contact's name, phone or email, a conversation detail such as the summary, **Transcript (full text)**, sentiment or score, a disposition such as Outcome, or **AI pulls it out of the conversation** for anything else. A column named like one of these starts filled with it. When the AI pulls out at least one column, you can add **Extraction instructions** for how it fills them. Optionally add **Push conditions** on those columns, such as only interested leads. |
| Update the CRM | CRM, record type (when there is more than one), and the fields to fill, each filled the same way as Sheets columns. The CRM finds the contact by phone and email, so those aren't offered. Extraction instructions and push conditions work as in Sheets. |
| Send to Zapier | [Zapier](https://docs.botcadence.com/docs/build/integrations/zapier.md) connection. It sends the conversation, every field captured for it so far, and the data this run has. Optionally add **Push conditions** on any field your automations capture. |
| Add fields to the conversation report | At least one extra field for the AI to pull out, such as budget, with optional extraction instructions. Every conversation is always in the report with the standard columns: Created, Customer Name, Phone, Email, Duration (calls only), Status, Direction, Sentiment, Resolution, Tags, Score, Topics and Summary. Fields your other automations capture show as columns too. The report has no push conditions. |

* **Send** is **Right away**, **After 15 minutes**, **After 1 hour**, or **After 1 day**. On conversation automations, a delayed message is not sent if the customer replies first.
* Columns and fields are filled from the conversation using their names, so pick names that say what you want, such as `budget` or `move_in_date`.
* Extraction instructions belong to one automation. When another automation gives the same field its own instructions, the editor says so under the box, for example *budget also has instructions in “CRM push”; the AI uses both.*
* Push conditions push only when every condition matches. A condition on a field the action no longer pulls out shows **(no longer pulled out)**; change its field or remove it.
* Messages can use variables, such as `{{ contact.name }}`. Select the variable button next to a message to see what the trigger offers.

### Alert the on-call team

Pick the **Channel** (SMS, WhatsApp, call, or email), then **People, in order** from the [Team list (Agents page)](https://docs.botcadence.com/docs/operate/handover.md#agents-and-the-team-list). The first person is alerted right away; each next person after the wait you pick, until someone replies. Select **+ Add a person** to add someone as **Alerts only** without leaving the page.

**Keep trying until someone replies** goes through everyone again, up to 3 rounds, 5 minutes apart. A reply to the text, email, WhatsApp, or call stops it. People outside their hours, or switched off in the Team list, are skipped.

## Where it runs

Conversation automations run on every campaign, inbound line, and channel, including ones you add later. To skip one place, open that campaign, inbound line, or channel, go to its **Debrief** tab, and switch the automation off under **Automations**. The automation's **Settings** tab says, for example, **Off on 2 places**.

## The automation page

Open an automation from the list to see three tabs:

* **Settings** — change its name, trigger details, and action, then select **Save**. While you have unsaved changes the tab reads **Settings (unsaved)**, and closing the tab, selecting **Cancel**, or loading the latest version asks first. If someone else saved first, select **Load the latest version** to replace your unsaved changes with theirs.
* **Runs** — every run with its status. Open a run to see the fields it captured and each step, **Retry this step**, or **Stop this run**.
* **Advanced** — the **Automation on** switch, and delete the automation.

To try an automation, make a test call or send a test message on a line it runs on, then open the run on **Runs**.

Use the **On** switch on the list or the **Automation on** switch on **Advanced** to pause it without deleting it.

> [!WARNING]
>
> An automation that is on runs for every matching event. Check the trigger, the people, and the message before turning it on.

Finished runs are kept for 90 days, skipped runs for 14 days.

## AI agent automations

Pick an **AI agent** automation in the agent's **Escalate to on-call** action. The agent decides when a person is needed; the automation decides who is alerted and how. With none yet, select **Create one** in the action's settings, create it in the new tab, then come back and pick it.

## Webhook automations

Send the event with a project API key that has the `automations:create` scope. The page shows the URL and a request you can copy.

```bash theme={null}
curl -X POST "YOUR_TRIGGER_URL" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"event":"cart_abandoned","idempotency_key":"unique-id-123","contact":{"phone_number":"+15551234567"},"variables":{"cart_total":"49.00"}}'
```

`event` must equal the automation's event name. Send `contact.phone_number`, `contact.email`, or both. Everything under `variables` can be used in messages, for example `{{ variables.cart_total }}`.

## Business alerts

The project checks every 15 minutes. A spike is when inbound calls in the last hour reach at least **3×** the usual for that hour of the week, and at least **6** calls. Each spike alerts once.

## Troubleshooting

> **The automation is on but has no runs**
>
> Check that the event happened and that the automation is not switched off on that campaign, inbound line, or channel. For webhooks, check that the event name matches exactly.

> **A step is skipped or fails**
>
> Open the run and read the step's detail. Check the connection, template, inbox, number, or campaign. For on-call alerts, check that each person has a phone number or email, is switched on, and is within their hours.

> **An automation was turned off when it moved to the new automations**
>
> The list and the automation page say why. Fix it on **Settings** and save; saving turns it back on. Automations that could not move at all are listed above the list; create them again. Report conditions no longer hide rows: every conversation is in the report.

## Related pages

* [Integrations](https://docs.botcadence.com/docs/build/integrations.md) — connect the accounts actions use.
* [Zapier](https://docs.botcadence.com/docs/build/integrations/zapier.md) — send conversations to a Catch Hook.
* [Workflow Tools](https://docs.botcadence.com/docs/build/workflows/tools.md) — actions the AI agent can choose during a conversation.
* [API keys](https://docs.botcadence.com/docs/admin/settings.md) — create a key for webhook triggers.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.