Skip to main content

AI-powered Meta ads analysis & creation with Gemini, GPT-4.1 Mini & Ads Manager

Workflow preview

Workflow preview
100%
AI-powered Meta ads analysis & creation with Gemini, GPT-4.1 Mini & Ads Manager preview
Open on n8n.io

Important notice

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

1. Workflow Overview

AI Powered Meta Ads Creation & Analysis Workflow Overview This comprehensive n8n workflow automates the entire Meta (Facebook/Instagram) advertising process, from asset analysis to ad creation. It ...

Best for

  • Content Creation automation workflows
  • Multimodal AI automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.facebookgraphapi, n8n-nodes-base.httprequest, n8n-nodes-base.googledrive, n8n-nodes-base.googlesheets, n8n-nodes-base.filter, n8n-nodes-base.if, n8n-nodes-base.wait, @n8n/n8n-nodes-langchain.agent

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
AI-powered Meta ads analysis & creation with Gemini, GPT-4.1 Mini & Ads Manager
Workflow name
AI-powered Meta ads analysis & creation with Gemini, GPT-4.1 Mini & Ads Manager

AI-Powered Meta Ads Creation & Analysis Workflow

Overview

This comprehensive n8n workflow automates the entire Meta (Facebook/Instagram) advertising process, from asset analysis to ad creation. It combines AI-powered content analysis with automated ad deployment, streamlining the creation of high-converting social media advertisements.

Watch a quick video walkthrough of the workflow

Key Features

🤖 AI-Powered Asset Analysis

  • Video Analysis: Uses Google Gemini to analyze video content, extracting transcripts, scene descriptions, hooks, offers, and branding elements
  • Image Analysis: Employs GPT-4.1 Mini to analyze static images, identifying visual elements, USPs, and marketing potential
  • Structured Output: Generates detailed descriptions and creative insights for informed ad creation

✍️ Automated Ad Copy Generation

  • Creates 3 variations each of primary text, headlines, and link descriptions
  • Optimized for Meta's character limits and best practices
  • Maintains brand voice and messaging consistency
  • Leverages AI analysis to create compelling, conversion-focused copy

🎯 Meta Ads Manager Integration

  • Video Ads: Uploads videos, creates ad creatives with multiple text variations
  • Image Ads: Supports both single and multi-image campaigns (1:1 and 9:16 formats)
  • Asset Feed Optimization: Implements placement-specific customization rules
  • Automated Preview Generation: Creates ad previews for different placements

📊 Smart Workflow Management

  • Google Drive Integration: Monitors designated folders for new creative assets
  • Google Sheets Tracking: Maintains comprehensive records of all assets and campaigns
  • Status Management: Tracks processing stages and prevents duplicate work
  • Error Handling: Includes retry logic and status checking for reliable operation

Workflow Components

Asset Discovery & Processing

  1. Google Drive Trigger: Monitors specified folder for new image/video files
  2. File Analysis: Extracts metadata, dimensions, and file specifications
  3. Asset Registration: Logs all assets in Google Sheets for tracking

AI Analysis Pipeline

  1. Content Type Detection: Automatically identifies videos vs. images
  2. Video Processing:
    • Uploads to Google Gemini for analysis
    • Generates comprehensive content breakdown
    • Extracts all marketing-relevant elements
  3. Image Processing:
    • Analyzes visual content with GPT-4.1 Mini
    • Identifies key messaging and visual elements
    • Creates detailed creative descriptions

Ad Copy Creation

  1. AI Agent Processing: Transforms analysis into marketing copy
  2. Multi-Variant Generation: Creates 3 versions of each text element
  3. Platform Optimization: Ensures compliance with Meta's requirements
  4. Quality Assurance: Structured output validation

Meta Ads Deployment

  1. Asset Upload: Pushes images/videos to Meta Ads Manager
  2. Creative Assembly: Builds ad creatives with generated copy variations
  3. Campaign Creation: Sets up ads with proper targeting and placement rules
  4. Status Tracking: Updates spreadsheet with campaign IDs and status

Setup Requirements

Required Credentials

  • Meta Developer Account: App access token for Meta Graph API
  • Google Drive OAuth: For file monitoring and asset access
  • Google Sheets OAuth: For workflow tracking and management
  • Google Gemini API: For video analysis capabilities
  • OpenAI API: For image analysis and copy generation

Configuration Steps

  1. Google Drive Setup:
    • Create dedicated folder for creative assets
    • Configure folder monitoring in the trigger node
  2. Google Sheets Template:
    • Use provided template for asset and campaign tracking
    • Configure account settings and campaign parameters
  3. Meta Developer Setup:
    • Create Meta App and obtain access tokens
    • Set up ad account permissions
  4. API Credentials:
    • Configure all required authentication credentials
    • Test connections before activation

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 - Upload Ad Video

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

Block 2 - Get Video Preview Image

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

Block 3 - Analyze Video with Gemini

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

Block 4 - Gemini - Generate Upload URL

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

Block 5 - Gemini - Upload File

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

Block 6 - Download from Google Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 7 - Create Asset

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 8 - Get All Rows

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 9 - AI Description is Empty

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

Block 10 - Check State

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

Block 11 - If

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

Block 12 - Wait 2 Seconds

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

Block 13 - Wait 3 Seconds

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

Block 14 - AI Agent

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

Block 15 - Video or Image

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

Block 16 - OpenAI Chat Model

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

Block 17 - Get File Metadata

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

Block 18 - Structured Output Parser

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

Block 19 - Get Ads to Process

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 20 - Get Settings

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.5

Block 21 - Merge

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

Block 22 - AI Agent1

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

Block 23 - Google Drive

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 24 - OpenAI Chat Model1

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

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

3. Summary Table

Workflow AI-powered Meta ads analysis & creation with Gemini, GPT-4.1 Mini & Ads Manager
Complexity advanced
Nodes 61
Categories Content Creation, Multimodal AI
Author Daniel Setzermann
Published 05 Jun 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4684/4684.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 AI-powered Meta ads analysis & creation with Gemini, GPT-4.1 Mini & Ads Manager do?

AI Powered Meta Ads Creation & Analysis Workflow Overview This comprehensive n8n workflow automates the entire Meta (Facebook/Instagram) advertising process, from asset analysis to ad creation. It ...

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 Content Creation, Multimodal AI use case.