google-ads

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

Package Information

Released: 9 mo ago
Downloads: 16 weekly / 82 monthly
Latest Version: 0.1.1
Author: Zhibin Yang

Documentation

n8n-nodes-google-ads

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

⚠️ Important: This node uses external npm dependencies and is NOT compatible with n8n Cloud. It can only be used with self-hosted n8n instances.

n8n is a fair-code licensed workflow automation platform.

Installation
Operations
Credentials
Compatibility
Resources

Installation

This node is designed for self-hosted n8n only.

Using npm link (Development)

cd /path/to/n8n-nodes-google-ads
npm install
npm run build
npm link

# In your n8n installation directory
npm link @zhibinyang/n8n-nodes-google-ads

Manual Installation

  1. Copy the built dist folder to your n8n custom nodes directory
  2. Restart n8n

Build System

This project uses esbuild instead of the traditional TypeScript compiler (tsc) to significantly reduce the build output size and optimize 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 ~3 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): ~53MB, includes sourcemaps for debugging

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

Operations

Campaign

Operation Description
Get Many Retrieve multiple campaigns with metrics
Get Retrieve a specific campaign by ID

Returned 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

Compatibility

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

Resources

License

MIT

Discussion