This workflow corresponds to n8n.io template #3839 — we link there as the canonical source.
This workflow follows the Agent → Form Trigger recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "bfb4y4EW4tvOM17G",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Facebook Ads Competitor Creative Analysis & Automated Email Report",
"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": "Scrape ads",
"type": "n8n-nodes-base.httpRequest",
"position": [
-520,
1600
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "5a26c1ee-39be-4945-9b55-8ce58e511f10",
"name": "Merge Media Result",
"type": "n8n-nodes-base.merge",
"position": [
800,
1620
],
"parameters": {},
"typeVersion": 3.1
},
{
"id": "db54ffff-9cf0-4be5-9878-53a94de3eefc",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
860,
2140
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "2e34008c-7747-4319-99a2-9c1fec5b550d",
"name": "Auto-fixing Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
"position": [
1020,
1980
],
"parameters": {},
"typeVersion": 1
},
{
"id": "def3f940-0bb3-45f8-972b-20f1a42796b4",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1120,
2140
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "dfe34ace-d0ce-4c38-99c0-b21bc461dc35",
"name": "Aggregate",
"type": "n8n-nodes-base.aggregate",
"position": [
1020,
1620
],
"parameters": {},
"typeVersion": 1
},
{
"id": "6a633e25-6e39-4635-a1b6-c4ffcc6e7c5a",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
800,
1820
],
"parameters": {},
"typeVersion": 1.9
},
{
"id": "7e747366-0aeb-4ae4-9bae-f3cb1a5ebac5",
"name": "Email the top job recommendations",
"type": "n8n-nodes-base.gmail",
"position": [
1660,
1820
],
"parameters": {},
"typeVersion": 2.1
},
{
"id": "5609c7c3-40cb-4901-bc57-11674ea7dccb",
"name": "Select Image Fields",
"type": "n8n-nodes-base.set",
"position": [
460,
1440
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "8823029c-e4a5-419a-8dbe-7bf2d5b9c9cb",
"name": "Split Image Ads & Video Ads",
"type": "n8n-nodes-base.switch",
"position": [
-300,
1600
],
"parameters": {},
"typeVersion": 3.2
},
{
"id": "d3eccca1-e388-4801-838a-7ca6ba0cf860",
"name": "Select Video Fields",
"type": "n8n-nodes-base.set",
"position": [
500,
2360
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "85daf48d-8600-4a76-8743-c792d6bcec92",
"name": "Download video",
"type": "n8n-nodes-base.httpRequest",
"position": [
40,
2160
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "310162af-350d-4331-8792-ae4d051bb141",
"name": "Upload video Gemini",
"type": "n8n-nodes-base.httpRequest",
"position": [
260,
2160
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "d4b8f151-1348-48d7-9f44-c6c38e84ffa2",
"name": "Analyze video Gemini",
"type": "n8n-nodes-base.httpRequest",
"position": [
260,
2360
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "bb529f0b-045c-4bec-b9f7-2b9e80e0a6cf",
"name": "Wait",
"type": "n8n-nodes-base.wait",
"position": [
40,
2360
],
"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": "Combine all Ads information into a single text string",
"type": "n8n-nodes-base.set",
"position": [
1240,
1620
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "55ebf877-d6df-4479-bdbf-8c59386f4aaa",
"name": "Image duplicate key",
"type": "n8n-nodes-base.set",
"position": [
40,
1240
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "a0b081dd-8b88-468f-b3c5-fb5a46476839",
"name": "Image Duplicate Key",
"type": "n8n-nodes-base.set",
"position": [
40,
1940
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "f80191b8-45f9-4949-8779-14815de6ed0c",
"name": "Image Remove Duplicates",
"type": "n8n-nodes-base.removeDuplicates",
"position": [
240,
1240
],
"parameters": {},
"typeVersion": 2
},
{
"id": "67d1dab8-9d8c-410e-985b-b9138c4db165",
"name": "Video Remove Duplicates",
"type": "n8n-nodes-base.removeDuplicates",
"position": [
260,
1940
],
"parameters": {},
"typeVersion": 2
},
{
"id": "e6e78040-8197-4520-988c-77dd5061c29c",
"name": "Image Limit 5",
"type": "n8n-nodes-base.limit",
"position": [
460,
1240
],
"parameters": {},
"typeVersion": 1
},
{
"id": "6b75b522-e4c6-420b-ad14-198a5917a8f1",
"name": "Video Limit 5",
"type": "n8n-nodes-base.limit",
"position": [
480,
1940
],
"parameters": {},
"typeVersion": 1
},
{
"id": "5cc72130-31cf-4ca4-875b-62ccc276ca09",
"name": "On form submission",
"type": "n8n-nodes-base.formTrigger",
"position": [
-860,
1600
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "82e0ad0c-f768-4034-bde6-0ec7e7fe0392",
"name": "Introduction Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1000,
840
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "8a9daffb-8bd0-4e85-a0e5-9ef15fa57108",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1000,
1360
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "fe330620-4cbf-461d-a998-c221c2b05403",
"name": "Data Collection Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-580,
1360
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "dd192f4e-e972-4db1-babe-db900fc29438",
"name": "Image Analysis Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-20,
960
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "47a1e7ef-7e02-44d6-bf12-98203b54d8c8",
"name": "Video Analysis Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-20,
1640
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "46173dd0-fc02-4064-a90d-791f44741f56",
"name": "Analysis Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
720,
1400
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "1676be5e-15c5-456f-b0a4-bac9ea6ed65b",
"name": "Report Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
1480,
1520
],
"parameters": {
"content": ""
},
"typeVersion": 1
}
],
"active": false,
"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
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow automates the process of competitor creative analysis for Facebook Pages. When a user submits their email and a target Facebook Page URL via a web form, the workflow: Scrapes the latest image and video Facebook ads from the submitted Page using Apify. Deduplicates…
Source: https://n8n.io/workflows/3839/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
🎯 Create viral TikToks, Shorts, Reels, podcasts, and ASMR videos in minutes — all on autopilot.
🧠 Automate end-to-end SEO blog creation and WordPress publishing using a GPT-5 multi-agent workflow with real-time research, metadata generation, and optional featured images.
This is an automated blog post generation system that: Researches topics using AI agents and web search tools Writes complete blog posts with proper SEO structure Generates custom images for each post
📄 Documentation: Notion Guide
Code Schedule. Uses memoryBufferWindow, agent, stickyNote, outputParserStructured. Event-driven trigger; 45 nodes.