AI Agent Tool Server for Google Ads Campaign Management (MCP) - n8n Workflow

Use this n8n workflow template to create an AI Agent tool server for Google Ads. Features dynamic campaign retrieval using the specialized n8n trigger (MCP).

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • AI Developers & Engineers: Building sophisticated AI agents that require real-time access to marketing data.

  • Marketing Automation Specialists: Looking to bridge the gap between AI decision-making tools and external SaaS platforms like Google Ads.

  • n8n Power Users: Interested in deploying advanced n8n templates utilizing the MCP framework for server-side AI tooling.

Overview

This powerful n8n workflow is engineered to function as a Multi-Tool Communication Protocol (MCP) server, enabling external AI agents to securely and dynamically execute actions against the Google Ads API. By utilizing a specific n8n trigger, this server allows AI systems (like those powered by LangChain or custom models) to request specific Google Ads operations—such as retrieving a list of all campaigns or getting details for a single campaign. This design eliminates the need for manual API integration within the AI's codebase. The logic built into this n8n template automatically extracts parameters provided by the AI agent using the $fromAI() expression, directing them seamlessly into the Google Ads Tool n8n node. This approach maximizes operational efficiency and demonstrates an advanced application of the n8n node ecosystem for AI integration.

How it Works

The core of this automation is the Multi-Tool Communication Protocol (MCP) n8n trigger, which initializes the n8n workflow. This n8n trigger is configured to listen on a dedicated webhook path (google-ads-tool-mcp). When an external AI agent requires Google Ads information, it sends a structured request to this webhook, specifying the desired operation (e.g., get or getAll campaigns).


  1. Trigger Activation: The MCP n8n trigger receives the request from the AI agent.

  2. Dynamic Routing: Based on the AI agent's request, the MCP trigger intelligently routes the flow to the correct Google Ads Tool n8n node: either 'Get many campaigns' or 'Get a campaign'.

  3. Parameter Extraction: Each Google Ads Tool n8n node is configured using the $fromAI() expression to dynamically retrieve necessary parameters (like ClientCustomerId or Campaign_Id) sent by the AI agent.

  4. Execution: The respective n8n node executes the campaign retrieval against the Google Ads API.

  5. Response: The results are automatically formatted and returned directly to the initiating AI agent via the MCP n8n trigger, completing the external tool call requested by the AI.

Installation Guide

To deploy this powerful n8n workflow, follow these steps:


  1. Import the n8n Workflow: Import this provided JSON code into your n8n instance.

  2. Configure Credentials: Open one of the Google Ads Tool n8n nodes (e.g., 'Get many campaigns'). Add your Google Ads OAuth2 API credential. Ensure the credential ID is set correctly for all Google Ads Tool nodes within the n8n template.

  3. Activate the Server: Toggle the n8n workflow to 'Active'.

  4. Retrieve Webhook URL: Copy the unique webhook URL generated by the 'Google Ads Tool MCP Server' n8n trigger.

  5. Connect to AI Agent: Configure your external AI framework (e.g., LangChain, OpenAI Assistant) to use the copied webhook URL as the endpoint for the Google Ads tool definition. The n8n node structure handles all subsequent API interactions.

Node Details

This n8n workflow relies on three primary node types to create the functional AI tool server:

Google Ads Tool MCP Server (mcpTrigger):
Function: Serves as the initial n8n trigger and final response handler for the AI agent.
Key Configuration: Configured with the path /google-ads-tool-mcp. It automatically handles the routing requests to the specific connected tool nodes based on the AI's intent.

Get many campaigns (Google Ads Tool n8n node):
Function: Executes the getAll operation for campaigns, retrieving a list of all available campaigns under the specified customer ID.
Key Configuration: Uses the expression ={{ $fromAI('ClientCustomerId', , 'string') }} to dynamically fetch the required customer ID from the AI agent's request. This ensures flexible use across different accounts.

Get a campaign (Google Ads Tool n8n node):
Function: Executes the get operation, retrieving detailed information for a single, specific campaign.
* Key Configuration: This n8n node uses dynamic parameter fetching for both ClientCustomerId and the crucial Campaign_Id via the $fromAI() expressions, demonstrating how the n8n workflow accurately parses complex instructions from the AI.

Related n8n Workflows

Free

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

A hacker by nature, programmer by trade ⚒️ I'm looking to collaborate on things that save human labor 📫 How to reach me Github👇 -> Discord

Featured*