HAMMAD YOUSUF

PROMPTS & TUTORIALS

How to build a Google Ads agent with n8n + MCP

TL;DR

You can automate Google Ads optimisation with three parts: n8n for scheduling, MCP to expose the Google Ads and GA4 APIs as tools, and a Claude agent prompted with a senior media buyer's judgment rules. This exact setup cut weekly optimisation from 9 hours to 2 and lifted ROAS +18% QoQ.

Most Google Ads automation is either a rules engine that can't reason or a black-box 'AI budget' toggle you can't trust. The middle path is an agent: a language model with real API access, a tight role prompt, and guardrails that keep it inside a budget envelope.

The three-part architecture

n8n owns time: a cron workflow fires every morning at 07:00 GST. MCP owns access: the Google Ads and GA4 APIs are exposed to the agent as typed tools, so the model never touches raw credentials. Claude owns judgment: a media-buyer role prompt decides what changed, what drifted, and where budget should move.

The guardrails that make it safe

ONE TACTIC A WEEK

One tactic a week. No filler.

The agent may reallocate up to 20% of daily budget between campaigns, pause ads with CTR under half the account median, and add negatives from search-term waste. Anything structural — new campaigns, bid strategy changes — lands in a proposals file for human approval. Every action is logged with its reasoning.

What it actually produced

On a live AED 42K account this loop cut weekly optimisation from 9 hours to about 2, and ROAS improved 18% quarter over quarter — mostly because daily drift-correction catches what a weekly review misses. The full prompt behind this system is free on the prompt page linked below.

Hammad Yousuf

AI Marketing Automation Engineer · Dubai, UAE

FAQ

Common questions

Can n8n automate Google Ads by itself?

n8n handles scheduling and API calls well, but it can't reason about performance. Pairing it with a Claude agent via MCP adds the judgment layer — analysis, reallocation and reporting.

Is it safe to let an AI change my campaigns?

With guardrails, yes: cap daily reallocation, require approval for structural changes, and log every action with reasoning. That's exactly how this production system runs.

What results can I expect?

On the account this tutorial is based on: weekly optimisation time fell from 9 hours to 2 and ROAS rose +18% quarter over quarter.