View as Markdown
Google Ads icon

Google Ads ACTION

Create Ad Report

Creates a report for the Ad resource. See the documentation
  • Action
  • Read only
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Google Ads account once, then configure and run Create Ad Report from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "google_ads-create-ad-report",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    google_ads: { authProvisionId: "apn_xxxxxxx" },
    accountId: "Use Google Ads As",
    customerClientId: "Managed Account",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Ad Report inputs
Property Type Description
accountId Use Google Ads As string
The ID of an account of a customer directly accessible by the authenticated user. This is usually a Manager Account, used as login-customer-id (e.g., 1234567890). Use the List Account ID Options action to get the list of accessible accounts.
Required Dynamic
customerClientId Managed Account string
The ID of a customer client from the list of customers linked to the selected account (e.g., 1234567890). Use the List Customer Clients action to get the list of customer clients.
Optional Dynamic
objectFilter Ad(s) string[]
Select the Ad(s) to generate a report for (or leave blank for all Ads)
Optional Dynamic
dateRange Date Range string
Select a date range for the report
Optional
startDate Custom Start Date string
If using a custom date range, this is the start date in YYYY-MM-DD format
Optional
endDate Custom End Date string
If using a custom date range, this is the end date in YYYY-MM-DD format
Optional
fields Ad Fields string[]
Array of Ad field names to include in the report, e.g. ["status"]. The ad_group_ad. prefix is added automatically. See the field reference
Optional
segments Segments string[]
Array of segment names to break the report down by, e.g. ["date"]. The segments. prefix is added automatically. See the documentation
Optional
metrics Metrics string[]
Array of metric names to include in the report, e.g. ["clicks"]. The metrics. prefix is added automatically. See the documentation
Optional
orderBy Order By string
The field to order the results by
Optional Dynamic
direction Direction string
If Order By is specified, this is the direction to order the results by
Optional
limit Limit integer
The maximum number of results to return
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
google_ads-create-ad-report
Version
0.0.4
App
Google Ads
Authentication
OAuth
Read-only
Yes
Destructive
No
Open world
Yes