> For the complete documentation index, see [llms.txt](https://docs.cymbal.co/help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cymbal.co/help/email/email-automations/webhook-automations.md).

# Webhook automations

Send an email or text to one person whenever another app or system calls your automation's webhook URL.

A webhook automation sends an email or a text to one person each time another app or system you use calls the automation's unique webhook URL. That system sends the person's email address or phone number, and Cymbal sends them the automation. You can create one from the Emails tab or the Texts tab.

{% hint style="info" %}
**Plan:** Webhook automations are available on both **Starter** and **Premium**. On Starter, each webhook automation that's turned on counts toward your limit of **4** live automations. See [Starter & Premium pricing](https://docs.cymbal.co/help/pricing/starter-and-premium-pricing).
{% endhint %}

## How to create a webhook automation

{% stepper %}
{% step %}
Go to the [Emails](https://manager.cymbal.co/email) tab to send an email, or the [Texts](https://manager.cymbal.co/text) tab to send a text.
{% endstep %}

{% step %}
In **Automations**, select **Create new**.
{% endstep %}

{% step %}
In the **New email automation** or **New text message automation** dialog, choose **Webhook is fired**.
{% endstep %}

{% step %}
Open the **Webhook fires** trigger card. Copy the **Webhook endpoint** with the copy button, and check the **Webhook example payload** for the format to send.
{% endstep %}

{% step %}
Under **When the webhook fires**, choose whether to send right away or after a delay.
{% endstep %}

{% step %}
Write your email or text. For emails, you can start from a template or design your own.
{% endstep %}

{% step %}
Select **Turn on** in the top right. The automation only sends while it's on.
{% endstep %}
{% endstepper %}

## How to call the webhook

{% stepper %}
{% step %}
In the other app or system, set up a **POST** request to the webhook endpoint you copied.
{% endstep %}

{% step %}
Send a JSON body with the person to send to. For an email automation, send an email address:

```json
{"email": "fan@example.com", "opted_in": true}
```

For a text automation, send a phone number:

```json
{"phone": "+15555550123", "opted_in": true}
```

{% endstep %}

{% step %}
Each call sends the automation to the one person in that call. If they aren't in your contacts yet, Cymbal adds them, with **Other** as the source.
{% endstep %}
{% endstepper %}

{% hint style="info" %}

* `opted_in` is optional. When it's `true`, Cymbal subscribes the same channel the automation sends on: the email address for an email automation, or the phone number for a text automation. People who already unsubscribed stay unsubscribed.
* A call gets an error if the URL is wrong, or if the email address (for email) or phone number (for text) is missing or not valid.
* While the automation is turned off, calls still go through without an error, but nothing is sent. Make sure the automation is on before you rely on it.
* Webhook automations send emails or texts. They can't send Instagram DMs.
* Text webhook automations need an active Cymbal phone number for your organization. See [Phone Number Registration](https://docs.cymbal.co/help/setting-up-cymbal/sms-setup/phone-number-registration).
* If your [text balance](https://docs.cymbal.co/help/text/text-settings/text-balance) can't cover a text, Cymbal skips that send. To avoid skipped sends, keep your balance topped up or turn on auto recharge.
  {% endhint %}

{% hint style="warning" %}
The webhook endpoint doesn't need a separate key or sign-in. Anyone who has the URL can trigger sends, so keep it private and share it only with the system that needs it.
{% endhint %}

## Related

* [Email Automations](https://docs.cymbal.co/help/email/email-automations)
* [Text Automations](https://docs.cymbal.co/help/text/text-automations)
* [Cancel an Automation Send](https://docs.cymbal.co/help/email/troubleshooting/cancel-an-automation-send)
