Analyze Meta Ad Library Video Ads with Gemini and store results in Google Sheets
Needs changesWhat this workflow does
This AI workflow has 20 nodes and runs manually, when you click “Execute workflow”. Along the way it connects Google Gemini Chat Model and Google Sheets.
How it runs
Trigger: Manually, when you click “Execute workflow”.
- Settings (Edit Fields (Set)): sets or maps fields
- Clean Prompt (Code): runs custom JavaScript code
- Scrape Meta Ad Library with Apify (HTTP Request): calls an HTTP API
- Calculate Runtime in Days (Edit Fields (Set)): sets or maps fields
- Sort: sorts the items
- Filter: keeps only the items that match a condition
- Limit: keeps the first few items
- Pass relevant Fields (Edit Fields (Set)): sets or maps fields
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Download File (HTTP Request): calls an HTTP API
…plus 7 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in Structured Output Parsing Agent (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Structured Output Parsing Agent (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (13)
- Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - AI Agent
@n8n/n8n-nodes-langchain.agent - Wait
n8n-nodes-base.wait - HTTP Request
n8n-nodes-base.httpRequest - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Sort
n8n-nodes-base.sort - Filter
n8n-nodes-base.filter - Limit
n8n-nodes-base.limit
From the author
Meta 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 video ads and organize the results in a structured format. How it works The…