# Analyze competitor Facebook ads with Gemini: n8n workflow

> Started by someone submitting a form, and works across Gmail. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/analyze-competitor-facebook-ads-with-gemini (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Research and reporting](https://millionrounds.com/workflows?category=Research+and+reporting#library)

# Analyze competitor Facebook ads with Gemini

Started by someone submitting a form, and works across Gmail. It hands the judgement calls to OpenAI. 24 steps, 1 branch, 1 loop 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%2Fanalyze-competitor-facebook-ads-with-gemini)

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

**1** Branch: places the flow splits

**1** Loop or waits

**1** Service it connects to

## The flow

Starts it 1 Model 5 Logic 13 Service 5

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

- 1 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 2 **Structured Output Parser** Output Parser Structured *Model*
- 3 **On form submission** Form trigger *Starts it*
- 4 **Auto-fixing Output Parser** Output Parser Autofixing *Model*
- 5 **AI Agent** Agent *Model*
- 6 **Scrape ads** Http Request *Service*
- 7 **Email the top job recommendations** Gmail *Service*
- 8 **Split Image Ads & Video Ads** Switch *Logic*
- 9 **Image duplicate key** Set *Logic*
- 10 **Image Duplicate Key** Set *Logic*
- 11 **Image Remove Duplicates** Remove Duplicates *Logic*
- 12 **Video Remove Duplicates** Remove Duplicates *Logic*
- 13 **Image Limit 5** Limit *Logic*
- 14 **Video Limit 5** Limit *Logic*
- 15 **Analyze Image** Open Ai *Model*
- 16 **Download video** Http Request *Service*
- 17 **Select Image Fields** Set *Logic*
- 18 **Upload video Gemini** Http Request *Service*
- 19 **Merge Media Result** Merge *Logic*
- 20 **Wait** Wait *Logic*
- 21 **Aggregate** Aggregate *Logic*
- 22 **Analyze video Gemini** Http Request *Service*
- 23 **Combine all Ads information into a single text string** Set *Logic*
- 24 **Select Video Fields** Set *Logic*

## How it's built

- **Starts on:** Someone submitting a form
- **Steps:** 24, with 1 branch, 1 loop or waits
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Gmail account, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on someone submitting a form.

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 24 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 24 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%2Fanalyze-competitor-facebook-ads-with-gemini)
- **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.

[Gmail](https://millionrounds.com/workflows?service=Gmail#library)

## Workflows like it

Also research and reporting, with the same services where possible, closest in size first.

- [**Automated multi-platform market intelligence reporting** 24 steps · calls a model · Gmail](https://millionrounds.com/workflow/automated-multi-platform-market-intelligence-reporting)
- [**Generate AI-powered Strava performance evolution reports** 24 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/generate-ai-powered-strava-performance-evolution-reports)
- [**AI research agents to automate PDF analysis with Mistral** 23 steps · calls a model · Gmail](https://millionrounds.com/workflow/ai-research-agents-to-automate-pdf-analysis-with-mistral)
- [**Audit website security and send AI reports with Gmail** 25 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/audit-website-security-and-send-ai-reports-with-gmail)
- [**Automate multi-website Google Analytics reports with OpenAI** 25 steps · calls a model · Email, Gmail](https://millionrounds.com/workflow/automate-multi-website-google-analytics-reports-with-openai)
- [**Automate privacy risk detection, approvals, and audit reports** 23 steps · calls a model · Gmail, Slack](https://millionrounds.com/workflow/automate-privacy-risk-detection-approvals-and-audit-reports)
