Skip to content
Scalekit Docs
Talk to an Engineer Dashboard

Connect AI agents to Google Ads

Scalekit connector
Open markdown

The Google Ads connector lets your AI agent act in each user's Google Ads account. Each user signs in to Google Ads once, and Scalekit stores and refreshes their tokens, so your agent never handles credentials. It comes with 35 tools.

Tools
35
What they doRead · write · destructive
4 · 23 · 84 read23 write8 destructive
Users sign in with
OAuth app
Your own Google app

What you can do

  • Manage campaigns: create, update, and remove campaigns, and set their budgets, bidding strategies, and targeting
  • Build ad groups and ads: create ad groups, write responsive search ads, and pause, enable, or remove ads
  • Manage keywords: add, rebid, pause, or remove keywords and generate keyword ideas with traffic estimates
  • Query performance data: run Google Ads queries to pull campaigns, ad groups, keywords, and metrics
  • Track conversions and audiences: create conversion actions, build remarketing lists, and add or remove Customer Match members
  • Organize with assets and labels: create sitelinks, callouts, and images, link them to campaigns, and apply labels

Setup

  1. Install the SDK

    Terminal window
    npm install @scalekit-sdk/node dotenv
  2. Set your credentials

    Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. Create the Google Ads connection

    In AgentKit > Connections, create a Google Ads connection and copy its redirect URI. The name you give it is the connection_name your code passes. See Configure connections.

  4. Register a Google OAuth app

    Google Ads connections use your own OAuth app. Register one with Google and add the redirect URI you copied.

    Then enter the app's Client ID and Client Secret on the Google Ads connection.

    Console steps with screenshots

    Register your Scalekit environment with the Google Ads connector so Scalekit handles the authentication flow and token lifecycle for you. The connection name you create will be used to identify and invoke the connection programmatically. Then complete the configuration in your application as follows:

    1. Set up auth redirects

      • In Scalekit dashboard, go to AgentKit > Connections > Create Connection. Find Google Ads and click Create. Click Use your own credentials and copy the redirect URI. It looks like https://<SCALEKIT_ENVIRONMENT_URL>/sso/v1/oauth/<CONNECTION_ID>/callback.

        Copy redirect URI from Scalekit dashboard

      • Navigate to Google Cloud Console → APIs & Services → Credentials. Select + Create Credentials, then OAuth client ID. Choose Web application from the Application type menu.

        Select Web Application in Google OAuth settings

      • Under Authorized redirect URIs, click + Add URI, paste the redirect URI, and click Create.

        Add authorized redirect URI in Google Cloud Console

    2. Enable the Google Ads API

      • In Google Cloud Console, go to APIs & Services → Library. Search for “Google Ads API” and click Enable.
    3. Get client credentials

      • Google provides your Client ID and Client Secret after you create the OAuth client ID in step 1.
    4. Add credentials in Scalekit

      • In Scalekit dashboard, go to AgentKit > Connections and open the connection you created.

      • Enter your credentials:

        Add credentials in Scalekit dashboard

      • Click Save.

    5. Enter your developer token

  5. Authorize a user and make your first call

    quickstart.mts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    import { createInterface } from 'node:readline/promises'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENVIRONMENT_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'googleads'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Google Ads:', link)
    const rl = createInterface({ input: process.stdin, output: process.stdout })
    await rl.question('Press Enter after authorizing...')
    rl.close()
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'googleads_customers_list',
    toolInput: {},
    })
    console.log(result)
    Terminal window
    npx tsx quickstart.mts

    Each user signs in once. See Authorize a user for the full flow and statuses.

Tools

Pass the exact name to execute_tool
Try in PlaygroundRequest a tool