Templates / Analyze competitor Facebook ads with Apify, OpenAI, and Google Sheets

Analyze competitor Facebook ads with Apify, OpenAI, and Google Sheets

Ready for 3.0

by Dr. Firas ✓ · 179 views · created 2026-08-04 · Market Research, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 22 nodes and runs manually, when you click “Execute workflow”. Along the way it connects OpenAI, OpenAI Chat Model and Google Sheets. It also calls api.apify.com over HTTP.

How it runs

Trigger: Manually, when you click “Execute workflow”.

  1. Configuration (Edit Fields (Set)): sets 7 fields: search_keywords, facebook_country, ad_active_status…
  2. Scrape Facebook Ad Library with Apify (HTTP Request): calls api.apify.com (POST)
  3. Filter: keeps only the items that match a condition
  4. Route by Ad Content Type (Switch): routes items into 2 branches
  5. Loop Over Video Ads (Loop Over Items (Split in Batches)): loops over the items in batches
  6. Loop Over Image Ads (Loop Over Items (Split in Batches)): loops over the items in batches
  7. Loop Over Text Ads (Loop Over Items (Split in Batches)): loops over the items in batches
  8. Analyze Video Preview Image (GPT Vision) (OpenAI): analyze (image)
  9. Analyze Image Ad (GPT Vision) (OpenAI): analyze (image)
  10. Generate Text Ad Intelligence (AI Agent): runs an AI agent, with model: Text Analysis Model; output parser: Text Analysis Output Format

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

Services it uses

OpenAIOpenAI Chat ModelGoogle Sheets

HTTP calls to: api.apify.com

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (11)

From the author

Quick overview This workflow manually scrapes Facebook Ad Library results via apify, filters for high-like advertisers, analyzes video/image/text ads with OpenAI (vision + text), and appends a strategic summary plus rewritten ad copy for each ad to Google…

Excerpt from Dr. Firas'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.