{
  "name": "Monitor and analyze competitor Facebook ads with Apify, GPT-4o, Gemini, and Google Sheets",
  "nodes": [
    {
      "id": "718a079d-caa2-4f80-952f-c5c2e52702af",
      "name": "When clicking ‘Execute workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        4816,
        4512
      ]
    },
    {
      "id": "81959cf5-ae9b-4f29-9f98-5d4c394e6e94",
      "name": "Download Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6320,
        3904
      ]
    },
    {
      "id": "ce2f0f3a-d61c-40cb-9c90-a1813e156492",
      "name": "Loop Over Image Ads",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        6128,
        4544
      ]
    },
    {
      "id": "ad2bd2d6-30a5-4911-83c2-1c5c1a6c4212",
      "name": "Loop Over Text Ads",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        6272,
        5184
      ]
    },
    {
      "id": "9ec28eeb-5727-47c5-a29f-74e83704abc3",
      "name": "Loop Over Video Ads",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        6080,
        4080
      ]
    },
    {
      "id": "a767c8b9-0246-4de5-966a-03816a1a03c2",
      "name": "Add as Type = Video",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        7408,
        3904
      ]
    },
    {
      "id": "7ef1dff2-166a-4dc2-b393-112bc468c7b7",
      "name": "Analyze Image",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        6704,
        4464
      ]
    },
    {
      "id": "a27aff52-131d-46a5-8ab2-3dea7c1aae64",
      "name": "Output Image Summary",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        6928,
        4464
      ]
    },
    {
      "id": "a00dc480-7dd1-452c-8163-6030b4478a28",
      "name": "Output Text Summary",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        6496,
        5104
      ]
    },
    {
      "id": "c113cce1-6349-4bdb-a950-f66c3387192a",
      "name": "Add as Type = Text",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        6848,
        5104
      ]
    },
    {
      "id": "1702af77-33b1-4b04-b88b-af06b4ad3d3c",
      "name": "Run an Actor and get dataset",
      "type": "@apify/n8n-nodes-apify.apify",
      "position": [
        5040,
        4512
      ]
    },
    {
      "id": "c1cf9053-c28a-46a3-9841-cda316dba8cb",
      "name": "Upload a file",
      "type": "n8n-nodes-base.dropbox",
      "position": [
        6608,
        3904
      ]
    },
    {
      "id": "899c875b-7eae-48df-a27c-ce4c278b4ade",
      "name": "Add as Type = Image",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        7280,
        4464
      ]
    },
    {
      "id": "4d7a17da-7839-4946-9562-9dda4c0f9dea",
      "name": "Analyze video",
      "type": "@n8n/n8n-nodes-langchain.googleGemini",
      "position": [
        7184,
        3904
      ]
    },
    {
      "id": "add6d12b-a255-4219-81d2-67b134caadcf",
      "name": "Download a file",
      "type": "n8n-nodes-base.dropbox",
      "position": [
        6896,
        3904
      ]
    },
    {
      "id": "ea5eb0e4-0dca-4e4f-a90f-db50f9c879b7",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4192,
        4320
      ],
      "parameters": {
        "width": 544,
        "height": 480,
        "content": "## How it works\n\nScrapes live ads from Facebook Ad Library via Apify\n\nFilters for proven advertisers using page-like thresholds\n\nDetects creative type (video, image, text) automatically\n\nApplies AI an"
      }
    },
    {
      "id": "6d8e85dd-8118-4c35-991b-74e18053cc4e",
      "name": "Detect Ad Creative Type",
      "type": "n8n-nodes-base.switch",
      "position": [
        5584,
        4496
      ]
    },
    {
      "id": "26d70958-270e-47c3-8032-539528e72566",
      "name": "Filter High-Signal Pages (>5k Likes)",
      "type": "n8n-nodes-base.filter",
      "position": [
        5264,
        4512
      ]
    },
    {
      "id": "76e6bac0-2296-434f-8b69-7a95f3ef412e",
      "name": "Rate Limit Guard (Video)",
      "type": "n8n-nodes-base.wait",
      "position": [
        7632,
        4064
      ]
    },
    {
      "id": "0782b855-f64e-4ebd-8708-8bb48100a8a9",
      "name": "Rate Limit Guard (Image)",
      "type": "n8n-nodes-base.wait",
      "position": [
        7504,
        4544
      ]
    },
    {
      "id": "7e5e5138-9771-433e-b260-ad853c3a8a54",
      "name": "Rate Limit Guard (Text)",
      "type": "n8n-nodes-base.wait",
      "position": [
        7136,
        5184
      ]
    },
    {
      "id": "0c5d13bb-396b-46f1-b881-3997f6e92982",
      "name": "Scrape Facebook Ad Library (Apify)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6416,
        4464
      ]
    },
    {
      "id": "34d691c5-a629-437a-93b9-2ce0d49d8a4c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4992,
        4336
      ],
      "parameters": {
        "width": 182,
        "height": null,
        "content": "## Data Ingestion\nApify scrape and raw ad snapshot retrieval"
      }
    },
    {
      "id": "896c3a18-990f-41cc-97d2-cbeaa551aa56",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5216,
        4336
      ],
      "parameters": {
        "width": 176,
        "height": null,
        "content": "## Signal Filtering\nRemove low-quality advertisers early"
      }
    },
    {
      "id": "e415354c-e591-4e26-8314-61cc0cfb3966",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6032,
        3776
      ],
      "parameters": {
        "width": 1750,
        "height": 464,
        "content": "## AI Video Analysis\nFormat-specific analysis and rewriting"
      }
    },
    {
      "id": "d2507035-a17d-4a59-aaf0-6ab22199d06c",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6080,
        4320
      ],
      "parameters": {
        "width": 1574,
        "height": 400,
        "content": "## AI Image Analysis\nFormat-specific analysis and rewriting"
      }
    },
    {
      "id": "4baaf765-4cb7-4d3e-ad15-513be7e3c473",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6224,
        4992
      ],
      "parameters": {
        "width": 1062,
        "height": 368,
        "content": "## AI Text Analysis\nFormat-specific analysis and rewriting"
      }
    },
    {
      "id": "128c3032-49dc-442b-a60e-0fe08d77704c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5536,
        4336
      ],
      "parameters": {
        "width": 176,
        "height": null,
        "content": "## Creative Routing\nSplit ads into video, image, text pipelines"
      }
    }
  ],
  "connections": {
    "Analyze Image": {
      "main": [
        [
          {
            "node": "Output Image Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze video": {
      "main": [
        [
          {
            "node": "Add as Type = Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload a file": {
      "main": [
        [
          {
            "node": "Download a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Video": {
      "main": [
        [
          {
            "node": "Upload a file",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download a file": {
      "main": [
        [
          {
            "node": "Analyze video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add as Type = Text": {
      "main": [
        [
          {
            "node": "Rate Limit Guard (Text)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Text Ads": {
      "main": [
        [],
        [
          {
            "node": "Output Text Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add as Type = Image": {
      "main": [
        [
          {
            "node": "Rate Limit Guard (Image)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Add as Type = Video": {
      "main": [
        [
          {
            "node": "Rate Limit Guard (Video)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Image Ads": {
      "main": [
        [],
        [
          {
            "node": "Scrape Facebook Ad Library (Apify)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop Over Video Ads": {
      "main": [
        [],
        [
          {
            "node": "Download Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Output Text Summary": {
      "main": [
        [
          {
            "node": "Add as Type = Text",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Output Image Summary": {
      "main": [
        [
          {
            "node": "Add as Type = Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Detect Ad Creative Type": {
      "main": [
        [
          {
            "node": "Loop Over Video Ads",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Image Ads",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Loop Over Text Ads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rate Limit Guard (Text)": {
      "main": [
        [
          {
            "node": "Loop Over Text Ads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rate Limit Guard (Image)": {
      "main": [
        [
          {
            "node": "Loop Over Image Ads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rate Limit Guard (Video)": {
      "main": [
        [
          {
            "node": "Loop Over Video Ads",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run an Actor and get dataset": {
      "main": [
        [
          {
            "node": "Filter High-Signal Pages (>5k Likes)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Facebook Ad Library (Apify)": {
      "main": [
        [
          {
            "node": "Analyze Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Filter High-Signal Pages (>5k Likes)": {
      "main": [
        [
          {
            "node": "Detect Ad Creative Type",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Run an Actor and get dataset",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}