从 Google Sheet 在 Mailerlite 中创建并分配订阅者
这是一个Social Media、Multimodal AI领域的自动化工作流,包含 11 个节点。主要使用 MailerLite、HttpRequest、GoogleSheets、ManualTrigger 等节点。 将新订阅者从 Google Sheets 同步至 MailerLite,避免重复
- •可能需要目标 API 的认证凭证
- •Google Sheets API 凭证
{
"id": "CQVAcWFM8iCOPZG5",
"meta": {
"instanceId": "{YOUR_INSTANCE_ID}",
"templateCredsSetupCompleted": true
},
"name": "从 Google Sheet 在 Mailerlite 中创建并分配订阅者",
"tags": [],
"nodes": [
{
"id": "a43ee8b3-37b3-4f0c-bcf0-60511054a2d7",
"name": "获取工作表中的行",
"type": "n8n-nodes-base.googleSheets",
"position": [
-220,
40
],
"parameters": {
"options": {},
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/{YOUR_GOOGLE_SHEETS_DOCUMENT_ID}/edit#gid=0",
"cachedResultName": "{YOUR_GOOGLE_SHEETS_SHEET_NAME}"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "{YOUR_GOOGLE_SHEETS_DOCUMENT_ID}",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/{YOUR_GOOGLE_SHEETS_DOCUMENT_ID}/edit?usp=drivesdk",
"cachedResultName": "{YOUR_GOOGLE_SHEETS_DOCUMENT_NAME}"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "{YOUR_GOOGLE_SHEETS_API_ID}",
"name": "{YOUR_GOOGLE_SHEETS_API_NAME}"
}
},
"typeVersion": 4.6
},
{
"id": "fbf4d989-1c36-40a1-b6f1-52ee12bde18a",
"name": "获取订阅者",
"type": "n8n-nodes-base.mailerLite",
"onError": "continueErrorOutput",
"position": [
260,
40
],
"parameters": {
"operation": "get",
"subscriberId": "={{ $json.Email }}"
},
"credentials": {
"mailerLiteApi": {
"id": "{YOUR_MAILERLITE_API_ID}",
"name": "{YOUR_MAILERLITE_API_NAME}"
}
},
"typeVersion": 2,
"alwaysOutputData": true
},
{
"id": "23910947-2fe9-4391-945a-d5c080c90ac6",
"name": "创建订阅者并分配到群组",
"type": "n8n-nodes-base.httpRequest",
"position": [
1180,
400
],
"parameters": {
"url": "https://connect.mailerlite.com/api/subscribers",
"method": "POST",
"options": {},
"jsonBody": "={\n \"email\": \"{{ $json.Email }}\",\n \"fields\": {\n \"name\": \"{{ $json.first_name }}\",\n \"last_name\": \"{{ $json.last_name }}\",\n \"company\": \"{{ $json.Company }}\",\n \"country\": \"{{ $json.Country }}\"\n },\n \"groups\": [\"{{ $json.group_id }}\"]\n}\n",
"sendBody": true,
"specifyBody": "json",
"authentication": "predefinedCredentialType",
"nodeCredentialType": "mailerLiteApi"
},
"credentials": {
"mailerLiteApi": {
"id": "{YOUR_MAILERLITE_API_ID}",
"name": "{YOUR_MAILERLITE_API_NAME}"
}
},
"typeVersion": 4.2
},
{
"id": "c26b4872-32ab-4b48-9a20-2d4be5b6baed",
"name": "启动工作流",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-720,
40
],
"parameters": {},
"typeVersion": 1
},
{
"id": "bc39a624-695d-48c7-a295-e40c3a7b84fa",
"name": "便签",
"type": "n8n-nodes-base.stickyNote",
"position": [
-880,
180
],
"parameters": {
"color": 3,
"width": 460,
"height": 300,
"content": "### 步骤 1:手动触发器 🖐️⚡"
},
"typeVersion": 1
},
{
"id": "cbce1376-b59f-4a7d-a6a6-ac410ae1ca39",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-420,
-300
],
"parameters": {
"width": 460,
"height": 300,
"content": "### 步骤 2:从 Google Sheets 获取行 📊📥"
},
"typeVersion": 1
},
{
"id": "3a331aef-f9c8-4368-984f-6221cd1a4a5b",
"name": "便签2",
"type": "n8n-nodes-base.stickyNote",
"position": [
60,
200
],
"parameters": {
"color": 4,
"width": 540,
"height": 360,
"content": "### 步骤 3:从 MailerLite 获取订阅者 📧🔍"
},
"typeVersion": 1
},
{
"id": "bf9b2275-debd-4113-830c-736d74cb135a",
"name": "结束工作流",
"type": "n8n-nodes-base.noOp",
"position": [
1160,
-400
],
"parameters": {},
"typeVersion": 1
},
{
"id": "7a52a415-bd9d-4b39-85d6-d3cb8e0b4b8a",
"name": "便签3",
"type": "n8n-nodes-base.stickyNote",
"position": [
880,
-760
],
"parameters": {
"width": 500,
"height": 280,
"content": "### 步骤 4:为现有用户结束工作流 🛑✅"
},
"typeVersion": 1
},
{
"id": "55e7ee44-8deb-4c24-ba01-2cf8dc065acb",
"name": "便签4",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
600
],
"parameters": {
"color": 5,
"width": 540,
"height": 300,
"content": "### 步骤 4:创建订阅者并分配到群组(HTTP 请求) 🆕👥"
},
"typeVersion": 1
},
{
"id": "5357d0af-ef67-4a17-b5c9-a861a948d478",
"name": "便签5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-940,
-1220
],
"parameters": {
"color": 6,
"width": 560,
"height": 540,
"content": "## 先决条件 ⚙️"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "3043305e-b7ac-47b3-a36a-cefdb7cd9e74",
"connections": {
"Start Workflow": {
"main": [
[
{
"node": "Get row(s) in sheet",
"type": "main",
"index": 0
}
]
]
},
"Get a subscriber": {
"main": [
[
{
"node": "End workflow",
"type": "main",
"index": 0
}
],
[
{
"node": "Create subscriber and assign to group",
"type": "main",
"index": 0
}
]
]
},
"Get row(s) in sheet": {
"main": [
[
{
"node": "Get a subscriber",
"type": "main",
"index": 0
}
]
]
}
}
}如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
这是一个中级难度的工作流,适用于Social Media、Multimodal AI等场景。适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
Intuz
@intuzWorkflow automation can help automate your routine activities and help saves $$$, as well as hours of time. As a boutique tech consulting company, Intuz help businesses with custom AI/ML, AI Workflow Automations, and software development. Automate your business workflow for: Sales Marketing Accounting Finance Operations E-Commerce Customer Support Admin & Backoffice Logistics & Supply Chain
分享此工作流