npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@zhibinyang/n8n-nodes-google-ads

v0.2.0

Published

n8n community node for Google Ads API integration using google-ads-api SDK

Readme

n8n-nodes-google-ads

English | 简体中文

This is an n8n community node for Google Ads integration using the google-ads-api SDK.

n8n is a fair-code licensed workflow automation platform.

⚠️ Note: This node is NOT compatible with n8n Cloud due to external npm dependencies. It requires a self-hosted n8n instance.

✨ Key Features

Custom GAQL Queries

This is the main advantage over the official n8n Google Ads node! This package supports custom GAQL (Google Ads Query Language) queries, allowing you to:

  • 🔍 Query any Google Ads resource - campaigns, ad groups, keywords, ads, etc.
  • 📊 Select specific metrics - customize exactly which fields and metrics you need
  • 🎯 Apply complex filters - use GAQL's powerful WHERE clauses
  • 🚀 Advanced segmentation - segment data by date, device, network, and more

Example GAQL Query:

SELECT 
  campaign.id, 
  campaign.name, 
  metrics.impressions, 
  metrics.clicks, 
  metrics.cost_micros 
FROM campaign 
WHERE campaign.status = 'ENABLED' 
  AND metrics.impressions > 0 
ORDER BY metrics.impressions DESC

This flexibility makes it perfect for advanced reporting, custom dashboards, and complex automation workflows that the official node cannot handle.

📦 Installation

Install via n8n Community Nodes (Recommended)

For self-hosted n8n instances:

  1. Go to SettingsCommunity Nodes
  2. Click Install a community node
  3. Enter the package name: @zhibinyang/n8n-nodes-google-ads
  4. Click Install

🎯 Operations

Campaign

| Operation | Description | |-----------|-------------| | Get Many | Retrieve multiple campaigns with metrics | | Get | Retrieve a specific campaign by ID | | Custom Query | Execute custom GAQL queries for advanced use cases |

Available Fields:

  • Campaign: id, name, status, optimization_score, advertising_channel_type, advertising_channel_sub_type
  • Budget: amount_micros, period
  • Metrics: impressions, interactions, interaction_rate, average_cost, cost_micros, conversions, cost_per_conversion, conversions_from_interactions_rate, video_views, average_cpm, ctr

🔑 Credentials

You need to set up Google Ads OAuth2 API credentials:

Prerequisites

  1. A Google Cloud Project with Google Ads API enabled
  2. OAuth 2.0 Client ID (Web application type)
  3. A Google Ads Developer Token

Setup Steps

  1. Create OAuth credentials in Google Cloud Console
  2. Get a Developer Token from your Google Ads Manager Account
  3. In n8n, create a new "Google Ads OAuth2 API" credential
  4. Enter your Client ID, Client Secret, and Developer Token
  5. Complete the OAuth flow to authorize access

📚 Resources

🛠️ For Developers

Build System

This project uses esbuild instead of the traditional TypeScript compiler (tsc) to optimize bundle size and build performance for Cloud Run + GCS deployment.

Benefits

  • Optimized bundle size: All dependencies (including google-ads-api) are bundled into single files
  • Faster builds: Build completes in ~2 seconds
  • Fewer files: Minimal file count for better GCS mounting performance
  • Self-contained: All dependencies included in the bundle, no external node_modules needed at runtime

Build Commands

# Build for production (default - minified, no sourcemaps)
npm run build

# Build for development (with sourcemaps for debugging)
npm run build:dev

# Build and watch for changes (development mode)
npm run build:watch

Comparison:

  • Production build (npm run build): ~23MB, minified for deployment (default)
  • Development build (npm run build:dev): ~86MB, includes sourcemaps for debugging

Reference: This build configuration is based on n8n-nodes-esbuild-starter.

Publishing

# Clean and build for production
rm -rf dist
npm run build

# Verify no sourcemap files exist
ls dist/nodes/GoogleAds/

# Update version and publish
npm version patch
npm publish

⚙️ Compatibility

  • n8n: Self-hosted only (not compatible with n8n Cloud)
  • Google Ads API: v21 (via google-ads-api SDK v21.0.1)

📄 License

MIT