Website Design & Development Organic Marketing Paid Advertising Branding & Identity Digital Strategy Email Marketing Website Design & Development Organic Marketing Paid Advertising Branding & Identity Digital Strategy Email Marketing

Insights — Paid Advertising

Build an AI-powered Google Ads chatbot in 9 simple steps.

A 9-node n8n workflow that turns plain-English questions into real-time Google Ads insights — delivered straight to Telegram in under 3 seconds.

Read Time

7 min read

Build Time

6 hours

Monthly Cost

£0

Time Saved

40+ hours / month

Watch the full walkthrough, or read the breakdown below.

What This Bot Does

Ask it a question. Get a straight answer.

"Show me yesterday's campaign performance"

"What are my top keywords?"

"Which campaigns are over budget?"

The bot fetches real-time data from the Google Ads API, analyses it with Claude AI, and sends a formatted response straight to Telegram — no dashboards, no exports, no waiting.

6 hours

Total build time

£0

Monthly cost

40+ hrs

Time saved per month

What You'll Need

Four accounts, no code framework required.

An n8n account (cloud or self-hosted)

A Telegram bot token (get one from @BotFather)

Google Ads API credentials with OAuth tokens

A Claude AI API key

The Build

The 9-node workflow.

01

Telegram Trigger

Listens for incoming messages from users. Set the trigger to "message (updates)" and connect your bot token. This creates a webhook that fires the workflow automatically.

02

Extract Question

Uses JavaScript to detect intent from the user's question — checking for keywords like "yesterday", "keywords", and "search terms" to determine what data to fetch.

const question = $input.item.json.message.text.toLowerCase();
let queryType = 'campaigns'; // default

if (question.includes('search term')) queryType = 'search_terms';
else if (question.includes('keyword')) queryType = 'keywords';
else if (question.includes('yesterday')) queryType = 'yesterday';

03

Get Access Token

Exchanges your refresh token for a fresh access token. Google Ads API requires OAuth, and tokens expire every hour — this automates the refresh with a POST to oauth2.googleapis.com/token using your client credentials and refresh token.

04

Build GAQL Query

Creates the right Google Ads Query Language (GAQL) statement based on the detected intent. Different query types return different data:

Campaigns — basic performance over 30 days Keywords — metrics with match types Search Terms — what people actually searched (7 days) Yesterday — quick daily recap

05

Fetch Google Ads Data

Calls the Google Ads API with your GAQL query. Requires three headers:

Authorization — your access token developer-token — from Google Ads API Center login-customer-id — your manager account ID

06

Format Data for Claude

Converts messy nested JSON into clean, readable text — handling cost conversion (micros to pounds), CTR formatting, and structuring the data so Claude can actually analyse it.

function formatCost(micros) {
  return '$' + (micros / 1000000).toFixed(2);
}

07

Ask Claude

Sends the formatted data to Claude Sonnet 4 along with the user's original question. Claude analyses the numbers, identifies trends, and generates insights in natural language — for around $0.003 per query.

08

Extract Claude Response

Pulls the text answer out of Claude's JSON response structure — a simple extraction from content[0].text.

09

Send Text Message

Delivers Claude's analysis back to the user on Telegram — the complete workflow, from question to answer, in under 3 seconds.

Real-World Impact

5-8 minutes, down to 3 seconds.

Before

Log in → navigate UI → filter data → export → analyse.

5–8 min / query

After

Text a question → get an answer.

3 seconds / query

Monthly savings: 40+ hours freed up for strategy instead of data pulls.

Why This Works

Plain English beats complex syntax.

Traditional Approach Requires

  • Learning complex GAQL syntax
  • Desktop access to Google Ads
  • Manual data exports
  • Time-consuming UI navigation

Chatbot Approach Delivers

  • Plain English questions
  • Mobile-first access from anywhere
  • Instant responses with AI insights
  • Zero manual work

Next Steps

Once the basic workflow is built.

The code is the same. The data is more accurate — it's the primary source. The cost is near zero.
You just get your time back.

Philip Beaumont, founder of Sway Digital

Written By

Philip Beaumont

Founder, Sway Digital • MSc Digital Marketing Communications

Philip Beaumont is the founder of Sway Digital, a digital agency built to sway your audience — combining website design & development, SEO, paid advertising, and brand identity into strategies that move the numbers that matter. He holds an MSc in Digital Marketing Communications and works hands-on with every client, from strategy through to execution.

Connect on LinkedIn

Want This Built For You?

Let's automate your reporting too.

Book a free 30-minute strategy call. We'll talk through your goals and follow up with a clear plan.