智能 Shopify 代理:AI 驱动的弃购车挽回
高级
这是一个Sales、AI领域的自动化工作流,包含 16 个节点。主要使用 If、Wait、Gmail、HttpRequest、GoogleSheets 等节点,结合人工智能技术实现智能自动化。 智能 Shopify 代理:AI 驱动的弃购车挽回系统
前置要求
- •Google 账号和 Gmail API 凭证
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
- •OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "5aaf4236c70e34e423fbdb2c7b754d19253a933bb1476d548f75848a01e473cf"
},
"nodes": [
{
"id": "ecbb99d3-d896-48cc-b6b1-72e178329a3c",
"name": "生成恢复邮件",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
100,
500
],
"parameters": {
"text": "=Write a friendly and persuasive abandoned cart recovery email for a customer named {{ $json.checkouts[0].customer.first_name }} {{ $json.checkouts[0].customer.last_name }}. The cart contains: {{ $json.checkouts }}. Encourage them to complete their purchase with a subtle reminder and optionally a discount. do not include subject and don't add extra stuff\n",
"options": {},
"promptType": "define"
},
"typeVersion": 1.9
},
{
"id": "0b156bce-50ec-4e56-9c67-be4b34791b3e",
"name": "邮件撰写器",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
40,
700
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"typeVersion": 1.2
},
{
"id": "49b21bce-bece-40a3-b9c0-86e4adc3e167",
"name": "记录邮件活动",
"type": "n8n-nodes-base.googleSheets",
"position": [
740,
500
],
"parameters": {
"columns": {
"value": {
"email": "={{ $('Get Initial Abandoned Checkout').item.json.checkouts[0].email }}",
"customer": "={{ $('Get Initial Abandoned Checkout').item.json.checkouts[0].customer.first_name }} {{ $('Get Initial Abandoned Checkout').item.json.checkouts[0].customer.last_name }}",
"GPT response": "={{ $('Generate Recovery Email').item.json.output }}"
},
"schema": [
{
"id": "customer",
"type": "string",
"display": true,
"required": false,
"displayName": "customer",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email",
"type": "string",
"display": true,
"required": false,
"displayName": "email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "GPT response",
"type": "string",
"display": true,
"required": false,
"displayName": "GPT response",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1H83mXsl_gjgwOWrwNYak6ISihoWsgx-EFxSbPlvQx7M/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1H83mXsl_gjgwOWrwNYak6ISihoWsgx-EFxSbPlvQx7M",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1H83mXsl_gjgwOWrwNYak6ISihoWsgx-EFxSbPlvQx7M/edit?usp=drivesdk",
"cachedResultName": "Shopify abandoned checkout"
}
},
"typeVersion": 4.5
},
{
"id": "e55ea939-10fd-423b-99ef-90a89b0effc8",
"name": "发送邮件给客户",
"type": "n8n-nodes-base.gmail",
"position": [
520,
500
],
"webhookId": "fb71183d-2a4d-4eca-a73b-225d4cfa4d2d",
"parameters": {
"sendTo": "={{ $('Get Initial Abandoned Checkout').item.json.checkouts[0].email }}",
"message": "={{ $json.output }}",
"options": {},
"subject": "=You left something behind, {{ $('Get Initial Abandoned Checkout').item.json.checkouts[0].customer.first_name }}"
},
"typeVersion": 2.1
},
{
"id": "b5a6e9ac-6d54-4d6f-bf4d-ced260eecd00",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-680,
400
],
"parameters": {
"color": 3,
"width": 420,
"height": 520,
"content": "🔍 第 3 部分:条件决策"
},
"typeVersion": 1
},
{
"id": "5462049f-2c8d-4f94-9475-33b16cbf4074",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
0
],
"parameters": {
"color": 5,
"width": 920,
"height": 840,
"content": "📧 第 4 部分:恢复邮件流程"
},
"typeVersion": 1
},
{
"id": "ef86a495-60f4-49c0-a5ca-bbc4b36724b8",
"name": "便签9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3520,
300
],
"parameters": {
"color": 4,
"width": 1300,
"height": 320,
"content": "======================================="
},
"typeVersion": 1
},
{
"id": "0f722fcc-e05a-4b9d-9250-487a049779eb",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-3520,
640
],
"parameters": {
"color": 4,
"width": 1289,
"height": 2238,
"content": "以下是按照您的**高价值订单提醒工作流**示例格式整理的完整版**放弃购物车恢复工作流**说明:"
},
"typeVersion": 1
},
{
"id": "7a5fce94-6ae8-43a3-9e45-b15e1d6ecf61",
"name": "无操作,不执行任何操作",
"type": "n8n-nodes-base.noOp",
"position": [
100,
1060
],
"parameters": {},
"typeVersion": 1
},
{
"id": "e8966160-eb7b-470c-9754-52048cb01551",
"name": "启动工作流",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-1720,
720
],
"parameters": {},
"typeVersion": 1
},
{
"id": "7ac542e0-5379-4416-a33e-c2ba13947a30",
"name": "获取初始放弃购物车",
"type": "n8n-nodes-base.httpRequest",
"position": [
-1420,
720
],
"parameters": {
"url": "https://your-store.myshopify.com/admin/api/2023-10/checkouts.json",
"options": {},
"sendQuery": true,
"sendHeaders": true,
"queryParameters": {
"parameters": [
{
"name": "status",
"value": "abandoned"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "X-Shopify-Access-Token",
"value": "your-access-token"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "2409af7c-7df8-4825-b31a-7d2f4bb84a59",
"name": "等待 1 小时",
"type": "n8n-nodes-base.wait",
"position": [
-1120,
720
],
"webhookId": "12d15136-8aa1-4177-a572-04da4b88b28c",
"parameters": {
"unit": "hours",
"amount": 1
},
"typeVersion": 1.1
},
{
"id": "449c40d4-e1fa-4984-9b3b-c9dd6863e71a",
"name": "重新检查放弃购物车",
"type": "n8n-nodes-base.httpRequest",
"position": [
-900,
720
],
"parameters": {
"url": "https://your-store.myshopify.com/admin/api/2023-10/checkouts.json",
"options": {},
"sendQuery": true,
"sendHeaders": true,
"queryParameters": {
"parameters": [
{
"name": "status",
"value": "abandoned"
}
]
},
"headerParameters": {
"parameters": [
{
"name": "X-Shopify-Access-Token",
"value": "your-access-token"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "023ea763-155f-4c3c-8c3b-d7de0ef1687a",
"name": "客户是否仍处于放弃状态?",
"type": "n8n-nodes-base.if",
"position": [
-620,
720
],
"parameters": {
"options": {},
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "8119001f-78d5-40b4-bcd7-8f13495b6d51",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $('Get Initial Abandoned Checkout').item.json.checkouts[0].id }}",
"rightValue": "={{ $json.checkouts[0].id }}"
},
{
"id": "229cf7e1-5490-4bd0-9004-2baadbe15b4f",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $('Get Initial Abandoned Checkout').item.json.checkouts[0].id }}",
"rightValue": "={{ $json.checkouts[1].id }}"
},
{
"id": "163c04b1-6e4b-42da-9a5f-2168c4148023",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $('Get Initial Abandoned Checkout').item.json.checkouts[0].id }}",
"rightValue": "={{ $json.checkouts[2].id }}"
},
{
"id": "42461258-29f4-4dc2-9c34-598654debaa6",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $('Get Initial Abandoned Checkout').item.json.checkouts[0].id }}",
"rightValue": "={{ $json.checkouts[3].id }}"
},
{
"id": "a0c9d76f-66fc-454b-b59c-990291c85ebf",
"operator": {
"type": "number",
"operation": "equals"
},
"leftValue": "={{ $('Get Initial Abandoned Checkout').item.json.checkouts[0].id }}",
"rightValue": "={{ $json.checkouts[4].id }}"
}
]
}
},
"typeVersion": 2.2
},
{
"id": "c0a92444-8d4d-4eeb-8c8f-7757d90dff2c",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1760,
320
],
"parameters": {
"width": 520,
"height": 600,
"content": "🔁 第 1 部分:初始化与首次放弃购物车获取"
},
"typeVersion": 1
},
{
"id": "4748bf2d-732b-48f5-a506-01ab5f5ebbe8",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1180,
320
],
"parameters": {
"width": 460,
"height": 600,
"content": "⏳ 第 2 部分:等待与重新评估"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Wait 1 Hour": {
"main": [
[
{
"node": "Recheck Abandoned Checkouts",
"type": "main",
"index": 0
}
]
]
},
"Email Writer": {
"ai_languageModel": [
[
{
"node": "Generate Recovery Email",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Start Workflow": {
"main": [
[
{
"node": "Get Initial Abandoned Checkout",
"type": "main",
"index": 0
}
]
]
},
"Send Email to Customer": {
"main": [
[
{
"node": "Log Email Activity",
"type": "main",
"index": 0
}
]
]
},
"Generate Recovery Email": {
"main": [
[
{
"node": "Send Email to Customer",
"type": "main",
"index": 0
}
]
]
},
"Recheck Abandoned Checkouts": {
"main": [
[
{
"node": "Is Customer Still Abandoned?",
"type": "main",
"index": 0
}
]
]
},
"Is Customer Still Abandoned?": {
"main": [
[
{
"node": "Generate Recovery Email",
"type": "main",
"index": 0
}
],
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"Get Initial Abandoned Checkout": {
"main": [
[
{
"node": "Wait 1 Hour",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
这是一个高级难度的工作流,适用于Sales、AI等场景。适合高级用户,包含 16+ 个节点的复杂工作流
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
使用Bright Data和LLMs自动化大规模超个性化外联
通过Bright Data和大语言模型实现大规模超个性化外联自动化
If
Set
Wait
+8
21 节点Yaron Been
Sales
使用 Bright Data 和 GPT 抓取 Glassdoor 发现高意向销售线索
通过 Bright Data 和 GPT 抓取 Glassdoor 发现高意向销售线索
If
Wait
Split Out
+6
16 节点Yaron Been
Sales
Crunchbase 邮件外联
基于 AI 生成摘要和 Gmail 的个性化 CrunchBase 潜在客户外联
Set
Gmail
Http Request
+5
13 节点Yaron Been
Sales
Shopify VIP告警:大订单的AI摘要和Slack通知
Shopify VIP告警:大订单的AI摘要和Slack通知
If
Set
Slack
+6
13 节点Yaron Been
Sales
使用AI(GPT-4o)自动化数字产品和SaaS销售
使用AI(GPT-4o)自动化数字产品和SaaS销售
If
Code
Wait
+14
34 节点Badr
Sales
AI YouTube分析助手:评论分析与洞察报告
AI YouTube分析助手:评论分析器与洞察报告生成器
If
Set
Code
+9
19 节点Yaron Been
AI
工作流信息
难度等级
高级
节点数量16
分类2
节点类型10
作者
Yaron Been
@yaron-nofluffBuilding AI Agents and Automations | Growth Marketer | Entrepreneur | Book Author & Podcast Host
外部链接
在 n8n.io 上查看 →
分享此工作流