This workflow is built for PPC managers, digital marketing agencies, and in-house marketing teams who run Google Ads search campaigns and want to stop wasting budget on irrelevant queries. Instead of manually reviewing hundreds or thousands of search terms in spreadsheets, this template automates the entire analysis pipeline — from raw Google Ads data to a fully structured, AI-analyzed search terms report with actionable keyword exclusion and inclusion recommendations, saved directly to Google Sheets.
This n8n workflow connects the Google Ads API, an OpenAI chat model, and Google Sheets to deliver a production-ready search term intelligence pipeline that runs automatically every 30 days — or on demand:
Pulls search term data directly from Google Ads — using the Google Ads API (GAQL searchStream), the workflow fetches every search term that triggered an ad in the last 30 days, including campaign and ad group context, matched keyword, match type, search term status (Added / Excluded / None), and full performance metrics: impressions, clicks, CTR, cost, avg CPC/CPM, conversions, conversion rate, and cost per conversion
Cleans and formats the dataset for AI — a Code node normalizes and filters raw API data: formats currency and percentage values, applies a metrics threshold filter, and structures the data as a clean input for the AI model
Runs a comprehensive AI analysis on every search term — an OpenAI chat model (GPT-5.4-mini or any LLM supported by n8n) acts as a senior PPC strategist. For each term, it outputs:
Generates a Recommended Global Exclusions list — the AI distills patterns across the full dataset into a grouped negative keyword list, organized by theme (e.g. Informational/Zero-Intent Modifiers, Price/Deal Seeking Terms, Job Seeker Terms, Wrong Audience Terms), ready for direct upload to Google Ads shared lists
Produces an Inference Summary — the AI documents its assumptions from business context and search terms dataset and how they influenced the analysis
Saves everything to Google Sheets automatically — a new spreadsheet is created on every run with three sheets: Search Terms Analysis, Global Exclusions List, and Inference Summary
A new Google Spreadsheet is automatically created on every wokflow run, named after your company and timestamped:
"Search Terms Analysis & Keyword Exclusion/Inclusion Suggestions (Company Name — DD/MM/YYYY HH:MM)"
📊 Search Terms Analysis
The complete, AI-enriched analysis table. Every search term from the report is included — no filtering, no omissions. All original Google Ads columns are preserved, with AI-generated columns appended:
search_term, status, campaign, ad_group, matched_keyword, match_typeimpressions, clicks, ctr, cost, avg_cpc, avg_cpm, conversion_rate, cost_per_conversionintent_signal — Transactional / Commercial / Informational / Navigationalrelevancy — 5-level scalerelevancy_reasoning — specific AI explanation per termexclusion_suggestion — negative keyword with match type syntaxexclusion_level — Account / Campaign / Ad Grouppriority_for_exclusion — High / Medium / Lowinclusion_suggestion — keyword to add with recommended match typeinclusion_type — New keyword / New ad group / New campaigninclusion_level — Account / Campaign / Ad Group🚫 Global Exclusions List
Grouped negative keywords identified as universally or near-universally problematic across campaigns. Each entry includes the negative keyword with correct match type formatting, its thematic group, and the rationale for account-level exclusion.
📋 Inference Summary
Documents any assumptions the AI made when business context fields were incomplete or ambiguous — useful for auditing the AI's reasoning and improving the Set node configuration over time.
DURING LAST_30_DAYS clause in the GAQL query to use a custom range (e.g. last 7 days, last quarter, current month)Built by a digital marketing and automation specialist. For questions, advanced customizations, or custom n8n workflow solutions, feel free to reach out on LinkedIn.