8
n8n 中文网amn8n.com

Facebook广告竞品创意分析与自动邮件报告

高级

这是一个AI, Marketing领域的自动化工作流,包含 31 个节点。主要使用 Set, Wait, Gmail, Limit, Merge 等节点,结合人工智能技术实现智能自动化。 使用AI(GPT-4和Gemini)分析竞争对手Facebook广告并生成邮件报告

前置要求
  • Google 账号和 Gmail API 凭证
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "bfb4y4EW4tvOM17G",
  "meta": {
    "instanceId": "a943fc71a4dfb51cc3424882233bcd72e7a73857958af1cf464f7c21580c726e",
    "templateCredsSetupCompleted": true
  },
  "name": "Facebook 广告竞品创意分析与自动邮件报告",
  "tags": [
    {
      "id": "bjzc8PEM2FgX8rUa",
      "name": "Marketing",
      "createdAt": "2025-04-18T13:34:48.192Z",
      "updatedAt": "2025-04-18T13:34:48.192Z"
    },
    {
      "id": "OiWw6VmsJz6ZBAzz",
      "name": "AI",
      "createdAt": "2025-04-25T09:59:58.961Z",
      "updatedAt": "2025-04-25T09:59:58.961Z"
    }
  ],
  "nodes": [
    {
      "id": "284c0970-9c29-43f2-bd45-dc76aef8b878",
      "name": "抓取广告",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -520,
        1600
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "5a26c1ee-39be-4945-9b55-8ce58e511f10",
      "name": "合并媒体结果",
      "type": "n8n-nodes-base.merge",
      "position": [
        800,
        1620
      ],
      "parameters": {},
      "typeVersion": 3.1
    },
    {
      "id": "db54ffff-9cf0-4be5-9878-53a94de3eefc",
      "name": "OpenAI 聊天模型",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        860,
        2140
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "2e34008c-7747-4319-99a2-9c1fec5b550d",
      "name": "自动修复输出解析器",
      "type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
      "position": [
        1020,
        1980
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "def3f940-0bb3-45f8-972b-20f1a42796b4",
      "name": "多表:您可以连接多个表以实现有组织的数据结构",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1120,
        2140
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "dfe34ace-d0ce-4c38-99c0-b21bc461dc35",
      "name": "聚合",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1020,
        1620
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6a633e25-6e39-4635-a1b6-c4ffcc6e7c5a",
      "name": "AI 代理",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        800,
        1820
      ],
      "parameters": {},
      "typeVersion": 1.9
    },
    {
      "id": "7e747366-0aeb-4ae4-9bae-f3cb1a5ebac5",
      "name": "发送最佳职位推荐邮件",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1660,
        1820
      ],
      "webhookId": "757fc280-9123-474c-92c6-e3790477fbde",
      "parameters": {},
      "typeVersion": 2.1
    },
    {
      "id": "5609c7c3-40cb-4901-bc57-11674ea7dccb",
      "name": "选择图片字段",
      "type": "n8n-nodes-base.set",
      "position": [
        460,
        1440
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "8823029c-e4a5-419a-8dbe-7bf2d5b9c9cb",
      "name": "分离图片广告与视频广告",
      "type": "n8n-nodes-base.switch",
      "position": [
        -300,
        1600
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "d3eccca1-e388-4801-838a-7ca6ba0cf860",
      "name": "选择视频字段",
      "type": "n8n-nodes-base.set",
      "position": [
        500,
        2360
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "85daf48d-8600-4a76-8743-c792d6bcec92",
      "name": "下载视频",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        40,
        2160
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "310162af-350d-4331-8792-ae4d051bb141",
      "name": "上传视频到 Gemini",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        260,
        2160
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "d4b8f151-1348-48d7-9f44-c6c38e84ffa2",
      "name": "通过 Gemini 分析视频",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        260,
        2360
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "bb529f0b-045c-4bec-b9f7-2b9e80e0a6cf",
      "name": "等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        40,
        2360
      ],
      "webhookId": "ece4480b-9958-46cb-b2e1-60ba9b3c2f07",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "687f49c8-7207-4d3d-bcdd-bc04f4f98cae",
      "name": "Analyze Image",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        40,
        1440
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "38243724-cd80-49cd-a246-72f68723ec7c",
      "name": "将所有广告信息合并为单个文本字符串",
      "type": "n8n-nodes-base.set",
      "position": [
        1240,
        1620
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "55ebf877-d6df-4479-bdbf-8c59386f4aaa",
      "name": "图片去重键",
      "type": "n8n-nodes-base.set",
      "position": [
        40,
        1240
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "a0b081dd-8b88-468f-b3c5-fb5a46476839",
      "name": "图片去重键",
      "type": "n8n-nodes-base.set",
      "position": [
        40,
        1940
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "f80191b8-45f9-4949-8779-14815de6ed0c",
      "name": "图片去重",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        240,
        1240
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "67d1dab8-9d8c-410e-985b-b9138c4db165",
      "name": "视频去重",
      "type": "n8n-nodes-base.removeDuplicates",
      "position": [
        260,
        1940
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "e6e78040-8197-4520-988c-77dd5061c29c",
      "name": "图片限制 5 条",
      "type": "n8n-nodes-base.limit",
      "position": [
        460,
        1240
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6b75b522-e4c6-420b-ad14-198a5917a8f1",
      "name": "视频限制 5 条",
      "type": "n8n-nodes-base.limit",
      "position": [
        480,
        1940
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "5cc72130-31cf-4ca4-875b-62ccc276ca09",
      "name": "表单提交时",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -860,
        1600
      ],
      "webhookId": "096d58c1-b5ef-4007-bbff-f4a6324d9d9c",
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "82e0ad0c-f768-4034-bde6-0ec7e7fe0392",
      "name": "介绍说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1000,
        840
      ],
      "parameters": {
        "content": "确保您的表名与实际知识库结构匹配"
      },
      "typeVersion": 1
    },
    {
      "id": "8a9daffb-8bd0-4e85-a0e5-9ef15fa57108",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1000,
        1360
      ],
      "parameters": {
        "content": "确保您的表名与实际知识库结构匹配"
      },
      "typeVersion": 1
    },
    {
      "id": "fe330620-4cbf-461d-a998-c221c2b05403",
      "name": "数据收集说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -580,
        1360
      ],
      "parameters": {
        "content": "确保您的表名与实际知识库结构匹配"
      },
      "typeVersion": 1
    },
    {
      "id": "dd192f4e-e972-4db1-babe-db900fc29438",
      "name": "图片分析说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        960
      ],
      "parameters": {
        "content": "确保您的表名与实际知识库结构匹配"
      },
      "typeVersion": 1
    },
    {
      "id": "47a1e7ef-7e02-44d6-bf12-98203b54d8c8",
      "name": "视频分析说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -20,
        1640
      ],
      "parameters": {
        "content": "确保您的表名与实际知识库结构匹配"
      },
      "typeVersion": 1
    },
    {
      "id": "46173dd0-fc02-4064-a90d-791f44741f56",
      "name": "分析说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        1400
      ],
      "parameters": {
        "content": "确保您的表名与实际知识库结构匹配"
      },
      "typeVersion": 1
    },
    {
      "id": "1676be5e-15c5-456f-b0a4-bac9ea6ed65b",
      "name": "报告说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1480,
        1520
      ],
      "parameters": {
        "content": "确保您的表名与实际知识库结构匹配"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "39a3962c-b947-424c-9c64-37742ba85972",
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Analyze video Gemini",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "Email the top job recommendations",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Combine all Ads information into a single text string",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape ads": {
      "main": [
        [
          {
            "node": "Split Image Ads & Video Ads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Image": {
      "main": [
        [
          {
            "node": "Select Image Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image Limit 5": {
      "main": [
        [
          {
            "node": "Analyze Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video Limit 5": {
      "main": [
        [
          {
            "node": "Download video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download video": {
      "main": [
        [
          {
            "node": "Upload video Gemini",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Merge Media Result": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "On form submission": {
      "main": [
        [
          {
            "node": "Scrape ads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image Duplicate Key": {
      "main": [
        [
          {
            "node": "Video Remove Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image duplicate key": {
      "main": [
        [
          {
            "node": "Image Remove Duplicates",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select Image Fields": {
      "main": [
        [
          {
            "node": "Merge Media Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Select Video Fields": {
      "main": [
        [
          {
            "node": "Merge Media Result",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Upload video Gemini": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze video Gemini": {
      "main": [
        [
          {
            "node": "Select Video Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image Remove Duplicates": {
      "main": [
        [
          {
            "node": "Image Limit 5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video Remove Duplicates": {
      "main": [
        [
          {
            "node": "Video Limit 5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Auto-fixing Output Parser",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Auto-fixing Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Split Image Ads & Video Ads": {
      "main": [
        [
          {
            "node": "Image duplicate key",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Image Duplicate Key",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine all Ads information into a single text string": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 人工智能, 营销

需要付费吗?

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

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

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

作者
SamirLiu

SamirLiu

@samir

Seasoned Data Engineer with over 8 years of experience in digital marketing analytics and workflow automation. Expert in leveraging tools like n8n, Python, and SQL to streamline data integration and optimize operational efficiency. Passionate about enhancing productivity through innovative automation strategies.

外部链接
在 n8n.io 查看

分享此工作流