8
n8n 中文网amn8n.com

我的工作流 5

高级

这是一个自动化工作流,包含 19 个节点。主要使用 Code, Merge, Airtable, HttpRequest, ManualTrigger 等节点。 使用GPT-4、SendGrid和Airtable分析邮件性能并优化营销活动

前置要求
  • Airtable API Key
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key

分类

-
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "42b2652ebb0a87755df4710a5630695eec8e35cb0ce04a63b0e25751b1f044f1"
  },
  "name": "我的工作流 5",
  "tags": [],
  "nodes": [
    {
      "id": "05a392cc-4f92-4716-8738-6a0fbd45e3ed",
      "name": "当点击\"执行工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -16,
        384
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1da7c095-0587-46fa-ae74-558f9cf7d0e1",
      "name": "Sendgrid 数据拉取",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        176,
        496
      ],
      "parameters": {
        "url": "https://api.sendgrid.com/v3/stats",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "queryParameters": {
          "parameters": [
            {
              "name": "start_date",
              "value": "={{ $now.minus(7, 'days').format('yyyy-MM-dd') }}"
            },
            {
              "name": "end_date",
              "value": "={{ $now.format('yyyy-MM-dd') }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "KB5CcNJcpZPU6DRn",
          "name": "Sendgrid"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "abeda94c-de1e-492d-b63a-ad01ad1f7ab2",
      "name": "更新记录",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1024,
        464
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "apptBBudqpCku19Sw",
          "cachedResultUrl": "https://airtable.com/apptBBudqpCku19Sw",
          "cachedResultName": "Untitled Base"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbl2nb9vURHJVghpw",
          "cachedResultUrl": "https://airtable.com/apptBBudqpCku19Sw/tbl2nb9vURHJVghpw",
          "cachedResultName": "Email Campaign Performance"
        },
        "columns": {
          "value": {
            "id": "={{ $json.id }}",
            "ctr": "={{ $json.ctr }}",
            "delivered": "={{ $json.delivered }}",
            "open_rate": "={{ $json.open_rate }}",
            "week_ending": "={{ $json.week_ending }}",
            "unique_opens": "={{ $json.unique_opens }}",
            "unique_clicks": "={{ $json.unique_clicks }}",
            "performance_delta": 0
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "week_ending",
              "type": "dateTime",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "week_ending",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "delivered",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "delivered",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "unique_opens",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "unique_opens",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "unique_clicks",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "unique_clicks",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "open_rate",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "open_rate",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ctr",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "ctr",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "prompt_version",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "prompt_version",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "changes_made",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "changes_made",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "subject_line_used",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "subject_line_used",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email_template_used",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "email_template_used",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "performance_delta",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "performance_delta",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "decision",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "decision",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "typecast": true
        },
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "77pJURtbEjVETtBQ",
          "name": "Airtable Personal Access Token account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "eaacc354-b476-42e1-aae1-49bdffa6e87c",
      "name": "搜索记录",
      "type": "n8n-nodes-base.airtable",
      "position": [
        400,
        608
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "apptBBudqpCku19Sw",
          "cachedResultUrl": "https://airtable.com/apptBBudqpCku19Sw",
          "cachedResultName": "Untitled Base"
        },
        "sort": {
          "property": [
            {
              "field": "week_ending",
              "direction": "desc"
            }
          ]
        },
        "limit": 1,
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbl2nb9vURHJVghpw",
          "cachedResultUrl": "https://airtable.com/apptBBudqpCku19Sw/tbl2nb9vURHJVghpw",
          "cachedResultName": "Email Campaign Performance"
        },
        "options": {},
        "operation": "search",
        "returnAll": false
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "77pJURtbEjVETtBQ",
          "name": "Airtable Personal Access Token account"
        }
      },
      "executeOnce": false,
      "typeVersion": 2.1
    },
    {
      "id": "6af1e213-6695-4fad-98f9-a1be2db331fb",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        720,
        464
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "aadc8253-4066-472a-9cbd-92ab2cb07a74",
      "name": "搜索记录1",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1168,
        464
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "apptBBudqpCku19Sw",
          "cachedResultUrl": "https://airtable.com/apptBBudqpCku19Sw",
          "cachedResultName": "Untitled Base"
        },
        "limit": 4,
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbl2nb9vURHJVghpw",
          "cachedResultUrl": "https://airtable.com/apptBBudqpCku19Sw/tbl2nb9vURHJVghpw",
          "cachedResultName": "Email Campaign Performance"
        },
        "options": {},
        "operation": "search",
        "returnAll": false
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "77pJURtbEjVETtBQ",
          "name": "Airtable Personal Access Token account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "da85d884-583f-46e1-aab0-fc2fbf44311f",
      "name": "创建记录",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1856,
        464
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "apptBBudqpCku19Sw",
          "cachedResultUrl": "https://airtable.com/apptBBudqpCku19Sw",
          "cachedResultName": "Untitled Base"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "tbl2nb9vURHJVghpw",
          "cachedResultUrl": "https://airtable.com/apptBBudqpCku19Sw/tbl2nb9vURHJVghpw",
          "cachedResultName": "Email Campaign Performance"
        },
        "columns": {
          "value": {
            "ctr": 0,
            "decision": "={{ $json.decision }}",
            "delivered": 0,
            "open_rate": 0,
            "week_ending": "={{ $json.week_ending }}",
            "unique_opens": 0,
            "unique_clicks": 0,
            "test_directive": "={{ $json.test_directive }}",
            "test_variable ": "={{ $json.test_variable }}",
            "confidence_level": "={{ $json.confidence_level }}",
            "test_hypothesis ": "={{ $json.test_hypothesis }}",
            "performance_delta": 0,
            "implementation_instruction": "={{ $json.implementation_instruction }}"
          },
          "schema": [
            {
              "id": "week_ending",
              "type": "dateTime",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "week_ending",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "delivered",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "delivered",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "unique_opens",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "unique_opens",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "unique_clicks",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "unique_clicks",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "open_rate",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "open_rate",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ctr",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "ctr",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "prompt_version",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "prompt_version",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "changes_made",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "changes_made",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "subject_line_used",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "subject_line_used",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "email_body",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "email_body",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "performance_delta",
              "type": "number",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "performance_delta",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "decision",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "decision",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "icp ",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "icp ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "test_variable ",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "test_variable ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "test_hypothesis ",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "test_hypothesis ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "confidence_level",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "confidence_level",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "use_case ",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "use_case ",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "test_directive",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "test_directive",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "implementation_instruction",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "implementation_instruction",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {
          "typecast": true
        },
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "id": "77pJURtbEjVETtBQ",
          "name": "Airtable Personal Access Token account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "90478127-979e-4a99-ae48-9bcd15ad54fe",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        304
      ],
      "parameters": {
        "width": 1184,
        "height": 496,
        "content": "## 更新上周数据"
      },
      "typeVersion": 1
    },
    {
      "id": "73a3a0e3-582d-4916-90b9-dbf3a6ee5f78",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1152,
        304
      ],
      "parameters": {
        "width": 528,
        "height": 496,
        "content": "## 上周分析"
      },
      "typeVersion": 1
    },
    {
      "id": "8c5c2ab1-d5ed-4282-89f2-a336fff022ad",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1696,
        304
      ],
      "parameters": {
        "width": 448,
        "height": 496,
        "content": "## 下周测试说明"
      },
      "typeVersion": 1
    },
    {
      "id": "46c405d5-e363-42d7-b166-1948d5bbf45c",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        496,
        -96
      ],
      "parameters": {
        "width": 1184,
        "height": 384,
        "content": "## 提示注入"
      },
      "typeVersion": 1
    },
    {
      "id": "479113e4-e753-40b1-ae8d-d72d7e7cda62",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1696,
        -96
      ],
      "parameters": {
        "width": 448,
        "height": 384,
        "content": "## 集成说明"
      },
      "typeVersion": 1
    },
    {
      "id": "5ca4055b-256d-423d-8a69-51ce35a0bb8b",
      "name": "拉取最近一周",
      "type": "n8n-nodes-base.code",
      "position": [
        544,
        608
      ],
      "parameters": {
        "jsCode": "// Get the record from Airtable List\nconst record = $input.all()[0].json;\n\nreturn [{\n  json: {\n    id: record.id\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "fef40f34-74c2-440d-a36a-741184d8c98c",
      "name": "数据转换",
      "type": "n8n-nodes-base.code",
      "position": [
        400,
        448
      ],
      "parameters": {
        "jsCode": "// Get ALL items (each day is a separate item)\nconst allDays = $input.all();\nlet delivered = 0;\nlet unique_opens = 0;\nlet unique_clicks = 0;\n\n// Loop through each day (each item)\nallDays.forEach(item => {\n  const day = item.json;\n  delivered += day.stats[0].metrics.delivered;\n  unique_opens += day.stats[0].metrics.unique_opens;\n  unique_clicks += day.stats[0].metrics.unique_clicks;\n});\n\n// Calculate rates from totals\nconst open_rate = delivered > 0 ? unique_opens / delivered : 0;\nconst ctr = delivered > 0 ? unique_clicks / delivered : 0;\n\nreturn [{\n  json: {\n    week_ending: new Date().toISOString(),  // ← Changed this line\n    delivered: delivered,\n    unique_opens: unique_opens,\n    unique_clicks: unique_clicks,\n    open_rate: open_rate,\n    ctr: ctr\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "cba63111-b8a7-43b1-91cd-72aab8d0af6b",
      "name": "数据合并",
      "type": "n8n-nodes-base.code",
      "position": [
        880,
        464
      ],
      "parameters": {
        "jsCode": "// Just combine the objects cleanly\nconst stats = $input.all()[0].json;\nconst recordInfo = $input.all()[1].json;\n\nreturn [{\n  json: {\n    id: recordInfo.id,\n    ...stats  // Spread all stats fields\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "7c91372e-74d2-46e3-a40a-85afb327a797",
      "name": "上周分析",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1296,
        464
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "chatgpt-4o-latest",
          "cachedResultName": "CHATGPT-4O-LATEST"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=You are an email optimization specialist analyzing historical performance patterns.\n\nPerformance data (last 4 weeks):\n{{ JSON.stringify($input.all().map(item => item.json), null, 2) }}\n\nIMPORTANT: Analyze ALL weeks for context, but base your recommendation on the MOST RECENT week's performance (the first record in the array).\n\nIMPORTANT: Each recipient only sees our email ONCE. Declining performance means our message is becoming less relevant to NEW recipients, not that people are tired of seeing it.\n\nAnalyze trends to identify ONE element to test based on the most recent week:\n- Most recent week performance is your PRIMARY focus\n- Use previous weeks for trend context only\n- Declining open rates = Subject line losing relevance to current market context/needs\n- Declining CTR = Value prop or CTA not resonating with current audience priorities  \n- Stable low metrics = Fundamental mismatch with audience expectations\n- Week-to-week variance = Inconsistent targeting or timing\n\nConsider:\n- Seasonal/temporal relevance (what's top of mind NOW?)\n- Market shifts (new competitors, trends, problems emerging)\n- Audience evolution (are we reaching different segments?)\n\nOutput a SINGLE test variable that adapts to CURRENT market conditions.\n\nFormat your response as JSON:\n{\n  \"analysis\": \"Open rates fell 15% over 3 weeks - subject line may not reflect current audience priorities\",\n  \"decision\": \"test_subject_line\",\n  \"test_variable\": \"subject_line_relevance\",\n  \"test_hypothesis\": \"Addressing current market concerns will increase relevance and open rates\",\n  \"confidence_level\": \"high\",\n  \"test_directive\": \"Reference current/timely pain point\",\n  \"implementation_instruction\": \"IMPORTANT: Frame the subject line around a problem or opportunity that's particularly relevant RIGHT NOW in your industry, not timeless benefits\",\n  \"baseline_performance\": \"12% open rate, 1.5% CTR\",\n  \"success_metric\": \"open_rate\",\n  \"target_improvement\": \"15%\"\n}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "oge162MIvDKTkyvR",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "0b834d38-c9e2-46f3-b7f2-615bce2dfab4",
      "name": "解析输出",
      "type": "n8n-nodes-base.code",
      "position": [
        1568,
        464
      ],
      "parameters": {
        "jsCode": "// Get the GPT response (should be just one item now)\nconst gptResponse = $input.first().json;\n\n// Parse the JSON content from the message\nconst analysis = JSON.parse(gptResponse.message.content);\n\n// Get the most recent week_ending from your previous data\n// This assumes you have access to the original data from Search records1\n// You may need to pass this through from an earlier node\nconst previousData = $('Search records1').first().json;\nconst lastWeekEnding = previousData.week_ending;\n\n// Calculate next week's date (7 days after the most recent week_ending)\nconst nextWeekDate = new Date(lastWeekEnding);\nnextWeekDate.setDate(nextWeekDate.getDate() + 7);\n\n// Format the date as full ISO string for Airtable\nconst weekEnding = nextWeekDate.toISOString();\n\n// Return formatted data for Airtable\nreturn [{\n  json: {\n    week_ending: weekEnding,\n    decision: analysis.decision,\n    test_variable: analysis.test_variable,\n    test_hypothesis: analysis.test_hypothesis,\n    confidence_level: analysis.confidence_level,\n    test_directive: analysis.test_directive,\n    implementation_instruction: analysis.implementation_instruction,\n    baseline_performance: analysis.baseline_performance,\n    success_metric: analysis.success_metric,\n    target_improvement: analysis.target_improvement,\n    analysis: analysis.analysis,\n    // Initialize performance metrics as 0 for the upcoming week\n    delivered: 0,\n    unique_opens: 0,\n    unique_clicks: 0,\n    open_rate: 0,\n    ctr: 0,\n    performance_delta: 0\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "dbe1a199-7f8b-4c69-b6e4-9152d3119b48",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -48,
        -96
      ],
      "parameters": {
        "width": 528,
        "height": 384,
        "content": "## 用途"
      },
      "typeVersion": 1
    },
    {
      "id": "17f731d5-650e-432d-8691-a1c1e28e4e5f",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -16,
        640
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "",
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Data Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data Merge": {
      "main": [
        [
          {
            "node": "Update record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Data X-Form": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Output": {
      "main": [
        [
          {
            "node": "Create a record",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update record": {
      "main": [
        [
          {
            "node": "Search records1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search records": {
      "main": [
        [
          {
            "node": "Pull Most Recent Week",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search records1": {
      "main": [
        [
          {
            "node": "Previous Week Analysis",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Sendgrid Data Pull",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sendgrid Data Pull": {
      "main": [
        [
          {
            "node": "Data X-Form",
            "type": "main",
            "index": 0
          },
          {
            "node": "Search records",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Pull Most Recent Week": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Previous Week Analysis": {
      "main": [
        [
          {
            "node": "Parse Output",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Sendgrid Data Pull",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量19
分类-
节点类型8
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

外部链接
在 n8n.io 查看

分享此工作流