Skip to main content

Automate monthly Google Ads performance analysis with GPT-4o, Sheets & Slack

Workflow preview

Workflow preview
100%
Automate monthly Google Ads performance analysis with GPT-4o, Sheets & Slack preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Google Ads + OpenAI + Sheets — Monthly AI Performance Analysis Automate monthly ad performance insights with AI powered recommendations Overview This workflow automatically analyzes Google Ad...

Best for

  • Market Research automation workflows
  • AI Summarization automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.httprequest, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.googlesheets, n8n-nodes-base.slack, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Nikan Noorafkan.

Original n8n.io source

1.1 Workflow description

Title
Automate monthly Google Ads performance analysis with GPT-4o, Sheets & Slack
Workflow name
Automate monthly Google Ads performance analysis with GPT-4o, Sheets & Slack

📊 Google Ads + OpenAI + Sheets — Monthly AI Performance Analysis

Automate monthly ad performance insights with AI-powered recommendations


🧩 Overview

This workflow automatically analyzes Google Ads performance every month, using the Google Ads API and OpenAI (GPT-4o) to uncover which ad themes, categories, and messages perform best. It then generates a structured AI report, saves it to Google Sheets, and sends a Slack summary to your marketing team.

💡 Perfect for digital marketers, agencies, and growth analysts who want automated campaign insights without manually crunching numbers.


⚙️ Features

✅ Automatically runs on the 1st of each month ✅ Fetches last 30 days of ad performance via Google Ads API (GAQL) ✅ Uses GPT-4o for natural-language insights & improvement ideas ✅ Groups ads by category and theme (e.g., “Free Shipping,” “Premium”) ✅ Generates a clean, formatted markdown report ✅ Archives reports in Google Sheets for trend tracking ✅ Notifies your Slack channel with AI-driven recommendations


🧠 Architecture

Component Purpose
n8n Workflow engine
Google Ads API Source of ad performance data
OpenAI (GPT-4o) Analyzes CTR patterns and writes recommendations
Google Sheets Report archiving and history tracking
Slack Team notifications

🧭 Workflow Logic (Summary)

Monthly Trigger (1st of Month) ⬇️ 1️⃣ Get Performance Data (Google Ads API) Fetches 30-day CTR, clicks, impressions for all responsive search ads. ⬇️ 2️⃣ Prepare Performance Data Groups data by ad group and theme keywords, builds an AI prompt. ⬇️ 3️⃣ AI Agent (LangChain) + GPT-4o Analyzes patterns and generates actionable insights. ⬇️ 4️⃣ Generate Report (Code) Formats a Markdown report with AI recommendations and KPIs. ⬇️ 5️⃣ Save to Google Sheets Archives results for long-term analytics. ⬇️ 6️⃣ Send Report to Slack Delivers the summary directly to your marketing channel.


🔑 Environment Variables

Variable Example Description
GOOGLE_ADS_CUSTOMER_ID 123-456-7890 Google Ads customer account ID
GOOGLE_ADS_API_VERSION v17 Current Ads API version
GOOGLE_SHEET_ID 1xA1B2c3D4EFgH... Target spreadsheet ID
OPENAI_API_KEY sk-xxxxx OpenAI API key for GPT-4o
SLACK_WEBHOOK_URL https://hooks.slack.com/... Slack incoming webhook

🔐 Credential Setup

Service Type Required Scopes
Google Ads OAuth2 (googleAdsOAuth2Api) https://www.googleapis.com/auth/adwords
OpenAI API key (openAiApi) Full access
Google Sheets OAuth2 https://www.googleapis.com/auth/spreadsheets
Slack Webhook chat:write

🧱 Node-by-Node Breakdown

Node Purpose Key Configuration
Monthly Trigger Starts workflow on 1st of every month Cron: 0 0 1 * *
Get Performance Data Queries Ads data Endpoint: https://googleads.googleapis.com/v17/customers/{id}/googleAds:search
Query: GAQL (CTR, clicks, impressions, last 30 days)
Prepare Performance Data Aggregates and builds AI prompt Groups by ad group and theme, computes CTRs
AI Agent – Analyze Performance Passes formatted data to GPT-4o System message: “You are a Google Ads performance analyst…”
OpenAI Chat Model (GPT-4o) Analytical reasoning engine Model: gpt-4o, Temperature 0.2
Generate Report Parses AI output, formats Markdown report Adds recommendations + next steps
Save Report to Sheets Archives report Sheet name: Performance Reports
Send Report (Slack) Sends summary Uses report_markdown variable

🧠 AI Report Example

# 30-Day Performance Analysis Report

## Executive Summary
Analyzed: 940 ads
Period: Last 30 days

## Top Performing Categories
- Running Shoes: 9.4% CTR (120 ads)
- Fitness Apparel: 8.2% CTR (90 ads)

## Top Performing Themes
- "Free Shipping" messaging: 9.8% CTR (58 ads)
- "Premium" messaging: 8.5% CTR (44 ads)

## AI-Powered Recommendations
1. [HIGH] Emphasize “Free Shipping” across more ad groups.  
   Expected Impact: +5 % CTR  
2. [MEDIUM] Test “Premium Quality” vs. “New Arrivals.”  
   Expected Impact: +3 % CTR  

## Next Steps
1. Implement new ad variations  
2. A/B test messaging  
3. Re-analyze next month

🧩 Testing Procedure

1️⃣ Temporarily disable the cron trigger. 2️⃣ Run the workflow manually. 3️⃣ Confirm:

  • Google Ads node returns JSON with results.
  • AI Agent output is valid JSON.
  • Report is written to Sheets.
  • Slack message received.

4️⃣ Re-enable the monthly trigger once verified.


🧾 Output in Google Sheets

Date Ads Analyzed Top Category Top Theme Key Recommendations Generated At
2025-10-01 940 Running Shoes Free Shipping “Add Free Shipping copy to 10 ads” 2025-10-01T00:05Z

🪜 Maintenance

Frequency Task
Monthly Review AI accuracy and update themes list
Quarterly Refresh Google Ads API credentials
As needed Update GAQL fields for new metrics

⚙️ API Verification

Endpoint: POST https://googleads.googleapis.com/v17/customers/{customer_id}/googleAds:search

Scopes: https://www.googleapis.com/auth/adwords

GAQL Query:

SELECT ad_group_ad.ad.id,
       ad_group_ad.ad.responsive_search_ad.headlines,
       ad_group.name,
       metrics.impressions,
       metrics.clicks,
       metrics.ctr
FROM ad_group_ad
WHERE segments.date DURING LAST_30_DAYS
  AND metrics.impressions > 100
ORDER BY metrics.clicks DESC
LIMIT 1000

✅ Fully valid query — verified for GAQL syntax, fields, and resource joins. ✅ OAuth2 flow handled by n8n’s googleAdsOAuth2Api. ✅ Optional: add "timeout": 60000 for large accounts.


📈 Metrics of Success

KPI Target
Report accuracy ≥ 95 %
Monthly automation success ≥ 99 %
CTR improvement tracking +3–5 % over time

🔗 References


🎯 Conclusion

You now have a fully automated Google Ads performance analysis workflow powered by:

  • Google Ads API for granular metrics
  • OpenAI GPT-4o for intelligent recommendations
  • Google Sheets for archiving
  • Slack for team-wide updates

💡 Result: A recurring, data-driven optimization loop that improves ad performance every month — with zero manual effort.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Monthly Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1

Block 2 - Get Performance Data

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 3 - Prepare Performance Data

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 4 - AI Agent - Analyze Performance

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 1.7

Block 5 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1

Block 6 - Generate Report

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 7 - Save Report to Sheets

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.4

Block 8 - Send Report

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.1

Block 9 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Automate monthly Google Ads performance analysis with GPT-4o, Sheets & Slack
Complexity intermediate
Nodes 13
Categories Market Research, AI Summarization
Author Nikan Noorafkan
Published 22 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10062/10062.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Automate monthly Google Ads performance analysis with GPT-4o, Sheets & Slack do?

Google Ads + OpenAI + Sheets — Monthly AI Performance Analysis Automate monthly ad performance insights with AI powered recommendations Overview This workflow automatically analyzes Google Ad...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Market Research, AI Summarization use case.