# Email and Webhook as Action Types

Sesami Flows supports two primary action types to automate your booking workflows: **Email** and **Webhook**.

## Email Actions

Email actions allow you to send custom-branded notifications based on booking events.

### When to use Email actions

* Send customized confirmation emails with specific branding
* Create service-specific or location-specific email templates
* Send different emails based on booking conditions (language, service type, etc.)
* Notify team members or customers with custom messaging

### How Email actions work

1. A booking event occurs (created, updated, or canceled)
2. Your Flow checks the conditions you've defined
3. If conditions match, the email is sent to the specified recipient

### Email action capabilities

* **Custom content**: Write your own subject lines and email body
* **Conditional branching**: Send different emails based on service, location, or language
* **Dynamic variables**: Include booking details like date, time, customer name, service name
* **Multiple recipients**: Send to customer, merchant, or team member

{% hint style="warning" %}
**Important limitation**: Email actions sent via Flows do **not** support `.ics` calendar file attachments. If you need calendar files, use Sesami's default notification emails instead.
{% endhint %}

### Example use cases

* Send a welcome email in French for French-speaking customers
* Send specialized pre-appointment instructions for specific services
* Notify a manager when high-value bookings are made
* Send follow-up emails after appointments are completed

## Webhook Actions

Webhook actions send booking data to external systems in real-time via HTTP POST requests.

### When to use Webhook actions

* Integrate with third-party marketing platforms (Klaviyo, Omnisend, etc.)
* Trigger custom business logic in your own systems
* Send booking data to analytics or CRM platforms
* Connect to Zapier or Make (formerly Integromat) for extended automation

### How Webhook actions work

1. A booking event occurs (created, updated, or canceled)
2. Your Flow checks the conditions you've defined
3. If conditions match, Sesami sends an HTTP POST request to your webhook URL
4. The receiving system processes the booking data

### Webhook payload

Webhooks send booking data in JSON format, including:

* Booking details (date, time, duration)
* Customer information (name, email, phone)
* Service and resource details
* Booking status (confirmed, canceled, rescheduled)
* Custom fields and metadata

### Example use cases

* Send booking data to Klaviyo for marketing automation
* Trigger SMS reminders via Twilio or similar services
* Update your internal CRM when bookings are created
* Send booking analytics to Google Analytics or Mixpanel
* Create tasks in project management tools when services are booked

## Comparing Email vs Webhook Actions

| Feature            | Email Action                | Webhook Action                |
| ------------------ | --------------------------- | ----------------------------- |
| **Primary use**    | Send notifications          | Send data to external systems |
| **Recipient**      | Email address               | HTTP endpoint URL             |
| **Content**        | HTML email                  | JSON data payload             |
| **Calendar files** | Not supported               | N/A                           |
| **Customization**  | Subject, body, branding     | Full booking data in JSON     |
| **Best for**       | Customer/team notifications | System integrations           |

## Setting up actions in Flows

To add an Email or Webhook action to your Flow:

1. Open **Sesami** in your Shopify Admin
2. Navigate to **Settings > Flows**
3. Create a new Flow or edit an existing one
4. Choose your trigger event (booking created, updated, canceled)
5. Add conditions if needed (optional)
6. Add an **Email** or **Webhook** action
7. Configure the action details
8. **Save** and test your Flow

{% hint style="info" %}
**Pro tip**: Always test your Flows with a test booking before enabling them for live customers. Check that emails arrive correctly or that webhook data is received properly.
{% endhint %}

## Troubleshooting

<details>

<summary>Webhook not receiving data</summary>

* Verify your webhook URL is correct and publicly accessible
* Check that your endpoint accepts POST requests
* Ensure your server returns a 200 OK status code
* Review your Flow conditions to ensure they're being met
* Check Sesami Flow logs for delivery status

</details>

<details>

<summary>Email not being sent</summary>

* Verify the email address is correctly configured
* Check your Flow conditions are being met
* Ensure the Flow is enabled and active
* Test with a simple booking to verify the trigger works
* Check spam folders if testing with your own email

</details>

## Related

* [Sesami Flows](/automations/sesami-flows.md) - Overview of the automation system
* [Sesami Flows and Klaviyo](/automations/sesami-flows-and-klaviyo.md) - Integration with Klaviyo
* [Sesami Flows and Omnisend](/automations/sesami-flows-and-omnisend.md) - Integration with Omnisend
* [Notification Emails](/notifications/notification-emails.md) - Default notification system


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://help.sesami.co/automations/email-and-webhook-as-action-types.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
