This workflow corresponds to n8n.io template #9160 — we link there as the canonical source.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "Hro9POa9cP9U8HVd",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Re-engage inactive Shopify customers to Beex",
"tags": [],
"nodes": [
{
"id": "54a24002-a493-4022-b1bc-339411141d7e",
"name": "API Request",
"type": "n8n-nodes-base.httpRequest",
"notes": "Shopify - Customers",
"position": [
304,
80
],
"parameters": {
"url": "http://shopify.com",
"options": {}
},
"notesInFlow": true,
"typeVersion": 4.2
},
{
"id": "06d5b7c5-a86e-4514-b456-7e43333fcc6d",
"name": "Split Records",
"type": "n8n-nodes-base.splitOut",
"notes": "Tabular Format",
"position": [
528,
80
],
"parameters": {
"options": {},
"fieldToSplitOut": "customers"
},
"notesInFlow": true,
"typeVersion": 1
},
{
"id": "d4e15c5f-9613-4b6c-a4ee-9002800ab4a0",
"name": "Filter by Days",
"type": "n8n-nodes-base.filter",
"notes": "days without purchase > 30",
"position": [
1840,
416
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "48901d94-8928-4101-9e57-532b5ee38a68",
"operator": {
"type": "number",
"operation": "gt"
},
"leftValue": "={{ $json.timeDifference.days }}",
"rightValue": 30
}
]
}
},
"notesInFlow": true,
"typeVersion": 2.2
},
{
"id": "3bede028-9fd7-408f-9414-5f921341dec7",
"name": "1. Shopify",
"type": "n8n-nodes-base.shopify",
"notes": "Get Last Order",
"position": [
1008,
80
],
"parameters": {
"options": {},
"orderId": "={{ $json.last_order_id }}",
"operation": "get",
"authentication": "accessToken"
},
"credentials": {
"shopifyAccessTokenApi": {
"name": "<your credential>"
}
},
"executeOnce": false,
"notesInFlow": true,
"typeVersion": 1
},
{
"id": "4e19063a-fb2d-4ba4-a8d8-c01ce5b49787",
"name": "2. Shopify",
"type": "n8n-nodes-base.shopify",
"notes": "Get Product",
"position": [
1312,
80
],
"parameters": {
"resource": "product",
"operation": "get",
"productId": "={{ $json.line_items[0].product_id }}",
"authentication": "accessToken",
"additionalFields": {}
},
"credentials": {
"shopifyAccessTokenApi": {
"name": "<your credential>"
}
},
"notesInFlow": true,
"typeVersion": 1
},
{
"id": "f78b1383-1712-4a60-af4d-47cacee79a83",
"name": "Create Lead",
"type": "n8n-nodes-beex.beex",
"position": [
2064,
416
],
"parameters": {
"email": "={{ $json.email }}",
"priority": 1,
"resource": "leads",
"code_client": "={{ $json.client_id }}",
"sequence_id": 22,
"code_country": "={{ $json.wsp.slice(0,3) }}",
"phone_number": "={{ $json.wsp.slice(3,100) }}",
"portfolio_id": 81,
"additionalParameters": {
"text_01": "={{ $json.closed_at.slice(0,10) }}",
"text_02": "={{ $json.product_type }}",
"text_03": "Inactive",
"first_name": "={{ $json.first_name }}",
"paternal_surname": "={{ $json.last_name }}"
}
},
"typeVersion": 1
},
{
"id": "4343c05d-152e-4c71-93de-6d10011153e7",
"name": "Filter Customers",
"type": "n8n-nodes-base.filter",
"notes": "With Last Orders",
"position": [
736,
80
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "c100217e-d6b5-45b5-94c1-ced1eccdb708",
"operator": {
"type": "number",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.last_order_id }}",
"rightValue": ""
}
]
}
},
"notesInFlow": true,
"typeVersion": 2.2
},
{
"id": "b7af6a7b-71c0-40a8-b3f5-76e8513afe57",
"name": "Calculate Days",
"type": "n8n-nodes-base.dateTime",
"notes": "Last Order vs Today",
"position": [
1616,
416
],
"parameters": {
"endDate": "={{ $now }}",
"options": {
"includeInputFields": true
},
"operation": "getTimeBetweenDates",
"startDate": "={{ $json.closed_at }}"
},
"notesInFlow": true,
"typeVersion": 2
},
{
"id": "2ad62037-1ab5-411d-9099-13b96968410b",
"name": "Extract Customer Data",
"type": "n8n-nodes-base.set",
"position": [
736,
432
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "b3de839f-2ace-4d1f-84b5-81e476b6637f",
"name": "client_id",
"type": "number",
"value": "={{ $json.id }}"
},
{
"id": "6259d2bb-132e-499a-bb87-ac17b9f7df1d",
"name": "first_name",
"type": "string",
"value": "={{ $json.first_name }}"
},
{
"id": "4f49d283-d2db-4294-8c50-b6ecbc5db10a",
"name": "last_name",
"type": "string",
"value": "={{ $json.last_name }}"
},
{
"id": "a200ca34-cb37-419e-8fe6-0355f5a07b5c",
"name": "email",
"type": "string",
"value": "={{ $json.email }}"
},
{
"id": "c011620d-ec00-4534-a5c1-f6d8d5c77862",
"name": "wsp",
"type": "string",
"value": "={{ $json.phone }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "2de1c05a-1f67-480f-8760-5e7b8b20ab3e",
"name": "Merge Data",
"type": "n8n-nodes-base.merge",
"notes": "Client/Product",
"position": [
1312,
416
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineByPosition"
},
"notesInFlow": true,
"typeVersion": 3.1
},
{
"id": "7196ebbd-1f85-43bc-ada6-b048aacb65fa",
"name": "Schedule Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
80,
80
],
"parameters": {
"rule": {
"interval": [
{
"field": "months"
}
]
}
},
"typeVersion": 1.2
},
{
"id": "60ad1675-2281-44cc-b7fd-cd904d491f51",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
16,
-80
],
"parameters": {
"color": 7,
"width": 672,
"height": 384,
"content": "## Get the Customer List from Shopify\n- Extracts the customer list for a specific Shopify store via API on a monthly basis.\n- Splits the records to create a tabular format."
},
"typeVersion": 1
},
{
"id": "791f703b-4de3-4f8c-b7cb-589abc8d9798",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
688,
-80
],
"parameters": {
"color": 6,
"width": 208,
"height": 384,
"content": "## Filter Customers\n- We discard customers with a null **last_order_id** field."
},
"typeVersion": 1
},
{
"id": "88e8493a-4c52-40e7-a027-1f7ce23ecd16",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
896,
-80
],
"parameters": {
"color": 7,
"width": 640,
"height": 384,
"content": "## Extract Features from the Last Order\n- We must consider the closing date of the last order.\n- The type of product ordered in the order is also considered."
},
"typeVersion": 1
},
{
"id": "a04a9039-c89c-464b-bf14-ec88aaf9f1b1",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1536,
-80
],
"parameters": {
"color": 7,
"height": 384,
"content": "## Extract Data Product"
},
"typeVersion": 1
},
{
"id": "594d951d-3ada-4ab8-9f61-f84bfb535428",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
688,
304
],
"parameters": {
"color": 7,
"width": 848,
"height": 304,
"content": "## Attach Along with the Relevant Customer Data\n- Relevant customer data is merged with data extracted from the order and product.\n- Combine By Position"
},
"typeVersion": 1
},
{
"id": "bcdb9b2b-8160-4dd1-bb98-dc743dc55bcd",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
2000,
304
],
"parameters": {
"color": 2,
"width": 272,
"height": 304,
"content": "## Capture Lead in Beex\n- A sequence of steps is prepared for contact."
},
"typeVersion": 1
},
{
"id": "7df173d8-7e5f-425f-bb89-9360ce1ab285",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
1536,
304
],
"parameters": {
"color": 5,
"width": 464,
"height": 304,
"content": "## Calculate Customer Inactivity Days\n- We obtain the number of days elapsed from the date of the last purchase until today. We filter according to what is obtained"
},
"typeVersion": 1
},
{
"id": "388a02a4-6378-492a-8ec1-c57528b1aead",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-688,
-304
],
"parameters": {
"width": 572,
"height": 1040,
"content": "## Re-engage inactive Shopify customers to Beex\n\n- \u26a0\ufe0f **Disclaimer**: This workflow uses the community node `n8n-nodes-beex`. \n- It is only available in **self-hosted** n8n instances. \n\n\n\n### What this workflow does\nThis n8n template identifies customers on Shopify who haven't purchased in a defined period and automatically reconnects them by creating new leads in Beex.\n\n### How it works\n1. The workflow retrieves customer data from Shopify.\n2. It checks the date of each customer's last order and the type of product they purchased.\n3. If customers exceed the inactivity threshold (for example, 30 days), they are marked as inactive.\n4. Inactive customers are sent to Beex as new leads, injecting the relevant data.\n5. From there, you can run reconnection campaigns directly in Beex, using email sequences, WhatsApp, etc.\n\n### How to use\n- The template can use manual activation for demonstration purposes, but in this case, it was set up using a scheduled trigger.\n- You can adjust the inactivity threshold to match your business rules.\n- Map Shopify customer fields to the corresponding lead fields in Beex.\n\nRequirements\n- A Shopify account with API credentials for the respective store.\n- A Beex account with permission to generate leads + Bearer YOUR_TOKEN_HERE\n"
},
"typeVersion": 1
},
{
"id": "63f920b6-bd16-4558-8285-5932a63fe9ec",
"name": "Extract Product Data",
"type": "n8n-nodes-base.set",
"position": [
1616,
80
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "f1d9ca4d-7180-4401-a885-33ff8b956221",
"name": "closed_at",
"type": "string",
"value": "={{ $('1. Shopify').item.json.closed_at }}"
},
{
"id": "70f70368-78a1-4de4-b8a2-844711a46bca",
"name": "product_type",
"type": "string",
"value": "={{ $json.product_type }}"
}
]
}
},
"typeVersion": 3.4
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "09030ddd-803f-41af-b8ae-44d8626956fd",
"connections": {
"1. Shopify": {
"main": [
[
{
"node": "2. Shopify",
"type": "main",
"index": 0
}
]
]
},
"2. Shopify": {
"main": [
[
{
"node": "Extract Product Data",
"type": "main",
"index": 0
}
]
]
},
"Merge Data": {
"main": [
[
{
"node": "Calculate Days",
"type": "main",
"index": 0
}
]
]
},
"API Request": {
"main": [
[
{
"node": "Split Records",
"type": "main",
"index": 0
}
]
]
},
"Split Records": {
"main": [
[
{
"node": "Filter Customers",
"type": "main",
"index": 0
}
]
]
},
"Calculate Days": {
"main": [
[
{
"node": "Filter by Days",
"type": "main",
"index": 0
}
]
]
},
"Filter by Days": {
"main": [
[
{
"node": "Create Lead",
"type": "main",
"index": 0
}
]
]
},
"Filter Customers": {
"main": [
[
{
"node": "1. Shopify",
"type": "main",
"index": 0
},
{
"node": "Extract Customer Data",
"type": "main",
"index": 0
}
]
]
},
"Schedule Trigger": {
"main": [
[
{
"node": "API Request",
"type": "main",
"index": 0
}
]
]
},
"Extract Product Data": {
"main": [
[
{
"node": "Merge Data",
"type": "main",
"index": 0
}
]
]
},
"Extract Customer Data": {
"main": [
[
{
"node": "Merge Data",
"type": "main",
"index": 1
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
shopifyAccessTokenApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Re-engage your customers with your Shopify store through a personalized contact sequence. The workflow is triggered by a Scheduler Trigger and immediately reviews your Shopify customers by retrieving their lastorderid. For customers with a non-null lastorderid, the workflow…
Source: https://n8n.io/workflows/9160/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
As n8n instances scale, teams often lose track of sub-workflows—who uses them, where they are referenced, and whether they can be safely updated. This leads to inefficiencies like unnecessary copies o
This workflow is an improvement of this workflow by Greg Brzezinka.
N8N-Workflow-Github-Manager. Uses github, httpRequest, n8n. Scheduled trigger; 38 nodes.
This workflow uses KlickTipp community nodes, available for self-hosted n8n instances only.
This workflow acts as an automated engagement bot. It sends a Direct Message (DM) with a link or resource to any follower who replies to your post with a specific target keyword.