---
title: "Connect n8n to Shopify Flow with Workflow Webhooks"
description: "Step-by-step guide with video: send data from an n8n workflow into Shopify Flow using a Workflow Webhooks endpoint."
canonical: "https://docs.workflow-webhooks.app/how-to-connect-n8n"
---

# How to connect n8n with Workflow Webhooks

## Use case overview

This setup connects your post-purchase email workflow in n8n with **Workflow Webhooks** so you can collect customer details for a **Monthly SEO Audit** and pass them into Shopify Flow.

In this example, the customer receives an email with a survey form (we are using Google Form, Google Form is adding entry in the google spreadsheet) asking for:

- **What is your Shopify store URL?**
- **What is your biggest SEO challenge right now?** with these options: `slow traffic growth`, `poor product rankings`, `thin content`, `technical errors`
- **How long have you been running your store?** with these options: `less than 6 months`, `6–12 months`, `1–3 years`, `3+ years`
- **Email used for order at Store?**

When the customer submits the form, n8n sends the answers to your Workflow Webhooks endpoint. Shopify Flow can then tag the customer and add a note so your SEO team sees the context immediately in Shopify admin.

## What this workflow does

After the customer submits the form in your email flow, data is added in the spreadsheet and from where n8n sends the data to the Workflow Webhooks webhook and the webhook sends this payload into Shopify Flow:

```
{
  "name": "Saad",
  "email": "customer@example.com",
  "store_url": "mystore.myshopify.com",
  "seo_challenge": "poor product rankings",
  "store_age": "1-3 years"
}
```

Your Shopify Flow workflow then:

- adds the customer tag `seo-audit-pending`
- adds a customer note with the store URL and SEO challenge

This makes it easy for your team to open the customer record in Shopify admin and see what needs attention before the audit starts.

## Video Guide

Here you can see the video of whole setup, video has no voice. You can increase or decrease the speed of video according to need.

https://www.youtube.com/watch?v=N4HHaYI2vkw

## Before you begin

- Install and enable **Workflow Webhooks** in your Shopify store.
- Have a Shopify Flow workflow ready, or create a new one in **Shopify Flow**.
- Build your intake form in the tool that feeds your n8n workflow. I am using the Google Form, once the Google Form is submitted and entry is created in the google spreadsheets.
	![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/5883d9d0b1303ba2.png)
	data received from the Google Form in spreadsheet
- Make sure you are collecting the customer email address exactly as it exists in Shopify so Flow can identify the correct customer.

## Set up the connection

In **Workflow Webhooks**, create the webhook.

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/6d2d6e8d5835f723.png)

Enter name and generate static token (you can create the static token instantly pressing the magic button on number 3 in following image) and save.

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/288bad43f6455c5d.png)

In the **Advanced Settings** name the variables you want to receive:

- `name`
- `email`
- `store_url`
- `seo_challenge`
- `store_age`

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/15cee0dbdf98351b.png)

In the settings we have 4 variables, that we have mapped to name, email, store\_url and seo\_challenge then we have also checked the option **Allow Custom Request Body** to receive other information like store\_age.

In the Google Sheet trigger, select the correct sheet you want to monitor and create a test entry in the form to see the data.

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/a33550a2094bc1b1.png)

Then select the HTTP Request action to send the form data to the webhook you have created using the Workflow Webhooks app.

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/7e4315d2dc176d87.png)

You can follow the step mentioned at the bottom of the Workflow Webhooks webhook with mapped fields, API token and URL for webhook.

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/09ec08587c7e5e84.png)

I have added the URL, selected POST method and added the headers like this in n8n HTTP Request action.

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/ee8f87a368265a1a.png)

Then I have mapped the variables created in the webhook, with the actual questions. You will see that how I drag and drop the answer in the fields in the video demo. I also added the **store\_age** that was under the scrollable page and could not fit in the screenshot.

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/dab43507cd5390c4.png)

Then execute the step and see the data sent from n8n to your webhook in the Workflow Webhooks app. In the invocations, you can see the External System invoked this webhook and also see the payload. You can use this payload in your Shopify Flow to perform any action.

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/4ba44805fa3ccfb2.png)

As your webhook has received the data from n8n successfully, save and publish the workflow.

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/d7ba35a4ab153848.png)

In **Shopify Flow**, create a workflow that starts when your webhook data is received through **Workflow Webhooks**. Then in webhook trigger, hit Record Events.

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/a80e03e4d5e63e06.png)

Now go to the earlier webhook invocation and Replay the Webhook to send this payload to your Webhook Trigger in the Shopify Flow.

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/fa2525340f9f754b.png)

Now in the data, you can see the payload and also the webhook ID.

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/8f3e9ccb219fe78a.png)

You can see the same webhook in the webhook dashboard and it can be used to identify your webhook.

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/d1330bd43db40cc3.png)

Now add the condition, if the received webhook id equals the webhook ID you created for n8n flow then perform actions related to the form. Because every Webhook trigger receives the data sent to any webhook url in the Workflow Webhooks app and this ID will help you select the relevant data from the webhook for specific purpose.

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/9f60ef3aed856107.png)

Use the Incoming email value to find the matching customer using Advanced query. In query you can use email and this email is received from the webhook trigger variables. For me fieldTwo is email. My query looks like this `email:"{{fieldTwo}}"`

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/e46df18f75623fc6.png)

Now check if the customer exists. I am checking if the customer id exists.

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/68c102aaa37fc616.png)

then add the tag `seo-audit-pending` To get the customer, in the configuration, I have used this code to place the customer ID, I have used the [white space control](https://shopify.github.io/liquid/basics/whitespace/) in the tag syntax `{{-`, `-}}`, `{%-`, and `-%}` to strip whitespace from the left or right side of customer ID. If there is some white space present, then query will not work.

```
{%- for getCustomerData_item in getCustomerData -%}
  {{-getCustomerData_item.id-}}
{%- endfor -%}
```

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/e3c15a7250ce9e10.png)

add or update the customer note with the store URL and SEO challenge. To get the customer, in the configuration, I have used this code to place the customer ID, I have used the [white space control](https://shopify.github.io/liquid/basics/whitespace/) in the tag syntax `{{-`, `-}}`, `{%-`, and `-%}` to strip whitespace from the left or right side of customer ID. If there is some white space present, then query will not work.

```
{%- for getCustomerData_item in getCustomerData -%}
  {{-getCustomerData_item.id-}}
{%- endfor -%}
```

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/7621e7e7bfe0ef72.png)

Turn on the workflow and submit a test response from your form and confirm that the correct customer record in Shopify receives the tag and note.  
  
this works in this way, form submitted -> n8n receives the data -> n8n sends the data to Workflow Webhooks webhook -> Workflow Webhooks webhook triggers the Shopify Flow -> you filter the flow trigger based on webhook id -> then fetch the customer based on the id -> check if the customer is present -> add the tag -> add the note

The tag and the note looks as in the following image for the customer.

![image](https://cdn-dev.eu.codecreationlabs.cloud/crm-tool/uploads/SjJ78gKLnLlocopCui3Cs62dJbGZ7F1n/f97a4d34f74c9d71.png)
