Templates / Scrape & analyse Meta Ad Library image ads with Apify and OpenAI

Scrape & analyse Meta Ad Library image ads with Apify and OpenAI

Needs changes

by Daniel Setzermann ✓ · 2,082 views · created 2025-05-12 · 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 16 nodes and runs manually, when you click “Execute workflow”. Along the way it connects OpenAI Chat Model, Google Drive 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. Download Image (HTTP Request): calls an HTTP API
  10. Save Image to Google Drive (Google Drive): uses Google Drive

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

Services it uses

OpenAI Chat ModelGoogle DriveGoogle 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 Analyze Image Contents (v1.8): 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)
Analyze Image Contents (v1.8)
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 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. How it…

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.