Back to Templates

Ad Monitoring Tool with AI Model Names (GPT-4, Gemini)

Created by

Created by: Electrabot || vansh404

Electrabot

Last update

Last update 2 days ago

Share


AI Facebook Ad Spy Tool: Unlock Competitor Ad Insights

Overview

This workflow is your automated competitive intelligence solution for Facebook ads. It scrapes active ads from the Facebook Ad Library, filters them based on engagement (likes), and then leverages advanced AI to analyze the content of video, image, and text ads. Finally, it summarizes the ads and rewrites their copy for your strategic use, all neatly organized in a Google Sheet.

Use Case

This tool is perfect for marketing agencies, advertisers, and businesses that want to:

  • Monitor competitors: Easily track what successful ads your competitors are running.
  • Discover winning ad creatives: Identify highly engaging video, image, and text ads.
  • Generate new ad copy ideas: Get AI-powered summaries and rewritten versions of top-performing ad copy.
  • Save time on manual research: Automate the tedious process of sifting through ad libraries.

How It Works

  1. Scrape Facebook Ads: The workflow starts by running an Apify scraper to pull recent, active ads (e.g., from the last 7 days) related to a specific keyword like "ai automation" from the Facebook Ad Library. It grabs up to 200 ads, including their detailed information.
  2. Filter by Engagement: It then filters these scraped ads, keeping only those with significant engagement (e.g., over 1,000 likes), ensuring you focus on successful campaigns.
  3. Categorize and Process: The workflow smartly categorizes the filtered ads into Video, Image, and Text types for tailored analysis.
  4. Deep Dive with AI:
    • Video Ads: For video ads, it downloads the video, uploads it to Google Drive, and then sends it to Google Gemini for a detailed analysis. Finally, OpenAI processes the raw ad data and the Gemini video description to provide a comprehensive summary and a rewritten ad copy.
    • Image Ads: For image ads, OpenAI analyzes the image content directly to provide an "image prompt" (a description of the image). This is then combined with the ad's metadata, and OpenAI summarizes and rewrites the ad copy.
    • Text Ads: For text-only ads, OpenAI directly summarizes and rewrites the ad copy based on the scraped ad data.
  5. Record Insights: All the analyzed data, including the ad archive ID, page info, original and rewritten ad copy, and AI-generated content descriptions, are appended to your designated Google Sheet, creating a valuable database of competitive insights.

How to Set It Up

To set up your AI Facebook Ad Spy Tool, follow these steps:

  1. APIs & Credentials:
    • Apify: Get your Apify API key and add it to the "Run Ad Library Scraper" node.
    • Google Drive: Ensure you have a Google Drive account set up to temporarily store video files. Connect your Google Drive credentials.
    • Gemini (Google Generative Language API): Obtain your API key for Gemini and add it to the "Begin Gemini Upload Session," "Upload Video to Gemini," and "Analyze Video with Gemini" nodes.
    • OpenAI: Ensure your OpenAI API key is configured and linked to the "Output Video Summary," "Output Image Summary," and "Output Text Summary" nodes.
    • Google Sheets: Set up a Google Sheet where your ad data will be stored. Connect your Google Sheets account and update the "Add as Type = Video," "Add as Type = Image," and "Add as Type = Text" nodes with your Google Sheet ID and sheet name.
  2. Workflow Import: Import the provided workflow JSON into your n8n instance.
  3. Configure Nodes:
    • "Run Ad Library Scraper": Adjust the q parameter in the jsonBody to your desired keyword (e.g., "AI automation") and the count to control how many ads you want to scrape.
    • "Filter For Likes": Modify the rightValue in this node to set your preferred minimum number of likes for ads to be analyzed.
    • AI Prompts: Review and adjust the prompts in the OpenAI nodes ("Output Video Summary," "Output Image Summary," "Output Text Summary") as needed to refine the summary and ad copy rewriting style to match your requirements.
  4. Execute: Run the workflow manually using "When clicking ‘Execute workflow’" to test it, or set up a schedule for automated daily or weekly runs.

By following these steps, you'll have a powerful, automated system providing actionable insights into your competitors' most effective Facebook ad strategies!