> For the complete documentation index, see [llms.txt](https://docs.getmesa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.getmesa.com/connect/shopify-flow.md).

# Shopify Flow

## Connection

If you don't already have a Shopify Flow connection created, enter your Shopify Store ID and click Authorize in Shopify.

<figure><img src="/files/WOJhMRC8V6ZIw9oPrfOj" alt="Screenshot of the MESA Shopify Flow connection setup, enter your Shopify Store ID. Spotlight the Authorize in Shopify button."><figcaption></figcaption></figure>

## Configure <a href="#flow" id="flow"></a>

### Start a MESA Workflow From Shopify Flow <a href="#flow" id="flow"></a>

MESA can receive Customer, Order, and Product data from Shopify Flow.

1\. In MESA, create a new workflow using a **Shopify Flow** trigger.

<figure><img src="/files/z2p1NBVO8RHLPhO3cqgi" alt="Screenshot of MESA creating a new workflow using a Shopify Flow trigger. Spotlight the Shopify Flow trigger."><figcaption></figcaption></figure>

2\. In Shopify Flow, create a workflow with the **Add action** button. Then, select the corresponding MESA action from Step 1.

<figure><img src="/files/lJL7kng2D0vX2smUYViz" alt="Screenshot of Shopify Flow creating a workflow, click the Add action button and select the corresponding MESA action from Step 1. Spotlight the Add action button."><figcaption></figcaption></figure>

If you select the **Send to Mesa** action in Shopify Flow, you can copy the **Workflow Key** from your MESA workflow's **Dashboard** tab.

<figure><img src="/files/JEQtgL62YmGfYzAvMW5I" alt="Screenshot of a MESA workflow Dashboard tab showing the Workflow Key to copy for the Send to Mesa action. Spotlight the Workflow Key."><figcaption></figcaption></figure>

### Start a Shopify Flow Workflow From MESA <a href="#flow" id="flow"></a>

1\. Add a Shopify Flow action in MESA.

2\. Complete any required fields referencing an ID. In most cases, you want to use [MESA's Variables feature](https://docs.getmesa.com/workflow-builder/fields/variables) and locate the variable that represents the entity's ID (e.g. Product ID, Customer ID, Order ID).

<figure><img src="/files/qy0b0RYhUJfHzhuUgrrm" alt="Screenshot of a Shopify Flow action in MESA, complete the required ID fields using MESA&#x27;s Variables feature to insert the entity&#x27;s ID. Spotlight the ID field variable selector."><figcaption></figcaption></figure>

{% hint style="info" %}
To send custom data to your Shopify Flow, select the [**Send Custom Data to Shopify Flow**](#send-custom-data-to-shopify-flow-step) step.
{% endhint %}

3\. Create a new workflow in Shopify Flow.

4\. Within Shopify Flow's "**Start When**" block, select a **MESA Action**.

<figure><img src="/files/JNdSaQ5USf8G1K7Uo2sC" alt="Screenshot of Shopify Flow, in the Start When block select a MESA Action. Spotlight the MESA Action option."><figcaption></figcaption></figure>

## Technical Notes

### **Send Custom Data to Shopify Flow step**

Use this step to send unstructured or custom data to your Shopify Flow. This will allow you to define a key-value pair array (similar to the Line Items properties), and you can read this in your Shopify Flow.

For example, we want to send a Shopify Order's Name and ID to our Flow. We can set this up by doing the following.

<figure><img src="/files/ye5UnFvVWSYbyDMkcg6Q" alt="Screenshot of the MESA Send Custom Data to Shopify Flow step configured to send a Shopify Order&#x27;s Name and ID as key-value pairs. Spotlight the key-value pair array."><figcaption></figcaption></figure>

In Shopify Flow, we can reference the data as `{{ custom_data.data[0].value }}` and this will represent the Order's Name.

### Send Custom Data from Shopify Flow to MESA

To send custom data from Shopify Flow to MESA, create a workflow in Shopify Flow with a **Send to Mesa** action.

<figure><img src="/files/WM4aMS4WnAqA1FnjSNro" alt="Screenshot of a Shopify Flow workflow with a Send to Mesa action used to send custom data to MESA. Spotlight the Send to Mesa action."><figcaption></figcaption></figure>

Next, open the Send to Mesa action, enter the desired key, then select **Add a variable** to see the available data.

For example, this Send to Mesa action will send the contact email from Shopify Flow to MESA.

<figure><img src="/files/h5ExHTWOCSIgwSYad9rD" alt="Screenshot of the Shopify Flow Send to Mesa action configured to send the contact email to MESA, with a key entered and Add a variable selected. Spotlight the payload key-value fields."><figcaption></figcaption></figure>

Your payload should follow a similar structure to the one shown above.

### How to use Data from Shopify Flow

When sending Orders, Customers, and Products from Shopify Flow, there must be a previous step to designate the object's ID.

This Shopify Flow workflow will send the Order ID to MESA when an order is created.

<figure><img src="/files/njpsC8K36pdo1jFshtg1" alt="Screenshot of a Shopify Flow workflow that designates and sends the Order ID to MESA when an order is created. Spotlight the Order ID step."><figcaption></figcaption></figure>

{% hint style="info" %}
View Shopify Flow templates and tutorials [here](https://www.getmesa.com/apps/shopify-flow/integrate)!
{% endhint %}
