Skip to main content

Analyze competitor Facebook ads with AI (GPT-4 & Gemini) & email reports

Workflow preview

Workflow preview
100%
Analyze competitor Facebook ads with AI (GPT-4 & Gemini) & email reports preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Facebook Ads Competitor Creative Analysis & Automated Email Report What this workflow does This workflow automates the process of competitor creative analysis for Facebook Pages. When a user sub...

Best for

  • Market Research automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.httprequest, n8n-nodes-base.merge, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.outputparserautofixing, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.aggregate, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.gmail

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by SamirLiu.

Original n8n.io source

1.1 Workflow description

Title
Analyze competitor Facebook ads with AI (GPT-4 & Gemini) & email reports
Workflow name
Analyze competitor Facebook ads with AI (GPT-4 & Gemini) & email reports

Facebook Ads Competitor Creative Analysis & Automated Email Report

📝 What this workflow does

This workflow automates the process of competitor creative analysis for Facebook Pages. When a user submits their email and a target Facebook Page URL via a web form, the workflow:

  • Scrapes the latest image and video Facebook ads from the submitted Page using Apify.
  • Deduplicates and selects the top 5 image and top 5 video ads for further analysis.
  • Applies advanced AI analysis:
    • Uses OpenAI Vision (GPT-4) to analyze image ads.
    • Uses Google Gemini to analyze video ads.
  • Aggregates all ad insights and generates a structured, visually engaging creative analytics report.
  • Sends the report directly to the user’s email with ad previews and detailed creative evaluation.

👥 Who is this for?

  • Marketers and agencies conducting competitor research on Facebook.
  • Brand managers who want quick, actionable insights into rival ad creative.
  • Growth hackers and performance advertisers analyzing top-performing creative trends.
  • Anyone in need of an automated, AI-based Facebook ad evaluation and reporting tool using n8n.

🎯 What problem does this workflow solve?

  • Manual ad analysis is time-consuming: Scraping, filtering, and reviewing Facebook competitor ads by hand is labor-intensive.
  • Creative insight requires expertise: Understanding the message, visuals, and targeting of competitor ads needs marketing/creative skill.
  • Lack of automated reporting: Easily and visually summarize findings for yourself or stakeholders—without manual collation or formatting.

This workflow provides a turnkey, end-to-end solution for competitor creative analysis, combining real ad data with unbiased, AI-driven creative insights in a shareable email format.

⚙️ Setup instructions (About 10-15 minutes)

Before using this AI marketing automation tool, you'll need:

  1. Add api key to environment variable
  2. Add required credentials

đź”§ How to Customize This Workflow

  • Adapt Image/Video Analysis Goals: Modify the prompts or parameters sent to OpenAI Vision and Gemini to suit your specific analysis objectives—e.g., evaluate branding consistency, detect call-to-action effectiveness, or extract emotional tone.
  • Revise Email Report Design: Customize the formatting, insights, and visuals in the delivered report to match your organization’s standards or stakeholder preferences.
  • Expand Input Fields: Add more fields to the user-facing form, such as a competitor list, campaign dates, or target audience details, for more granular analysis.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Scrape ads

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 2 - Merge Media Result

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.1

Block 3 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 4 - Auto-fixing Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserAutofixing - outputParserAutofixing
Config choices
Version 1

Block 5 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 6 - Aggregate

Type / Role
n8n-nodes-base.aggregate - aggregate
Config choices
Version 1

Block 7 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.9

Block 8 - Email the top job recommendations

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.1

Block 9 - Select Image Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 10 - Split Image Ads & Video Ads

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3.2

Block 11 - Select Video Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 12 - Download video

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 13 - Upload video Gemini

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 14 - Analyze video Gemini

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 15 - Wait

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 16 - Analyze Image

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 17 - Combine all Ads information into a single text string

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 18 - Image duplicate key

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 19 - Image Duplicate Key

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 20 - Image Remove Duplicates

Type / Role
n8n-nodes-base.removeDuplicates - removeDuplicates
Config choices
Version 2

Block 21 - Video Remove Duplicates

Type / Role
n8n-nodes-base.removeDuplicates - removeDuplicates
Config choices
Version 2

Block 22 - Image Limit 5

Type / Role
n8n-nodes-base.limit - limit
Config choices
Version 1

Block 23 - Video Limit 5

Type / Role
n8n-nodes-base.limit - limit
Config choices
Version 1

Block 24 - On form submission

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.2

Showing the first 24 of 31 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Analyze competitor Facebook ads with AI (GPT-4 & Gemini) & email reports
Complexity advanced
Nodes 31
Categories Market Research, AI Summarization
Author SamirLiu
Published 03 May 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/3839/3839.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Analyze competitor Facebook ads with AI (GPT-4 & Gemini) & email reports do?

Facebook Ads Competitor Creative Analysis & Automated Email Report What this workflow does This workflow automates the process of competitor creative analysis for Facebook Pages. When a user sub...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Market Research, AI Summarization use case.