Analyze competitor ads from Facebook Ad Library using Apify, generate style descriptions with GPT-4o Vision, and create unique ad variations automatically using this powerful n8n workflow.
Download this n8n workflow template and start using it instantly.
Developing fresh, high-performing advertising creatives is time-consuming and often involves manual competitor analysis. This advanced n8n workflow solves this by fully automating the pipeline, moving from competitive research to asset generation.
It leverages Apify to scrape real-time data from the Facebook Ad Library, providing a wealth of competitor insights. The core innovation lies in the AI steps: GPT-4o Vision analyzes the visual components of competitor ads, and a subsequent prompt-spinning n8n node generates three unique creative variations per ad. Finally, DALL-E (via the HTTP Request n8n node) executes the generated prompts, producing campaign-ready creative variations, all logged neatly in Google Sheets and organized in Google Drive. This specific n8n workflow dramatically increases the speed and volume of high-quality ad testing.
This comprehensive n8n workflow executes in four main steps after initial setup:
Spin Prompts). This n8n node acts as a prompt engineer, generating multiple, structured variations (3 per ad) in JSON format.Generate Image Using GPT Image 1). The resulting AI-generated image is converted to a binary file and uploaded to the 'Spun Assets' folder via a Google Drive n8n node. Finally, a Google Sheets n8n node logs all competitor details, spun prompts, and direct links to the new creative assets, completing the entire n8n automation.To deploy this powerful n8n workflow template, follow these steps:
Set Variables). This will create the parent 'PPC Thievery' Google Drive folder and the 'PPC Thievery' Google Sheet.Set Variables n8n node with the actual IDs generated in Step 3 (the googleDriveFolderId and spreadsheetId). Also, customize the changeRequest variable to define the styling instructions for your new ad creatives.Run Ad Library Scraper HTTP Request n8n node, replace in the Authorization header. Customize the JSON body with your desired search terms and desired ad count. This n8n template is now ready for production execution.This n8n workflow relies on the meticulous configuration of several key n8n nodes:
Set Variables n8n node: Essential for configuration. Stores googleDriveFolderId, spreadsheetId, and the user-defined changeRequest prompt used by the AI to define new ad styles.
Run Ad Library Scraper (HTTP Request n8n node): Connects to Apify to scrape Facebook Ad Library data. Key configuration includes the API endpoint and Authorization header containing the Apify key, and a POST body specifying search parameters (e.g., keywords, country, active status).
Filter n8n node: Used to ensure data quality by filtering items where snapshot.images[0].originalimageurl exists, thus processing only image ads.
Google Drive n8n node (Create Asset Parent Folder): Dynamically creates folders using the adarchiveid for unique organization. Key setting: Folder ID is linked to the variable set in the Set Variables n8n node.
OpenAI n8n node (OpenAI Vision): Uses the analyze operation with the image URL, passing the original image to GPT-4o to generate a detailed description.
Spin Prompts (OpenAI n8n node): Utilizes a sophisticated system prompt to take the image description and the user's changeRequest to generate three variations in a specific JSON structure (variants).
Generate Image Using GPT Image 1 (HTTP Request n8n node): This handles the core image generation. It uses a multipart-form-data request targeting the OpenAI images/edits API. It requires the original image file and the prompt (the spun variant from the loop) to execute the image-to-image modification.
Google Sheets n8n node: Performs the final action, using the append operation to log all relevant metadata, links to the source folder, spun folder, and the direct link to the newly generated creative.
Use this custom n8n workflow to automatically compare your current n8n instance version against the official latest release using the n8n API and HTTP requests. Ensure you're always up-to-date.

Automate vendor quote comparison using this robust n8n workflow. Leverage Grok AI for intelligent summarization, log results to Google Sheets, and instantly notify procurement teams via email. Use this n8n template for faster, data-driven decisions.

Compare three advanced LLM processing architectures—Sequential, Agent-Based, and Parallel—using Anthropic Claude 3.7 in an n8n workflow. Learn how to optimize AI speed and scale using core n8n node logic.

Automate competitive price monitoring using this n8n workflow. Scrape competitor sites via Bright Data, log prices to Google Sheets, and send instant Slack/Email alerts when prices undercut thresholds. Utilize this powerful n8n template for pricing strategy.

Automate competitor monitoring and SEO gap analysis using this powerful n8n workflow. Integrate Thordata SERP results with OpenAI Agents for structured keyword insights.

Hi 👋 I'm Nick. I make money with automation & teach others how they can too. If you have any questions about my templates or about my n8n builds, feel free to ask and I'll happily respond in the comments. Thanks for reading!







































