Templates / Analyze Meta Ad Library Video Ads with Gemini and store results in Google Sheets

Analyze Meta Ad Library Video Ads with Gemini and store results in Google Sheets

Needs changes

by Daniel Setzermann ✓ · 2,492 views · created 2025-03-03 · Market Research, AI Summarization

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What 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”.

  1. Settings (Edit Fields (Set)): sets or maps fields
  2. Clean Prompt (Code): runs custom JavaScript code
  3. Scrape Meta Ad Library with Apify (HTTP Request): calls an HTTP API
  4. Calculate Runtime in Days (Edit Fields (Set)): sets or maps fields
  5. Sort: sorts the items
  6. Filter: keeps only the items that match a condition
  7. Limit: keeps the first few items
  8. Pass relevant Fields (Edit Fields (Set)): sets or maps fields
  9. Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
  10. Download File (HTTP Request): calls an HTTP API

…plus 7 more steps. See the full node list below.

Services it uses

Google Gemini Chat ModelGoogle Sheets

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.0Replace 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)

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…

Excerpt from Daniel Setzermann's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.