8
n8n 中文网amn8n.com

将 Brevo 联系人报告插入 NocoDB

高级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 26 个节点。主要使用 If, Set, Code, Merge, Filter 等节点。 将 Brevo 联系人报告插入 NocoDB

前置要求
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "RVpmgXJQMYQlZLVC",
  "meta": {
    "instanceId": "c24388df44432e8ff2c4acecd7ab0dd2faec628bd83c70beb384cea105f7a50a",
    "templateCredsSetupCompleted": true
  },
  "name": "将 Brevo 联系人报告插入 NocoDB",
  "tags": [
    {
      "id": "RhAmCaLYc9EkF42I",
      "name": "n8n",
      "createdAt": "2025-08-24T08:04:35.027Z",
      "updatedAt": "2025-08-24T08:04:35.027Z"
    }
  ],
  "nodes": [
    {
      "id": "f1bdd937-0007-4634-8c4e-9e823278101d",
      "name": "获取 Brevo 联系人报告",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        420,
        200
      ],
      "parameters": {
        "url": "=https://api.brevo.com/v3/contacts/{{ $json.email }}",
        "options": {},
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "accept",
              "value": "application/json"
            }
          ]
        }
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "34IHLVlnrWdwmmdn",
          "name": "Brevo - R1"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "b7c783a8-8633-41ba-a4a9-f34c4d119076",
      "name": "拆分输出 - messagesSent",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        900,
        0
      ],
      "parameters": {
        "include": "selectedOtherFields",
        "options": {},
        "fieldToSplitOut": "statistics.messagesSent",
        "fieldsToInclude": "email"
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "e412c15b-cef6-4e9d-8818-e60ed237363e",
      "name": "拆分输出 - delivered",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        900,
        200
      ],
      "parameters": {
        "include": "selectedOtherFields",
        "options": {},
        "fieldToSplitOut": "statistics.delivered",
        "fieldsToInclude": "email"
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "91be2b24-b8e6-46a6-8f79-96c98095cf9c",
      "name": "拆分输出 - opened",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        900,
        420
      ],
      "parameters": {
        "include": "selectedOtherFields",
        "options": {},
        "fieldToSplitOut": "statistics.opened",
        "fieldsToInclude": "email"
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "7b611c7e-e07c-4e60-8ead-37c36a19c23b",
      "name": "代码",
      "type": "n8n-nodes-base.code",
      "position": [
        1340,
        0
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\n// Group by email\nconst grouped = {};\n\nfor (const item of items) {\n  const { email, campaignId, NocoDB_id } = item.json;\n\n  if (!grouped[email]) {\n    grouped[email] = {\n      email,\n      NocoDB_id,\n      messagesSent: []\n    };\n  }\n\n  grouped[email].messagesSent.push(campaignId);\n}\n\n// Convert grouped object to array\nreturn Object.values(grouped).map(entry => ({\n  json: {\n    email: entry.email,\n    NocoDB_id: entry.NocoDB_id,\n    messagesSent: entry.messagesSent.join(', ')\n  }\n}));\n"
      },
      "typeVersion": 2,
      "alwaysOutputData": true
    },
    {
      "id": "c0b9ffb3-ea28-4ea4-8390-2d30c6d888e2",
      "name": "编辑字段",
      "type": "n8n-nodes-base.set",
      "position": [
        1120,
        0
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "bc6db831-cee5-46ec-8630-2770239bbcc4",
              "name": "email",
              "type": "string",
              "value": "={{ $json.email }}"
            },
            {
              "id": "462fd57f-98c8-423b-b274-d57458d62f0d",
              "name": "campaignId",
              "type": "string",
              "value": "={{ $json[\"statistics.messagesSent\"].campaignId }}"
            },
            {
              "id": "5f04ebf3-1334-46a4-93da-10f9e8443c0d",
              "name": "NocoDB_id",
              "type": "string",
              "value": "={{ $('Insert Emails from NocoDB').item.json.Id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4,
      "alwaysOutputData": true
    },
    {
      "id": "6ddaf8a4-9240-4f67-a361-8058e2d94598",
      "name": "代码1",
      "type": "n8n-nodes-base.code",
      "position": [
        1340,
        200
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\n// Group by email\nconst grouped = {};\n\nfor (const item of items) {\n  const { email, campaignId, NocoDB_id } = item.json;\n\n  if (!grouped[email]) {\n    grouped[email] = {\n      email,\n      NocoDB_id,\n      delivered: []\n    };\n  }\n\n  grouped[email].delivered.push(campaignId);\n}\n\n// Convert grouped object to array\nreturn Object.values(grouped).map(entry => ({\n  json: {\n    email: entry.email,\n    NocoDB_id: entry.NocoDB_id,\n    delivered: entry.delivered.join(', ')\n  }\n}));\n\n"
      },
      "typeVersion": 2,
      "alwaysOutputData": true
    },
    {
      "id": "be90e0d6-71da-43ea-9a90-17785b7cb0b3",
      "name": "编辑字段2",
      "type": "n8n-nodes-base.set",
      "position": [
        1120,
        200
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "bc6db831-cee5-46ec-8630-2770239bbcc4",
              "name": "email",
              "type": "string",
              "value": "={{ $json.email }}"
            },
            {
              "id": "462fd57f-98c8-423b-b274-d57458d62f0d",
              "name": "campaignId",
              "type": "string",
              "value": "={{ $json[\"statistics.delivered\"].campaignId }}"
            },
            {
              "id": "55231970-3c3a-444c-9bdd-13e187baeb46",
              "name": "NocoDB_id",
              "type": "string",
              "value": "={{ $('Insert Emails from NocoDB').item.json.Id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4,
      "alwaysOutputData": true
    },
    {
      "id": "290f453a-cd1c-4fd1-8761-57e97ee3d371",
      "name": "Code2",
      "type": "n8n-nodes-base.code",
      "position": [
        1340,
        420
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\n// Group by email\nconst grouped = {};\n\nfor (const item of items) {\n  const { email, campaignId, NocoDB_id } = item.json;\n\n  if (!grouped[email]) {\n    grouped[email] = {\n      email,\n      NocoDB_id,\n      opened: []\n    };\n  }\n\n  grouped[email].opened.push(campaignId);\n}\n\n// Convert grouped object to array\nreturn Object.values(grouped).map(entry => ({\n  json: {\n    email: entry.email,\n    NocoDB_id: entry.NocoDB_id,\n    opened: entry.opened.join(', ')\n  }\n}));"
      },
      "typeVersion": 2,
      "alwaysOutputData": true
    },
    {
      "id": "4b0ed3c4-df99-4a79-9a7e-c9cb04e64afa",
      "name": "编辑字段3",
      "type": "n8n-nodes-base.set",
      "position": [
        1120,
        420
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "bc6db831-cee5-46ec-8630-2770239bbcc4",
              "name": "email",
              "type": "string",
              "value": "={{ $json.email }}"
            },
            {
              "id": "462fd57f-98c8-423b-b274-d57458d62f0d",
              "name": "campaignId",
              "type": "string",
              "value": "={{ $json[\"statistics.opened\"].campaignId }}"
            },
            {
              "id": "b5a653f8-4a79-487d-8535-4734a7403637",
              "name": "NocoDB_id",
              "type": "string",
              "value": "={{ $('Insert Emails from NocoDB').item.json.Id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4,
      "alwaysOutputData": true
    },
    {
      "id": "ebec351f-92a5-46a7-9c2f-e456efcea05c",
      "name": "Code3",
      "type": "n8n-nodes-base.code",
      "position": [
        1340,
        620
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\n// Group by email\nconst grouped = {};\n\nfor (const item of items) {\n  const { email, campaignId, NocoDB_id } = item.json;\n\n  if (!grouped[email]) {\n    grouped[email] = {\n      email,\n      NocoDB_id,\n      clicked: []\n    };\n  }\n\n  grouped[email].clicked.push(campaignId);\n}\n\n// Convert grouped object to array\nreturn Object.values(grouped).map(entry => ({\n  json: {\n    email: entry.email,\n    NocoDB_id: entry.NocoDB_id,\n    clicked: entry.clicked.join(', ')\n  }\n}));"
      },
      "typeVersion": 2,
      "alwaysOutputData": true
    },
    {
      "id": "da04ac69-9aaa-40dd-931b-50af87b9c7d2",
      "name": "编辑字段4",
      "type": "n8n-nodes-base.set",
      "position": [
        1120,
        620
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "bc6db831-cee5-46ec-8630-2770239bbcc4",
              "name": "email",
              "type": "string",
              "value": "={{ $json.email }}"
            },
            {
              "id": "462fd57f-98c8-423b-b274-d57458d62f0d",
              "name": "campaignId",
              "type": "string",
              "value": "={{ $json[\"statistics.clicked\"].campaignId }}"
            },
            {
              "id": "b5a653f8-4a79-487d-8535-4734a7403637",
              "name": "NocoDB_id",
              "type": "string",
              "value": "={{ $('Insert Emails from NocoDB').item.json.Id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4,
      "alwaysOutputData": true
    },
    {
      "id": "8a274188-01b8-4f7b-b198-c30f718d7f7a",
      "name": "计划触发器",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -640,
        200
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "seconds",
              "secondsInterval": 2
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "392bc93d-c0b7-4b60-9a70-b7f72b384190",
      "name": "拆分输出 - clicked",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        900,
        620
      ],
      "parameters": {
        "include": "selectedOtherFields",
        "options": {},
        "fieldToSplitOut": "statistics.clicked",
        "fieldsToInclude": "email"
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "4a346547-a479-4c00-bc53-7a772c64817d",
      "name": "检查邮箱是否已插入",
      "type": "n8n-nodes-base.filter",
      "position": [
        -100,
        200
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "3db8b002-7c4b-466b-aad5-2a54061a13c4",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.done }}",
              "rightValue": "1"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "710df017-88a4-4745-b1c3-5e719c863618",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        1700,
        240
      ],
      "parameters": {
        "numberInputs": 4
      },
      "typeVersion": 3.1
    },
    {
      "id": "3b978621-20e0-4704-8b9f-2ea846a51970",
      "name": "删除空值",
      "type": "n8n-nodes-base.code",
      "position": [
        1920,
        260
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\n// Group by email\nconst grouped = {};\n\nfor (const item of items) {\n  const { email, NocoDB_id, messagesSent, delivered, opened, clicked } = item.json;\n\n  if (!grouped[email]) {\n    grouped[email] = {\n      email,\n      NocoDB_id,\n      messagesSent: [],\n      delivered: [],\n      opened: [],\n      clicked: []\n    };\n  }\n\n  if (messagesSent) grouped[email].messagesSent.push(messagesSent);\n  if (delivered) grouped[email].delivered.push(delivered);\n  if (opened) grouped[email].opened.push(opened);\n  if (clicked) grouped[email].clicked.push(clicked);\n}\n\n// Merge arrays and clean duplicates if needed\nreturn Object.values(grouped).map(entry => ({\n  json: {\n    email: entry.email,\n    NocoDB_id: entry.NocoDB_id,\n    messagesSent: entry.messagesSent.join(', '),\n    delivered: entry.delivered.join(', '),\n    opened: entry.opened.join(', '),\n    clicked: entry.clicked.join(', ')\n  }\n}));\n"
      },
      "typeVersion": 2
    },
    {
      "id": "3679a580-22c5-4e15-a80f-cca5adec92e6",
      "name": "更新 NocoDB",
      "type": "n8n-nodes-base.nocoDb",
      "position": [
        2160,
        260
      ],
      "parameters": {
        "table": "mz06ar1jy2ca287",
        "fieldsUi": {
          "fieldValues": [
            {
              "fieldName": "=id",
              "fieldValue": "={{ $json.NocoDB_id }}"
            },
            {
              "fieldName": "messagesSent",
              "fieldValue": "={{ $json.messagesSent }}"
            },
            {
              "fieldName": "delivered",
              "fieldValue": "={{ $json.delivered }}"
            },
            {
              "fieldName": "opened",
              "fieldValue": "={{ $json.opened }}"
            },
            {
              "fieldName": "clicked",
              "fieldValue": "={{ $json.clicked }}"
            },
            {
              "fieldName": "done",
              "fieldValue": "1"
            }
          ]
        },
        "operation": "update",
        "projectId": "px9vf43y9cqtdog",
        "authentication": "nocoDbApiToken"
      },
      "credentials": {
        "nocoDbApiToken": {
          "id": "OmiCzu1TOrJhZRIa",
          "name": "NocoDB Token account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "e5afe8d6-2c68-424b-af72-705c780b9540",
      "name": "如果邮箱被列入黑名单",
      "type": "n8n-nodes-base.if",
      "position": [
        620,
        200
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "876210df-2bd6-4d0d-88e0-81bda85d2bbe",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.emailBlacklisted }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "0381c270-7dfe-4924-be5c-d89830f15a83",
      "name": "循环",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        160,
        200
      ],
      "parameters": {
        "options": {},
        "batchSize": 10
      },
      "typeVersion": 3
    },
    {
      "id": "150da896-16ec-49d6-8680-50fde2aabaab",
      "name": "更新 NocoDB - 黑名单",
      "type": "n8n-nodes-base.nocoDb",
      "position": [
        900,
        940
      ],
      "parameters": {
        "table": "mz06ar1jy2ca287",
        "fieldsUi": {
          "fieldValues": [
            {
              "fieldName": "=id",
              "fieldValue": "={{ $('Loop').item.json.Id }}"
            },
            {
              "fieldName": "blacklisted",
              "fieldValue": "=1"
            },
            {
              "fieldName": "done",
              "fieldValue": "1"
            }
          ]
        },
        "operation": "update",
        "projectId": "px9vf43y9cqtdog",
        "authentication": "nocoDbApiToken"
      },
      "credentials": {
        "nocoDbApiToken": {
          "id": "OmiCzu1TOrJhZRIa",
          "name": "NocoDB Token account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "554932b4-e8be-4aed-8dec-6324ee6e4303",
      "name": "从 NocoDB 插入邮箱",
      "type": "n8n-nodes-base.nocoDb",
      "position": [
        -360,
        200
      ],
      "parameters": {
        "table": "mz06ar1jy2ca287",
        "options": {},
        "operation": "getAll",
        "projectId": "px9vf43y9cqtdog",
        "returnAll": true,
        "authentication": "nocoDbApiToken"
      },
      "credentials": {
        "nocoDbApiToken": {
          "id": "OmiCzu1TOrJhZRIa",
          "name": "NocoDB Token account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "548a4011-00df-4ea0-b1a6-6f6e98428756",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -420,
        -180
      ],
      "parameters": {
        "color": 5,
        "height": 560,
        "content": "## **从 NocoDB 插入邮箱**"
      },
      "typeVersion": 1
    },
    {
      "id": "be3d163d-95df-4248-bbdd-8f8b00ead6e7",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        340,
        -180
      ],
      "parameters": {
        "color": 5,
        "height": 560,
        "content": "## **获取 Brevo 联系人报告**"
      },
      "typeVersion": 1
    },
    {
      "id": "4ffd304f-6f3a-42d8-8ae8-72e0fa9c9624",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        840,
        -280
      ],
      "parameters": {
        "color": 5,
        "height": 1080,
        "content": "## **拆分输出节点**"
      },
      "typeVersion": 1
    },
    {
      "id": "83e22d4b-64de-4e68-99e7-034429813769",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1260,
        -280
      ],
      "parameters": {
        "color": 5,
        "height": 1080,
        "content": "## **代码节点**"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {
    "Get Brevo Contact Report": [
      {
        "json": {
          "id": 222683,
          "email": "nimasalimi42@gmail.com",
          "listIds": [
            15,
            138,
            163,
            150,
            149,
            153,
            178,
            181,
            182,
            187
          ],
          "createdAt": "2024-03-18T10:02:10.584+03:30",
          "attributes": {
            "SMS": "989939116065",
            "LASTNAME": "Salimi",
            "FIRSTNAME": "Nima Salimi",
            "SIGNUP_DATE": "2024-03-08",
            "CONTRACT_NUMBER": "2024-03-08"
          },
          "modifiedAt": "2025-09-25T08:30:05.415+03:30",
          "statistics": {
            "opened": [
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-10-05T01:25:30.837+03:30",
                "campaignId": 201
              },
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-10-05T01:25:20.615+03:30",
                "campaignId": 197
              },
              {
                "ip": "213.32.72.225",
                "count": 3,
                "eventTime": "2025-09-02T08:33:56.380+03:30",
                "campaignId": 452
              },
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-09-26T20:43:41.178+03:30",
                "campaignId": 488
              },
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-09-16T10:11:06.934+03:30",
                "campaignId": 466
              },
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-09-15T16:26:03.461+03:30",
                "campaignId": 464
              },
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-09-15T14:28:47.115+03:30",
                "campaignId": 467
              },
              {
                "ip": "213.32.72.225",
                "count": 3,
                "eventTime": "2025-08-30T17:09:04.573+03:30",
                "campaignId": 451
              },
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-08-21T03:03:54.974+03:30",
                "campaignId": 445
              },
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-08-02T12:02:46.910+03:30",
                "campaignId": 427
              },
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-07-29T14:12:04.266+03:30",
                "campaignId": 424
              },
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-07-27T14:59:27.048+03:30",
                "campaignId": 421
              },
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-07-22T15:57:04.210+03:30",
                "campaignId": 417
              },
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-07-16T01:34:30.129+03:30",
                "campaignId": 419
              },
              {
                "ip": "213.32.72.225",
                "count": 2,
                "eventTime": "2025-07-13T17:27:20.755+03:30",
                "campaignId": 416
              }
            ],
            "clicked": [
              {
                "links": [
                  {
                    "ip": "213.32.72.225",
                    "url": "https://arvancloud.porsline.ir/s/3fYwicb",
                    "count": 1,
                    "eventTime": "2025-08-21T03:03:58.152+03:30"
                  }
                ],
                "campaignId": 445
              },
              {
                "links": [
                  {
                    "ip": "213.32.72.225",
                    "url": "https://academy.arvancloud.ir/courses/professional-cloud-architect/?utm_source=brevo&utm_campaign=Academy-advance-courses-published&utm_medium=email",
                    "count": 1,
                    "eventTime": "2025-08-02T12:03:18.092+03:30"
                  },
                  {
                    "ip": "213.32.72.225",
                    "url": "https://academy.arvancloud.ir/courses/expert-devops-engineer/?utm_source=brevo&utm_campaign=Academy-advance-courses-published&utm_medium=email",
                    "count": 1,
                    "eventTime": "2025-08-02T12:03:05.973+03:30"
                  },
                  {
                    "ip": "213.32.72.225",
                    "url": "https://academy.arvancloud.ir/?utm_source=brevo&utm_campaign=Academy-advance-courses-published&utm_medium=email",
                    "count": 2,
                    "eventTime": "2025-08-02T12:03:00.763+03:30"
                  }
                ],
                "campaignId": 427
              }
            ],
            "delivered": [
              {
                "eventTime": "2025-09-25T08:30:12.287+03:30",
                "campaignId": 488
              },
              {
                "eventTime": "2025-09-16T10:10:49.863+03:30",
                "campaignId": 466
              },
              {
                "eventTime": "2025-09-15T11:38:11.379+03:30",
                "campaignId": 467
              },
              {
                "eventTime": "2025-09-13T11:36:44.627+03:30",
                "campaignId": 464
              },
              {
                "eventTime": "2025-09-02T08:33:28.607+03:30",
                "campaignId": 452
              },
              {
                "eventTime": "2025-08-30T14:36:30.188+03:30",
                "campaignId": 451
              },
              {
                "eventTime": "2025-08-20T12:36:20.277+03:30",
                "campaignId": 445
              },
              {
                "eventTime": "2025-08-02T11:24:54.085+03:30",
                "campaignId": 427
              },
              {
                "eventTime": "2025-07-29T13:46:33.238+03:30",
                "campaignId": 424
              },
              {
                "eventTime": "2025-07-27T12:03:02.137+03:30",
                "campaignId": 421
              },
              {
                "eventTime": "2025-07-22T13:35:38.311+03:30",
                "campaignId": 417
              },
              {
                "eventTime": "2025-07-15T12:37:27.123+03:30",
                "campaignId": 419
              },
              {
                "eventTime": "2025-07-13T11:48:57.976+03:30",
                "campaignId": 416
              }
            ],
            "messagesSent": [
              {
                "eventTime": "2025-09-25T08:30:05.355+03:30",
                "campaignId": 488
              },
              {
                "eventTime": "2025-09-16T10:01:43.465+03:30",
                "campaignId": 466
              },
              {
                "eventTime": "2025-09-15T11:33:29.495+03:30",
                "campaignId": 467
              },
              {
                "eventTime": "2025-09-13T11:32:18.287+03:30",
                "campaignId": 464
              },
              {
                "eventTime": "2025-09-02T08:30:36.082+03:30",
                "campaignId": 452
              },
              {
                "eventTime": "2025-08-30T14:33:10.606+03:30",
                "campaignId": 451
              },
              {
                "eventTime": "2025-08-20T12:35:18.227+03:30",
                "campaignId": 445
              },
              {
                "eventTime": "2025-08-02T11:16:29.133+03:30",
                "campaignId": 427
              },
              {
                "eventTime": "2025-07-29T11:46:22.433+03:30",
                "campaignId": 424
              },
              {
                "eventTime": "2025-07-27T12:02:59.183+03:30",
                "campaignId": 421
              },
              {
                "eventTime": "2025-07-22T13:32:38.477+03:30",
                "campaignId": 417
              },
              {
                "eventTime": "2025-07-15T12:37:08.756+03:30",
                "campaignId": 419
              },
              {
                "eventTime": "2025-07-13T11:48:41.345+03:30",
                "campaignId": 416
              }
            ]
          },
          "smsBlacklisted": false,
          "emailBlacklisted": false
        }
      },
      {
        "json": {
          "id": 229467,
          "email": "nima.r1cloud@gmail.com",
          "listIds": [
            15
          ],
          "createdAt": "2024-06-11T13:26:56.723+03:30",
          "attributes": {
            "FIRSTNAME": "نیما آروان",
            "SIGNUP_DATE": "2024-05-24"
          },
          "modifiedAt": "2025-09-24T12:46:09.936+03:30",
          "statistics": {
            "opened": [
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-10-05T01:26:35.245+03:30",
                "campaignId": 369
              },
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-10-05T01:26:21.639+03:30",
                "campaignId": 316
              },
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-09-24T14:11:16.981+03:30",
                "campaignId": 487
              },
              {
                "ip": "213.32.72.225",
                "count": 3,
                "eventTime": "2025-09-16T18:16:02.910+03:30",
                "campaignId": 424
              },
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-09-16T18:16:13.758+03:30",
                "campaignId": 430
              },
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-09-15T13:18:01.766+03:30",
                "campaignId": 467
              },
              {
                "ip": "213.32.72.225",
                "count": 1,
                "eventTime": "2025-09-06T12:44:12.488+03:30",
                "campaignId": 458
              }
            ],
            "clicked": [
              {
                "links": [
                  {
                    "ip": "213.32.72.225",
                    "url": "https://try.arvancloud.ir/fa/elecomp?utm_source=brevo&utm_campaign=Elecomp 1404_Fixed&utm_medium=email",
                    "count": 1,
                    "eventTime": "2025-09-24T14:11:53.716+03:30"
                  }
                ],
                "campaignId": 487
              },
              {
                "links": [
                  {
                    "ip": "213.32.72.225",
                    "url": "https://www.arvancloud.ir/fa/devops?utm_source=brevo&utm_campaign=implementing infrastructure projects with ArvanCloud DevOps&utm_medium=email",
                    "count": 2,
                    "eventTime": "2025-09-21T18:56:19.519+03:30"
                  }
                ],
                "campaignId": 424
              }
            ],
            "delivered": [
              {
                "eventTime": "2025-09-24T12:47:32.055+03:30",
                "campaignId": 487
              },
              {
                "eventTime": "2025-09-15T11:44:06.257+03:30",
                "campaignId": 467
              },
              {
                "eventTime": "2025-09-06T08:36:09.528+03:30",
                "campaignId": 458
              },
              {
                "eventTime": "2025-08-30T14:34:22.044+03:30",
                "campaignId": 451
              },
              {
                "eventTime": "2025-08-02T16:05:54.796+03:30",
                "campaignId": 430
              },
              {
                "eventTime": "2025-07-29T12:04:30.371+03:30",
                "campaignId": 424
              }
            ],
            "messagesSent": [
              {
                "eventTime": "2025-09-24T12:46:09.914+03:30",
                "campaignId": 487
              },
              {
                "eventTime": "2025-09-15T11:33:29.565+03:30",
                "campaignId": 467
              },
              {
                "eventTime": "2025-09-06T07:30:39.781+03:30",
                "campaignId": 458
              },
              {
                "eventTime": "2025-08-30T14:33:12.453+03:30",
                "campaignId": 451
              },
              {
                "eventTime": "2025-08-02T16:04:34.417+03:30",
                "campaignId": 430
              },
              {
                "eventTime": "2025-07-29T12:01:58.253+03:30",
                "campaignId": 424
              }
            ]
          },
          "smsBlacklisted": false,
          "emailBlacklisted": false
        }
      }
    ]
  },
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "2a211b45-06c9-4f7c-be20-af3d49727a20",
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop": {
      "main": [
        [],
        [
          {
            "node": "Get Brevo Contact Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code1": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Code2": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Code3": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Merge": {
      "main": [
        [
          {
            "node": "Delete Nulls",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Delete Nulls": {
      "main": [
        [
          {
            "node": "Update NocoDB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields2": {
      "main": [
        [
          {
            "node": "Code1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields3": {
      "main": [
        [
          {
            "node": "Code2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields4": {
      "main": [
        [
          {
            "node": "Code3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update NocoDB": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Insert Emails from NocoDB",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out - opened": {
      "main": [
        [
          {
            "node": "Edit Fields3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out - clicked": {
      "main": [
        [
          {
            "node": "Edit Fields4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Email Blacklisted": {
      "main": [
        [
          {
            "node": "Update NocoDB - blacklisted",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Split Out - messagesSent",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Out - delivered",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Out - opened",
            "type": "main",
            "index": 0
          },
          {
            "node": "Split Out - clicked",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out - delivered": {
      "main": [
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Brevo Contact Report": {
      "main": [
        [
          {
            "node": "If Email Blacklisted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out - messagesSent": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Insert Emails from NocoDB": {
      "main": [
        [
          {
            "node": "Check if Email is Inserted Before",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Email is Inserted Before": {
      "main": [
        [
          {
            "node": "Loop",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 内容创作, 多模态 AI

需要付费吗?

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

工作流信息
难度等级
高级
节点数量26
分类2
节点类型11
难度说明

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

作者
Nima Salimi

Nima Salimi

@salimi

With a deep understanding of marketing processes and data flows, I create solutions that streamline user engagement, campaign management, and data synchronization across multiple platforms. My goal is to help businesses reduce manual effort, improve accuracy, and accelerate their marketing initiatives through smart automation.

外部链接
在 n8n.io 查看

分享此工作流