# FB Ad Spy: AI-Powered Competitor Ad Intelligence & Auto-Video: n8n workflow

> Started by an event in a connected app, and works across Google Cloud Storage, Google Drive and Google Sheets. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/fb-ad-spy-ai-powered-competitor-ad-intelligence-and-auto-vid (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Content](https://millionrounds.com/workflows?category=Content#library)

# FB Ad Spy: AI-Powered Competitor Ad Intelligence & Auto-Video

Started by an event in a connected app, and works across Google Cloud Storage, Google Drive and Google Sheets. It hands the judgement calls to OpenAI. 54 steps, 3 branches, 10 loops or waits: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Ffb-ad-spy-ai-powered-competitor-ad-intelligence-and-auto-vid)

**54 steps** Large: read it before trusting it with anything live

**3** Branches: places the flow splits

**10** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Model 6 Logic 23 Service 24

The steps in the order they run, from what starts it.

- 1 **On Manual Start** Manual trigger *Starts it*
- 2 **Scrape Ad Library Data** Http Request *Service*
- 3 **Distribute Ad Cards** Split Out *Logic*
- 4 **Extract Batch of Ad Cards** Split Out *Logic*
- 5 **Separate Video Resources** Split Out *Logic*
- 6 **Filter by Ad Likes** Filter *Logic*
- 7 **Filter Ads by Likes** Filter *Logic*
- 8 **Filter Videos by Likes** Filter *Logic*
- 9 **Apply Filter to Image Ads** Filter *Logic*
- 10 **Apply Multi-Condition Filter to Text Ads** Filter *Logic*
- 11 **Apply Filter to Video Ads** Filter *Logic*
- 12 **Batch Image Ads Processing** Split In Batches *Logic*
- 13 **Batch Text Ads Processing** Split In Batches *Logic*
- 14 **Batch Video Ads Processing** Split In Batches *Logic*
- 15 **Fetch Image From URL** Http Request *Service*
- 16 **Summarize Text with AI** Open Ai *Model*
- 17 **Download Video Content** Http Request *Service*
- 18 **Analyze Image with AI** Open Ai *Model*
- 19 **Record Text Data in Sheets** Google Sheets *Service*
- 20 **Save Video to Google Drive** Google Drive *Service*
- 21 **Summarize Image with AI** Open Ai *Model*
- 22 **Wait Before Processing Text Ads** Wait *Logic*
- 23 **Initiate Gemini Upload** Http Request *Service*
- 24 **Record Image Data in Sheets** Google Sheets *Service*
- 25 **Retrieve Video from Drive** Google Drive *Service*
- 26 **Wait Before Image Creation** Wait *Logic*
- 27 **Submit Video to Gemini** Http Request *Service*
- 28 **Generate Image with AI** Open Ai *Model*
- 29 **Wait for Analysis Completion** Wait *Logic*
- 30 **Analyze Video in Gemini** Http Request *Service*
- 31 **Summarize Video with AI** Open Ai *Model*
- 32 **Create Video Prompt with AI** Open Ai *Model*
- 33 **Record Video Data in Sheets** Google Sheets *Service*
- 34 **Wait Before Video Processing** Wait *Logic*
- 35 **Configure API Parameters** Set *Logic*
- 36 **Create JWT Token** Jwt *Service*
- 37 **Obtain OAuth Token** Http Request *Service*
- 38 **Start Video Generation Process** Http Request *Service*
- 39 **Pause for 20 Seconds** Wait *Logic*
- 40 **Query Server Status** Http Request *Service*
- 41 **Evaluate Condition Route** Switch *Logic*
- 42 **Convert Media Into File** Convert To File *Service*
- 43 **Save File to Cloud Storage** Google Cloud Storage *Service*
- 44 **Transform Video to 9:16 Ratio** Http Request *Service*
- 45 **Await Rendering Completion** Wait *Logic*
- 46 **Check Rendering Status** Http Request *Service*
- 47 **Verify Status OK** If *Logic*
- 48 **Insert Video Captions** Http Request *Service*
- 49 **Await Caption Completion** Wait *Logic*
- 50 **Verify Caption Completion** Http Request *Service*
- 51 **Verify Captions Presence** If *Logic*
- 52 **Download Finalized Video** Http Request *Service*
- 53 **Upload Final Output to Cloud** Google Cloud Storage *Service*
- 54 **Modify Google Sheet Entry** Google Sheets *Service*

## How it's built

- **Starts on:** An event in a connected app
- **Steps:** 54, with 3 branches, 10 loops or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Google Cloud Storage, Google Drive, Google Sheets
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Google Cloud Storage, Google Drive and Google Sheets accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on an event in a connected app.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 54 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 54 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Ffb-ad-spy-ai-powered-competitor-ad-intelligence-and-auto-vid)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Google Cloud Storage](https://millionrounds.com/workflows?service=Google+Cloud+Storage#library)[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)

## Workflows like it

Also content, with the same services where possible, closest in size first.

- [**Create & approve POV videos with OpenAI and OpenRouter** 53 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/create-and-approve-pov-videos-with-openai-and-openrouter)
- [**Automate SEO blog creation + social media with OpenAI** 56 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/automate-seo-blog-creation-social-media-with-openai)
- [**Generate long form videos with VEO 3.1** 52 steps · calls a model · Airtable, Google Drive](https://millionrounds.com/workflow/generate-long-form-videos-with-veo-3-1)
- [**Generate AI songs + music videos with Gemini and OpenAI** 57 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/generate-ai-songs-music-videos-with-gemini-and-openai)
- [**Automate social media content with Facebook and LinkedIn** 50 steps · calls a model · Gmail, Google Docs](https://millionrounds.com/workflow/automate-social-media-content-with-facebook-and-linkedin)
- [**Viral videos into new content with Gemini and OpenAI** 50 steps · calls a model · Google Sheets, S3](https://millionrounds.com/workflow/viral-videos-into-new-content-with-gemini-and-openai)
