πŸ“Š Analyze Google Ads search terms and get negative keyword suggestions with OpenAI GPT-5.4-mini

⚑ 120 views Β· πŸ“Š Market Research & Insights

Description

Who is this template for?

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.


What this workflow does

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:

  1. 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

  2. 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

  3. 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:

    • Intent signal β€” Transactional, Commercial, Informational, or Navigational
    • Relevancy β€” on a 5-level scale from Directly Relevant to Directly Irrelevant
    • Relevancy reasoning β€” a specific, business-context-aware explanation referencing campaign fit, intent, and performance signals
    • Exclusion suggestion β€” exact negative keyword with correct match type syntax (broad, phrase, or exact)
    • Exclusion level β€” Account, Campaign, or Ad Group
    • Priority for exclusion β€” High, Medium, Low, or N/A
    • Inclusion suggestion β€” keyword to add with recommended match type
    • Inclusion type β€” New keyword, New ad group, or New campaign
    • Inclusion level β€” Account, Campaign, or Ad Group
  4. 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

  5. Produces an Inference Summary β€” the AI documents its assumptions from business context and search terms dataset and how they influenced the analysis

  6. 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


What you get in the output

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:

🚫 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.


How to set up

  1. Google Ads API β€” ensure you have a Developer Token in your Google Ads MCC account and set up OAuth 2.0 credentials with the required Google Ads API scopes
  2. OpenAI β€” add your OpenAI API key to the AI model node credentials
  3. Google Sheets β€” connect your Google account via OAuth 2.0. A new spreadsheet is created automatically on each run β€” no manual sheet setup required
  4. Configure the Set node β€” open the β€œSet Google Ads IDs & business context” node and fill in your Google Ads MCC ID (leave blank if accessing directly), Customer ID, Developer Token, and all business context fields: company name, website, industry, company overview, target audience, campaign goals, key offerings, and known irrelevant topics
  5. Activate the workflow β€” the schedule trigger runs automatically every 30 days. Use the manual trigger for on-demand analysis

Requirements


How to customize this workflow


About the creator

Built by a digital marketing and automation specialist. For questions, advanced customizations, or custom n8n workflow solutions, feel free to reach out on LinkedIn.

πŸ”— Nodes Used

Google Sheets, HTTP Request, Schedule Trigger, Basic LLM Chain, OpenAI Chat Model

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup