I Automated My Entire Meta Ad Process (Here's The Exact System)
By Mr. Paid Social
Automated Ad Creation System with N8N & Google Sheets
Key Concepts:
- N8N: An automation platform allowing complex workflows to be built and automated.
- Self-Hosting: Running N8N on a user-owned server (e.g., Hostinger VPS) instead of using N8N’s cloud service.
- Google Drive Integration: Utilizing Google Drive folders as a source for ad creatives (images & videos).
- Meta Graph API: Facebook’s API used for programmatic ad creation and management.
- Workflow: A series of interconnected nodes within N8N that define an automated process.
- Nodes: Individual building blocks within an N8N workflow, each performing a specific task.
- JSON: A data format used for exchanging data between N8N nodes and APIs.
- OAUTH: An authentication protocol used to grant access to Google Drive and Meta APIs.
- API Token: A unique key used to authenticate requests to the Meta Graph API.
1. Introduction & Background
Caleb Cruz, with 12+ years of experience managing over $150 million in ad spend, presents a system for fully automating ad creation. He emphasizes the goal of eliminating repetitive tasks within Ads Manager, aiming for a system where ads can be created without directly interacting with the ad account interface. The system leverages N8N, Google Drive, and the Meta Graph API.
2. Setting Up N8N – Self-Hosting vs. Cloud
The initial step involves setting up N8N. Two options are presented: using N8N’s hosted cloud service or self-hosting. Self-hosting is recommended for unlimited workflow executions and scalability. Hostinger is highlighted as a cost-effective solution for self-hosting, offering a one-click N8N deployment for $7/month (61% off the regular $18/month price). Self-hosting provides benefits including:
- Unlimited workflows
- Unlimited concurrent executions
- Access to community nodes
- N8N Q mode
- 100 pre-made workflows
- Hosting of an API N8N community node
- AI assistant powered by MCP
- Free cloud domain for a year.
The setup process within Hostinger involves selecting a VPS, choosing N8N, creating a password, and optionally adding daily auto-backups.
3. Workflow Import & Authentication
Once N8N is set up, a pre-built template workflow is imported via a JSON file. The core of the setup involves authenticating two key applications: Meta’s Graph API and Google Drive API.
- Google Drive Authentication: This requires creating a project in the Google Developer Console (console.developers.google.com), enabling the Drive API, creating OAuth client ID credentials (Web Application type), and configuring the authorized redirect URI (provided by N8N). The Client ID and Client Secret are then copied into the N8N workflow.
- Meta Graph API Authentication: This involves creating a Facebook App through developers.facebook.com, adding the Marketing API, and obtaining an access token. Crucially, the app must be switched from “Development” to “Live” mode, requiring a privacy policy URL (any valid URL can be used for internal tools).
4. Google Sheet Configuration
The workflow relies on a Google Sheet template (link in the description) to manage settings. Key configuration elements within the sheet include:
- Google Sheet ID: The unique identifier from the Google Sheet URL.
- Google Drive Folder ID: The ID of the Google Drive folder containing ad creatives.
- Ad Account ID: The ID of the Facebook ad account where ads will be created.
- Template Image/Video Ad ID: The ID of existing, high-performing ads to use as templates.
- Target Ad Set ID: The ID of the ad set where new ads will be placed.
5. Workflow Execution & Functionality
After authentication and Google Sheet configuration, the workflow can be executed manually or scheduled. The workflow performs the following steps:
- Trigger: Initiated manually or via a schedule (e.g., every minute).
- Input Fields: Reads configuration data from the Google Sheet.
- Pull Creative Library: Checks the Google Sheet to identify creatives already uploaded.
- Aggregate Folder IDs: Collects all Google Drive folder IDs specified in the Google Sheet.
- Looping: Iterates through each Google Drive folder.
- Creative Processing: For each folder, identifies new creatives.
- Video Processing:
- Checks if the video file size exceeds 100MB. If so, logs an error.
- Downloads the video from Google Drive.
- Uploads the video to Meta.
- Waits for Meta to process the video (thumbnail generation).
- Retrieves the thumbnail URL.
- Swaps the video in a template ad.
- Creates a copy of the template ad.
- Renames the ad.
- Updates the Google Sheet with ad details.
- Image Processing: Similar to video processing, but handles multiple images simultaneously.
- AI Creative Enhancements: Applies pre-selected AI enhancements from the template ad.
6. Advanced Features & Customization
- Scheduling: The self-hosted nature of N8N allows for frequent scheduling (e.g., every minute).
- Dynamic Naming: Ad names can be dynamically generated based on the creative filename.
- AI Integration: The system can leverage Meta’s built-in AI ad copy generation.
- Adtable.ai: An alternative, more user-friendly bulk ad system built on AirTable is mentioned for complex ad structures.
7. Use Cases & Community
The system is particularly useful for:
- Quickly launching new ads based on creative team submissions.
- Maintaining a consistent ad flow for ongoing campaigns (e.g., school community ads).
Caleb encourages users to join his private community on School (link in description) for support, feature requests, and updates.
8. Technical Details & Workflow Overview
The workflow utilizes custom HTTP requests for uploading creatives to Meta. It leverages N8N’s looping mechanisms and conditional logic (if statements) to handle different file types and processing steps. The system avoids processing subfolders within Google Drive. The workflow is designed to be highly customizable, allowing users to modify naming conventions and integrate additional features.
Notable Quote:
“Every click inside of Ads Manager hurts my soul. This system is the most simple way possible for you to create ads without even touching your ad account.” – Caleb Cruz.
Conclusion
This system provides a powerful and automated solution for ad creation, significantly reducing manual effort and streamlining the ad launch process. By combining N8N, Google Drive, and the Meta Graph API, users can create a highly efficient workflow for managing and scaling their ad campaigns. The self-hosting option with Hostinger offers a cost-effective and scalable solution for long-term automation.
Chat with this Video
AI-PoweredHi! I can answer questions about this video "I Automated My Entire Meta Ad Process (Here's The Exact System)". What would you like to know?