This workflow corresponds to n8n.io template #4003 — we link there as the canonical source.
This workflow follows the Agent → Google Drive 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": "ERIlxRN2QNARj3RZ",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Scrape & Analyze Meta Ad Library Image Ads with OpenAI and store results in Google Sheets",
"tags": [],
"nodes": [
{
"id": "0d98546f-9c0b-475d-81d3-d63c5dd18bc4",
"name": "When clicking \u2018Test workflow\u2019",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-120,
380
],
"parameters": {},
"typeVersion": 1
},
{
"id": "54f05394-221a-4e50-b4f5-50e4b7b4cc8a",
"name": "Settings",
"type": "n8n-nodes-base.set",
"position": [
80,
380
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "3cac5c6a-bd72-4c39-9232-5926e4ef1cd0",
"name": "Clean Prompt",
"type": "n8n-nodes-base.code",
"position": [
280,
380
],
"parameters": {},
"typeVersion": 2
},
{
"id": "a6418f56-233c-410e-8186-ff40a993c980",
"name": "Scrape Meta Ad Library with Apify",
"type": "n8n-nodes-base.httpRequest",
"position": [
480,
380
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "a5502f95-ecc4-47d9-a6ef-0d17257f8255",
"name": "Pass relevant Fields",
"type": "n8n-nodes-base.set",
"position": [
1700,
380
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "32a72f8f-ae54-4c3c-8d1a-5859a5360275",
"name": "Calculate Runtime in Days",
"type": "n8n-nodes-base.set",
"position": [
720,
380
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "4e8f97f3-b65b-4bf3-ab30-8572af490dda",
"name": "Sort by Reach or Days Running",
"type": "n8n-nodes-base.sort",
"position": [
940,
380
],
"parameters": {},
"typeVersion": 1
},
{
"id": "b709b632-647c-4ff8-8f0a-f1f7163841ef",
"name": "Filter only Image Ads",
"type": "n8n-nodes-base.filter",
"position": [
1180,
380
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "20255e0f-f34c-4499-b2e4-c19330047998",
"name": "Limit Images to Analyze",
"type": "n8n-nodes-base.limit",
"position": [
1440,
380
],
"parameters": {},
"typeVersion": 1
},
{
"id": "4ccd7e75-f124-481f-be20-2d2dd7b811f9",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2380,
320
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "66e268d4-5db5-485d-ba63-f48af4557429",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
2560,
320
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "8edfd824-8571-4cc7-b1f4-2172e3d0ad47",
"name": "Download Image",
"type": "n8n-nodes-base.httpRequest",
"position": [
1960,
380
],
"parameters": {},
"typeVersion": 4.2
},
{
"id": "dcc7f234-14f8-4e71-8c2f-2f6611b1126d",
"name": "Analyze Image Contents",
"type": "@n8n/n8n-nodes-langchain.agent",
"maxTries": 2,
"position": [
2380,
80
],
"parameters": {},
"retryOnFail": true,
"typeVersion": 1.8
},
{
"id": "2b3dbff9-da61-4f94-a77a-0728456e5c4e",
"name": "Save Image to Google Drive",
"type": "n8n-nodes-base.googleDrive",
"position": [
2440,
580
],
"parameters": {},
"typeVersion": 3
},
{
"id": "34c28c32-a4d2-49da-a2e9-f97bbb131031",
"name": "Merge Data",
"type": "n8n-nodes-base.merge",
"position": [
2820,
360
],
"parameters": {},
"typeVersion": 3.1
},
{
"id": "7e2af3a6-2129-4dc0-a88a-92672191b66b",
"name": "Store Data in Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"position": [
3120,
360
],
"parameters": {},
"typeVersion": 4.5
},
{
"id": "0ba0d9b7-2b83-4131-87d1-66c68c8c776b",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
20,
260
],
"parameters": {
"content": ""
},
"typeVersion": 1
},
{
"id": "69c089a0-df87-4723-8362-fb8c198fc130",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
2360,
780
],
"parameters": {
"content": ""
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "30c23991-ebad-444e-a9da-7fc782c99739",
"connections": {
"Settings": {
"main": [
[
{
"node": "Clean Prompt",
"type": "main",
"index": 0
}
]
]
},
"Merge Data": {
"main": [
[
{
"node": "Store Data in Google Sheets",
"type": "main",
"index": 0
}
]
]
},
"Clean Prompt": {
"main": [
[
{
"node": "Scrape Meta Ad Library with Apify",
"type": "main",
"index": 0
}
]
]
},
"Download Image": {
"main": [
[
{
"node": "Save Image to Google Drive",
"type": "main",
"index": 0
},
{
"node": "Analyze Image Contents",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Analyze Image Contents",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Pass relevant Fields": {
"main": [
[
{
"node": "Download Image",
"type": "main",
"index": 0
}
]
]
},
"Filter only Image Ads": {
"main": [
[
{
"node": "Limit Images to Analyze",
"type": "main",
"index": 0
}
]
]
},
"Analyze Image Contents": {
"main": [
[
{
"node": "Merge Data",
"type": "main",
"index": 0
}
]
]
},
"Limit Images to Analyze": {
"main": [
[
{
"node": "Pass relevant Fields",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Analyze Image Contents",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Calculate Runtime in Days": {
"main": [
[
{
"node": "Sort by Reach or Days Running",
"type": "main",
"index": 0
}
]
]
},
"Save Image to Google Drive": {
"main": [
[
{
"node": "Merge Data",
"type": "main",
"index": 1
}
]
]
},
"Store Data in Google Sheets": {
"main": [
[]
]
},
"Sort by Reach or Days Running": {
"main": [
[
{
"node": "Filter only Image Ads",
"type": "main",
"index": 0
}
]
]
},
"Scrape Meta Ad Library with Apify": {
"main": [
[
{
"node": "Calculate Runtime in Days",
"type": "main",
"index": 0
}
]
]
},
"When clicking \u2018Test workflow\u2019": {
"main": [
[
{
"node": "Settings",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Meta Image Ads Analyzer This n8n template builds an automated system to scrape, analyze, and extract insights from Meta advertising content. The workflow uses AI to perform deep analysis of image ads and organize the results in a structured format.
Source: https://n8n.io/workflows/4003/ — 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.
Generate AI viral videos with NanoBanana & VEO3, shared on socials via Blotato 2. Uses @blotato/n8n-nodes-blotato, googleSheets, lmChatOpenAi, toolThink. Event-driven trigger; 94 nodes.
This template is designed for marketers, content creators, and e-commerce brands who want to automate the creation of professional ad videos at scale. It’s ideal for teams looking to generate consiste
This comprehensive n8n workflow automates the entire Meta (Facebook/Instagram) advertising process, from asset analysis to ad creation. It combines AI-powered content analysis with automated ad deploy
This automation is designed to help you generate AI-powered music tracks, cover art, and fully rendered music videos — all triggered from a simple Telegram chat and managed via Google Sheets.