8
n8n 中文网amn8n.com

使用 Apify、GPT-4 和 Google Drive 从竞争对手生成 AI Facebook 广告变体

高级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 29 个节点。主要使用 Set, Wait, Limit, Filter, SplitOut 等节点。 使用 Apify、GPT-4 和 Google Drive 从竞争对手生成 AI Facebook 广告变体

前置要求
  • Google Drive API 凭证
  • 可能需要目标 API 的认证凭证
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "c06b75187a3df8fc1f7d0dca41a1070761a5c8ab93bdb0bd30143dfe764a0663"
  },
  "nodes": [
    {
      "id": "c349adcb-93e6-4763-85f5-068fa2d67972",
      "name": "当点击\"执行工作流\"时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -60,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "2f99cdee-b380-4e53-a1df-0d1f3039f952",
      "name": "Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        140,
        80
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "e45fded6-35cb-447b-b0e3-121f62facc16",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        -80
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "6fdd99d3-a40f-4c6f-a30f-32ad88e1ee55",
      "name": "过滤器",
      "type": "n8n-nodes-base.filter",
      "position": [
        660,
        500
      ],
      "parameters": {},
      "typeVersion": 2.2
    },
    {
      "id": "ec1fd2c0-1814-4a1a-90e7-3a791f7db397",
      "name": "运行广告库抓取器",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        440,
        500
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "691f5179-10a4-4ede-a08d-d7e5ec108801",
      "name": "限制",
      "type": "n8n-nodes-base.limit",
      "position": [
        880,
        500
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "a01aa426-9157-49b1-8d04-056808547dd0",
      "name": "Google Drive1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1980,
        500
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "b6123e23-6872-4f5e-a820-a85f33b2a01e",
      "name": "OpenAI",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        200,
        700
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "94b6d22c-df41-457b-b6e9-c3166c34475b",
      "name": "Google Drive2",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -20,
        700
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "6eb4495c-a1e6-4252-81da-7b2016d930af",
      "name": "设置变量",
      "type": "n8n-nodes-base.set",
      "position": [
        220,
        500
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "4a321c02-a32e-4694-81c7-ad68bec85995",
      "name": "生成提示词",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        420,
        700
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "6ee41b4a-8281-4dd3-88e1-237e58e11be5",
      "name": "使用 GPT 生成图片 1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1660,
        700
      ],
      "parameters": {},
      "executeOnce": true,
      "typeVersion": 4.2
    },
    {
      "id": "368904d4-93b4-4042-983a-04eedb1739e1",
      "name": "遍历项目",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        1200,
        700
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "2b01f230-023d-4e14-a4bf-af7e8571dee1",
      "name": "等待",
      "type": "n8n-nodes-base.wait",
      "position": [
        2540,
        700
      ],
      "webhookId": "e0023d56-efc1-4a82-b312-bc27f4ff837b",
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "21cea8ae-2d2e-4979-89ae-e6f3cce55108",
      "name": "拆分输出",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        780,
        700
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "07212f20-99ef-4811-b987-d256de1ba189",
      "name": "编辑字段",
      "type": "n8n-nodes-base.set",
      "position": [
        1000,
        700
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "09a41ac7-a2ce-4421-883e-c10e12f12068",
      "name": "下载静态图片广告 1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1420,
        700
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "29ac7e3b-fb7c-43d0-8cf8-f66544ca6ae7",
      "name": "转换为文件",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        1880,
        700
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "f6c81377-44a9-4271-9b30-7b8df5379d1f",
      "name": "Google Drive3",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2100,
        700
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "a4986af4-71e8-4ad5-9961-88809d3e4607",
      "name": "创建资源父文件夹",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1100,
        500
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "f3236320-6fde-488a-b93d-9aee1bb39e01",
      "name": "创建子源文件夹",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1320,
        500
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "8acb13bf-5bae-46c0-a47c-db371d074991",
      "name": "创建子生成文件夹",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        1520,
        500
      ],
      "parameters": {},
      "typeVersion": 3
    },
    {
      "id": "da8756c7-405f-46be-b97c-0aa32ad4913f",
      "name": "下载静态图片广告",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1760,
        500
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "5730d06b-9ec1-4d90-b976-1a5d5c4c5639",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        2320,
        700
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "ea97ebdc-385a-4b50-ba9e-531ba9bcc13b",
      "name": "Google Sheets1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        360,
        80
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "22000037-8b79-4ed4-8ad3-6b268bfc6f9d",
      "name": "Google Sheets2",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        800,
        80
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "3c05e74e-44d0-4f42-9d34-d696f4dca165",
      "name": "编辑字段1",
      "type": "n8n-nodes-base.set",
      "position": [
        580,
        80
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "0c812bbb-76e4-450e-a33e-97b7f11957ab",
      "name": "便签 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -120,
        320
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "5695f633-10f1-4309-aaca-9013a44fa460",
      "name": "便签 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        500
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Limit": {
      "main": [
        [
          {
            "node": "Create Asset Parent Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter": {
      "main": [
        [
          {
            "node": "Limit",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI": {
      "main": [
        [
          {
            "node": "Spin Prompts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Loop Over Items",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields1": {
      "main": [
        [
          {
            "node": "Google Sheets2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive": {
      "main": [
        [
          {
            "node": "Google Sheets1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Spin Prompts": {
      "main": [
        [
          {
            "node": "Split Out",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive1": {
      "main": [
        [
          {
            "node": "Google Drive2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive2": {
      "main": [
        [
          {
            "node": "OpenAI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive3": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Variables": {
      "main": [
        [
          {
            "node": "Run Ad Library Scraper",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets1": {
      "main": [
        [
          {
            "node": "Edit Fields1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert to File": {
      "main": [
        [
          {
            "node": "Google Drive3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Items": {
      "main": [
        [],
        [
          {
            "node": "Download Static Image Ad1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Ad Library Scraper": {
      "main": [
        [
          {
            "node": "Filter",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Child Spun Folder": {
      "main": [
        [
          {
            "node": "Download Static Image Ad",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Static Image Ad": {
      "main": [
        [
          {
            "node": "Google Drive1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Static Image Ad1": {
      "main": [
        [
          {
            "node": "Generate Image Using GPT Image 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Asset Parent Folder": {
      "main": [
        [
          {
            "node": "Create Child Source Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Child Source Folder": {
      "main": [
        [
          {
            "node": "Create Child Spun Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Image Using GPT Image 1": {
      "main": [
        [
          {
            "node": "Convert to File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

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

需要付费吗?

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

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

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

作者
Electrabot

Electrabot

@vansh404

AI Automation Agency Based In Canada Reach out to me if you need any help -https://www.linkedin.com/in/vansharoraa/

外部链接
在 n8n.io 查看

分享此工作流