Automated Google Ad Copy Generation, Validation, and Google Sheets Export - n8n Workflow

Use this advanced n8n workflow to automatically generate high-volume, compliant Google Ad copy using a product feed and Relevance AI. Includes custom n8n node character validation and saves results to Google Sheets. This n8n workflow optimizes your PPC campaigns.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Ideal Users for this n8n Template

E-commerce PPC Managers: Struggling to generate scalable and compliant ad copy for thousands of products.
Digital Agencies: Seeking a repeatable, automated n8n workflow for dynamic creative optimization (DCO).
Automation Specialists: Interested in integrating complex external AI services (like Relevance AI) with core business systems.
Technical Users: Who need robust character validation logic implemented via a custom n8n node.

Overview

Generating thousands of highly relevant and compliant Google Ads often requires significant manual effort and time. This n8n workflow solves this scalability problem by creating a fully automated pipeline, starting with a daily schedule n8n trigger.

It fetches real-time product data (e.g., via Channable), leverages Relevance AI (powered by models like Claude 3.5) to instantly draft headlines and descriptions, and crucially, ensures compliance.

A key feature of this n8n workflow is the custom Code n8n node that accurately validates and truncates ad copy to meet strict 30/90 character limits, preventing immediate ad disapproval. Only validated and approved ads proceed, ultimately being aggregated and stored in Google Sheets, ready for bulk upload to Google Ads. This robust n8n template ensures efficiency and policy adherence.

How it Works

This comprehensive n8n workflow runs on a set schedule and performs item-level validation and processing:


  1. Schedule Trigger: The process begins daily using the Schedule n8n trigger, set to run at midnight.

  2. Fetch Product Data: An HTTP Request n8n node fetches the complete product feed from the specified Channable API endpoint, retrieving necessary details like title, description, and price.

  3. Batch Processing: The product list is split into batches (50 items) using the Split Into Batches n8n node to respect API rate limits during the generative AI phase.

  4. AI Copy Generation: A subsequent HTTP Request n8n node calls the Relevance AI service to generate initial ad copy (headline and description) based on the product data.

  5. Character Validation (Critical Step): A custom Code n8n node executes JavaScript to enforce Google's strict 30-character headline and 90-character description limits, truncating and cleaning the text if necessary. This custom logic within the n8n node is essential for success.

  6. Compliance Check: Another HTTP Request n8n node calls a specific Relevance AI Agent to verify the copy against Google Ads policy guidelines (e.g., checking for banned phrases or exaggerated claims).

  7. Conditional Routing: An IF n8n node checks the validation result. If the status is 'APPROVED', the ad proceeds for formatting. If rejected, an Alert n8n node immediately notifies a team via Slack.

  8. Aggregation & CSV Creation: Approved items are combined using the Aggregate Batches n8n node, and a final Code n8n node generates a ready-to-use, properly escaped CSV string.

  9. Data Persistence: The generated CSV data is saved directly to a specified Google Sheets document using the Google Sheets n8n node.

  10. Notification: The n8n workflow concludes by sending a Slack notification summarizing the total number of ads generated.

Installation Guide

To deploy this powerful n8n workflow and start generating ad copy, follow these steps:


  1. Import the n8n Template: Copy the provided JSON and import it directly into your self-hosted or cloud n8n instance.

  2. Credentials Setup: You will need to configure credentials for the following services:

HTTP Header Auth: For the Channable API (or your product feed) and the Relevance AI API calls. This typically uses an API Key.
Google Sheets OAuth2 API: To allow the Google Sheets n8n node to write data to your sheet.

  1. Environment Variables: Define the following environment variables (or replace the expressions in the n8n nodes directly):

CHANNABLEAPIURL, PROJECTID (For product feed retrieval)
RELEVANCE
AIAPIURL (For AI calls)
RELEVANCEAGENTCOMPLIANCEID (The ID of your compliance checking agent)
GOOGLE
SHEET_ID (The ID of the spreadsheet where ads will be saved).

  1. Testing: Execute the Schedule n8n trigger manually to ensure all nodes connect and the AI services respond correctly before activating the daily schedule.

Node Details

Schedule Trigger - Daily: The starting n8n trigger, set to run once daily (0 0 ).
Get Product Feed (HTTP Request): Fetches all items from the external product data source (Channable/e-commerce platform). Uses custom HTTP Header Auth credentials.
Split Into Batches1: A crucial flow control n8n node that limits the subsequent AI processing to batches of 50 items.
Generate Ad Copy - Relevance AI1 (HTTP Request): Sends product details to the Relevance AI API for generating raw headline and description content.
Validate Character Limits1 (Code n8n node): Contains critical custom JavaScript logic. This n8n node ensures that the AI-generated text complies with Google's character limits (30 chars for headline, 90 for description) by accurately counting and truncating the content.
Compliance Check Agent1 (HTTP Request): Queries a specialized AI agent for policy verification.
IF Compliant1 (IF n8n node): Splits the n8n workflow based on the compliance status reported by the AI agent.
Aggregate Batches: Recombines all items from successful batches before final CSV output.
Generate CSV File1 (Code n8n node): Generates a correctly formatted and escaped CSV file string from the aggregated JSON data, preparing it for bulk upload.
Save to Google Sheets (Google Sheets n8n node): The final step for persistent storage, saving the generated ads to the target spreadsheet. This ensures all successful data from the n8n workflow is recorded.
Alert - Non-Compliant (Slack n8n node): Sends immediate alerts for any ad copy flagged as non-compliant.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by

Hey, I’m Nikan Noorafkan — a creator passionate about building smart, automated workflows that drive business outcomes. With a background in performance marketing, user acquisition, and retention strategies, I use n8n to connect data, automate repetitive tasks, and scale growth across the funnel.

Featured*