8
n8n 中文网amn8n.com

Meta广告批量启动器(集成Google Drive和Slack通知)V1.2

高级

这是一个Social Media领域的自动化工作流,包含 40 个节点。主要使用 If, Set, Code, Wait, Merge 等节点。 集成Google Drive和Slack通知的Meta广告批量启动器

前置要求
  • Slack Bot Token 或 Webhook URL
  • Google Drive API 凭证
  • Google Sheets API 凭证
  • Facebook Graph API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "ChsHh4ykd2PgT6zf",
  "meta": {
    "instanceId": "efe08e2da7cae43f565dfacaafdb0e67025886141ccd3ddbe001880f7b5ecf5b"
  },
  "name": "Meta广告批量启动器(集成Google Drive和Slack通知)V1.2",
  "tags": [
    {
      "id": "ru3nGmhVWeK43ehH",
      "name": "Templates",
      "createdAt": "2025-09-10T08:51:06.438Z",
      "updatedAt": "2025-09-10T08:51:06.438Z"
    }
  ],
  "nodes": [
    {
      "id": "f08b5b96-d46b-4bed-a23d-85b698fdd281",
      "name": "重命名图片二进制文件为顶部图片1",
      "type": "n8n-nodes-base.code",
      "position": [
        -192,
        416
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "7f7aa9ca-05f4-4dde-865d-02b5d0ab4693",
      "name": "发布到Facebook1",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        160,
        560
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 1,
      "waitBetweenTries": 5000
    },
    {
      "id": "0ae0f432-3a95-459d-8a3d-ed47fcc84fba",
      "name": "重命名图片二进制文件为顶部图片",
      "type": "n8n-nodes-base.code",
      "position": [
        -192,
        224
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "4cb8160a-4b28-4bf4-a1b4-34e4de0b003d",
      "name": "发布到Facebook",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        0,
        0
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 1,
      "waitBetweenTries": 5000
    },
    {
      "id": "22194c2a-e70a-4faa-a6e4-43881949d12c",
      "name": "为图片创建广告创意",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        432,
        176
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 1,
      "waitBetweenTries": 5000
    },
    {
      "id": "16b01206-587b-4e5b-8051-484c7663229e",
      "name": "为视频创建广告创意",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        432,
        416
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 1,
      "waitBetweenTries": 5000
    },
    {
      "id": "38f463bd-464a-422f-aee4-674cd51a6ac4",
      "name": "将广告创意与广告组关联",
      "type": "n8n-nodes-base.facebookGraphApi",
      "maxTries": 5,
      "position": [
        992,
        720
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 1,
      "waitBetweenTries": 5000
    },
    {
      "id": "586fb6cd-32fe-432b-a20a-f8916dac51ba",
      "name": "遍历项目",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        16,
        448
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "e4dc2768-686d-41f9-89c3-ef0c5738aaf2",
      "name": "等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        368,
        560
      ],
      "webhookId": "7515c8c7-9e6f-451d-a389-2008e4ae5326",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "e98da260-d32d-4f51-8279-0581b445f22d",
      "name": "Loop Over Items1",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        16,
        208
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "f964878b-2b74-4602-a43b-ada248eb9654",
      "name": "等待1",
      "type": "n8n-nodes-base.wait",
      "position": [
        192,
        0
      ],
      "webhookId": "089218da-22be-47e8-a7f2-a01f904a4446",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "24ab36c9-26bf-48f5-98dc-dc690490c34c",
      "name": "错误触发器",
      "type": "n8n-nodes-base.errorTrigger",
      "position": [
        -1936,
        720
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "4a70ac96-0453-4d54-af86-2d23a0d79359",
      "name": "停止并报错",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        -560,
        544
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "7cce0728-bb37-442d-8e82-f4db755e2a25",
      "name": "错误 - 文件名",
      "type": "n8n-nodes-base.slack",
      "position": [
        -688,
        544
      ],
      "webhookId": "816ffcbd-a473-447b-b7c3-96b293c384a9",
      "parameters": {},
      "executeOnce": true,
      "typeVersion": 2.3
    },
    {
      "id": "391f3d9e-6a1d-4bbb-94c2-496d7723cac5",
      "name": "错误 - 常规",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1712,
        720
      ],
      "webhookId": "0f698637-5974-41cf-a4e2-0e161925478c",
      "parameters": {},
      "typeVersion": 2.3
    },
    {
      "id": "aa0dd79f-4cd7-48a9-9736-ae87eec6caba",
      "name": "创建广告组(7dc1dv)",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        -1072,
        976
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 1
    },
    {
      "id": "b97e5231-2278-400b-ae48-fcb1b6e48514",
      "name": "创建广告组(7dc)",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        -1072,
        784
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 1
    },
    {
      "id": "6c0d6aad-1b4a-4620-9a10-5fb8a8251582",
      "name": "创建广告组(1dc)",
      "type": "n8n-nodes-base.facebookGraphApi",
      "position": [
        -1072,
        624
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 1
    },
    {
      "id": "63dc1b01-d31b-4352-a4f3-64fd0fd99fa5",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2224,
        336
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "60f26341-ad70-45cb-8669-69ef9ff5fc48",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1744,
        272
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "98d1458f-689a-4c0b-8c1a-ab7404d1f6bd",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2544,
        48
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "d16f649a-4e08-42e3-b6c7-6e01649d5c66",
      "name": "提交表单",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -2160,
        480
      ],
      "webhookId": "96969982-2e82-42a5-a52a-ee7a48610c68",
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "a16542c8-b3ec-4d5e-9d60-caa7f957e9ac",
      "name": "格式化广告文案",
      "type": "n8n-nodes-base.code",
      "position": [
        -1904,
        480
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "7775f248-16f7-4cd7-ab9e-f65b6533be5a",
      "name": "获取广告账户ID",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1680,
        480
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 4.5,
      "waitBetweenTries": 5000
    },
    {
      "id": "8d2a674d-dbc7-42e7-b8c6-08cc8f78fafc",
      "name": "确认广告账户",
      "type": "n8n-nodes-base.filter",
      "position": [
        -1472,
        480
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "a420f9bb-53ba-40dc-92bc-2c7d34938553",
      "name": "分析文件夹",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -1248,
        320
      ],
      "parameters": {},
      "typeVersion": 3,
      "alwaysOutputData": true
    },
    {
      "id": "b078e602-1d08-478c-90e5-4989b2520c81",
      "name": "检查命名",
      "type": "n8n-nodes-base.if",
      "position": [
        -1072,
        240
      ],
      "parameters": {},
      "typeVersion": 2.2,
      "alwaysOutputData": false
    },
    {
      "id": "7e2f7162-9891-4740-879c-41efa19cc2f5",
      "name": "无文件夹访问权限",
      "type": "n8n-nodes-base.stopAndError",
      "position": [
        -896,
        144
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "36a43ace-02bb-4e9d-bbf0-f3fc705a40d8",
      "name": "下载文件",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -896,
        304
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "41a304d0-6cca-4b15-99e9-02122a090776",
      "name": "视频或图片",
      "type": "n8n-nodes-base.switch",
      "position": [
        -720,
        320
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "0207358b-6d99-437a-a058-ae2348c07ebd",
      "name": "格式化命名 - 视频",
      "type": "n8n-nodes-base.set",
      "position": [
        -416,
        416
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "742e7ea6-ea2e-4557-8a97-9616274410d9",
      "name": "格式化命名 - 图片",
      "type": "n8n-nodes-base.set",
      "position": [
        -416,
        224
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "71ac4b28-3564-4a29-980b-022777676983",
      "name": "选择正确归因",
      "type": "n8n-nodes-base.switch",
      "position": [
        -1312,
        784
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "6c642fff-8d3c-4636-ac85-b3d6c85e4029",
      "name": "格式化ID",
      "type": "n8n-nodes-base.set",
      "position": [
        -848,
        768
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "5a05bf4a-1924-446f-b63d-9cfcd45d7597",
      "name": "合并创意",
      "type": "n8n-nodes-base.merge",
      "position": [
        640,
        320
      ],
      "parameters": {},
      "typeVersion": 3,
      "alwaysOutputData": true
    },
    {
      "id": "b548d36d-610e-4010-9972-587b0011aa1b",
      "name": "全部合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        768,
        720
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "1b6a43f2-290b-426d-82bf-1c78fb51a197",
      "name": "成功通知",
      "type": "n8n-nodes-base.slack",
      "position": [
        1216,
        720
      ],
      "webhookId": "0a12f1b7-4eff-4ad7-8131-f28896ed687b",
      "parameters": {},
      "executeOnce": true,
      "notesInFlow": false,
      "typeVersion": 2.3
    },
    {
      "id": "08ba98b3-684d-4d6e-8be3-757397c9a32c",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3472,
        352
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "42d4baed-b379-41b5-a96b-734ed5b0bf64",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3056,
        352
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "da84b6bb-a2c1-4567-8735-c7cf1f052386",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2640,
        352
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "8d4d2fa8-1eb3-4fd7-98f7-7e8607b35317",
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait1": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format ID": {
      "main": [
        [
          {
            "node": "Merge All",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Merge All": {
      "main": [
        [
          {
            "node": "linking ad_creatives with adsets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Submit Form": {
      "main": [
        [
          {
            "node": "Format Ad Copy",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Naming": {
      "main": [
        [
          {
            "node": "No Access to Folder",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Download Files",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error Trigger": {
      "main": [
        [
          {
            "node": "Error - General",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Folder": {
      "main": [
        [
          {
            "node": "Check Naming",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Files": {
      "main": [
        [
          {
            "node": "Video or Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Ad Copy": {
      "main": [
        [
          {
            "node": "Get Ad Account ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Creative": {
      "main": [
        [
          {
            "node": "Merge All",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Video or Image": {
      "main": [
        [
          {
            "node": "Format Naming - Image",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Format Naming - Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Error - Filename",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [
          {
            "node": "Creating ad_Creatives for videos",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Publish to Facebook1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Error - Filename": {
      "main": [
        [
          {
            "node": "Stop and Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items1": {
      "main": [
        [
          {
            "node": "Creating ad_Creatives for images",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Publish to Facebook",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Ad Account ID": {
      "main": [
        [
          {
            "node": "Confirm Ad Account",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Confirm Ad Account": {
      "main": [
        [
          {
            "node": "Analyze Folder",
            "type": "main",
            "index": 0
          },
          {
            "node": "Choose Correct Attribution",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Ad_set (1dc)": {
      "main": [
        [
          {
            "node": "Format ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Ad_set (7dc)": {
      "main": [
        [
          {
            "node": "Format ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish to Facebook": {
      "main": [
        [
          {
            "node": "Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Publish to Facebook1": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Naming - Image": {
      "main": [
        [
          {
            "node": "Rename Image Binary Top Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Naming - Video": {
      "main": [
        [
          {
            "node": "Rename Image Binary Top Image1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Ad_set (7dc1dv)": {
      "main": [
        [
          {
            "node": "Format ID",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Choose Correct Attribution": {
      "main": [
        [
          {
            "node": "Create Ad_set (1dc)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Ad_set (7dc)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Ad_set (7dc1dv)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rename Image Binary Top Image": {
      "main": [
        [
          {
            "node": "Loop Over Items1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rename Image Binary Top Image1": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Creating ad_Creatives for images": {
      "main": [
        [
          {
            "node": "Merge Creative",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Creating ad_Creatives for videos": {
      "main": [
        [
          {
            "node": "Merge Creative",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "linking ad_creatives with adsets": {
      "main": [
        [
          {
            "node": "Success Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 社交媒体

需要付费吗?

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

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

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

作者
Chris Rudy

Chris Rudy

@chrisrudy

DTC Marketing consultant with over 6 years of experience and over $25m in ad spend managed

外部链接
在 n8n.io 查看

分享此工作流