๐Ÿ“Š Clone & customize competitor Facebook ads with Gemini AI and Apify

โšก 1,040 views ยท ๐Ÿ“Š Market Research & Insights

๐Ÿ’ก Pro Tip โ€” HTTP Request scraping tends to break when sites update their markup. If youโ€™re scraping a major platform, check if ScraperNode covers it โ€” it has maintained scrapers for LinkedIn, Instagram, TikTok, YouTube, and 20+ other platforms that return structured data.

View All Scrapers

Description

Nano Banana Ad Cloning System

This n8n template demonstrates how to automatically clone and adapt competitor Facebook ads for your own product using AI. Simply provide a Facebook Ad Library URL and your product image, and the workflow scrapes competitor ads, analyzes their design and messaging, then generates new versions featuring your product while maintaining the original adโ€™s style and effectiveness.

Use cases

Good to know

How it works

  1. Form Submission: User submits a Facebook Ad Library URL and uploads their product image
  2. Product Processing: The product image is converted to base64 for AI processing
  3. Ad Scraping: Apifyโ€™s Facebook Ad Library Scraper extracts up to 20 ads from the provided URL
  4. Iteration Setup: The workflow processes each scraped ad individually
  5. Image Download: Each competitor ad image is downloaded and converted to base64
  6. Reference Storage: Original competitor ads are uploaded to Google Drive for reference
  7. Prompt Generation: Gemini 2.5 Pro analyzes both images and creates detailed instructions for cloning the ad while replacing competitor branding with your product
  8. Ad Generation: Gemini 2.5 Flash Image Preview generates the new ad image based on the instructions
  9. Content Filter: Checks if generation was blocked for prohibited content
  10. Upload & Loop: Successfully generated ads are uploaded to Google Drive, then the workflow moves to the next ad

How to use

  1. Click the form trigger URL to access the submission form
  2. Enter a Facebook Ad Library URL (e.g., from a competitorโ€™s page showing active ads)
  3. Upload your product image with clear branding and packaging
  4. Submit the form and wait for processing to complete
  5. Find your cloned ads and reference images organized in Google Drive folders
  6. Review generated ads and select the best performers for your campaigns

Requirements

Customizing this workflow

๐Ÿ”— Nodes Used

HTTP Request, Google Drive, n8n Form Trigger, Convert to File, Extract from File

๐Ÿ“ฅ Import

Download workflow.json and import into n8n: Workflow menu โ†’ Import from File

๐Ÿ“– Importing guide ยท ๐Ÿ”‘ Credential setup