> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.froonze.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Setting up an email automation flow for cancelled orders

Shopify provides natively an easy way to set up an automatic email flow, so you'll be informed on a particular internal email address every time an order is cancelled, in case you'd like to receive this type of notification.

To set it up go to your **Shopify Admin > Marketing > Automations**, and click on the **Create Automation** button on the top right corner.

![](https://storage.crisp.chat/users/upload-1/website/-/8/7/3/1/873182aab5747000/tnbwoi4um6_1plhe30.png =1000xauto)

Now scroll down a bit and click on **Custom Email Automation**

![](https://storage.crisp.chat/users/upload-1/website/-/8/7/3/1/873182aab5747000/q-cd2na-zc_u3r2sx.png =1000xauto)

You are editing the flow now. You can customize its **name** in the box at the top.

The first step will be selecting the trigger that will initiate the flow. The trigger we are looking for is **Orders cancelled** (to start the flow when an order is cancelled). Find it on the list of triggers on the right panel and click on it.

![](https://storage.crisp.chat/users/upload-1/website/-/8/7/3/1/873182aab5747000/ei6jmjpbdl_1vo12tz.png =1000xauto)

Next we want to define what happens after an order is cancelled. On the corner of the **Order cancelled** trigger, click on **Then**, and on **Action** next

![](https://storage.crisp.chat/users/upload-1/website/-/8/7/3/1/873182aab5747000/e5usbjkyi9_1bih3h.png =1000xauto)

For action we'll choose **Send Internal Email** (send an email notification to your staff). Find it on the list on the right panel and click on it.

![](https://storage.crisp.chat/users/upload-1/website/-/8/7/3/1/873182aab5747000/4ldxbrjzs_16ink9.png =1000xauto)

Along your email address, you'll be able to customize the Subject and Body of the email with Shopify variables. We recommend you using the ones listed below, you can check other variables just clicking on **Add a variable**

```
Recomommended variables:
{{number}} - Order number
{{order.customer.email}} - Email of the customer
{{order.customer.firstName}} - Customer's first name
{{order.customer.lastName}} - Customer's last name
{{order.cancelledAt}} - Date and time when the order was cancelled

E.g:

Subject: 
Order {{number}} has been cancelled

Body:
Order {{number}} has been cancelled at {{order.cancelledAt}}
Customer details:
{{order.customer.firstName}} {{order.customer.lastName}}
{{order.customer.email}}
```

![](https://storage.crisp.chat/users/upload-1/website/-/8/7/3/1/873182aab5747000/bu88jh9isr_1rcn55c.png =1000xauto)

Once you are done customizing the email click on **Turn on workflow** on top, confirm one last time in the modal and you are all set

![](https://storage.crisp.chat/users/upload-1/website/-/8/7/3/1/873182aab5747000/jmnphm4523_65lgmm.png =1000xauto)