View as Markdown
Google Ads icon

Google Ads ACTION

Create or Update Campaign

Creates or updates a campaign. See the documentation
  • Action
  • Writes data
  • Destructive
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Google Ads account once, then configure and run Create or Update Campaign 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-or-update-campaign",
  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 or Update Campaign 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
operationType Operation Type string
Whether to create, update, or remove a campaign.
Required
campaignId Campaign string
The campaign to update or remove. Required for Update and Remove operations.
Optional Dynamic
updateMask Update Mask string
Comma-separated list of fields to update (e.g., name,status). Only used for update operations.
Optional
name Name string
The name of the campaign. Required for create operations.
Optional
advertisingChannelType Advertising Channel Type string
The primary serving target for ads within the campaign. Required for create operations.
Optional
campaignBudget Campaign Budget string
The resource name of the campaign budget (e.g., customers/{customer_id}/campaignBudgets/{budget_id}). Required for create operations.
Optional
status Status string
The status of the campaign.
Optional
startDateTime Start Date Time string
When the campaign starts serving ads, in the account's time zone, formatted as YYYY-MM-DD HH:MM:SS (use 00:00:00 for daily granularity).
Optional
endDateTime End Date Time string
The last day and time the campaign serves ads, in the account's time zone, formatted as YYYY-MM-DD HH:MM:SS (use 23:59:59 for daily granularity). Leave blank to run indefinitely.
Optional
trackingUrlTemplate Tracking URL Template string
The URL template for constructing a tracking URL.
Optional
containsEuPoliticalAdvertising Contains EU Political Advertising string
Declares whether the campaign contains EU political advertising. Google requires this on create.
Optional
biddingStrategy Portfolio Bidding Strategy string
An existing portfolio bidding strategy to attach. Leave blank to use a standard (campaign-level) strategy instead.
Optional Dynamic
biddingStrategyType Standard Bidding Strategy string
The campaign-level bidding strategy. Google requires either this or a Portfolio Bidding Strategy on create.
Optional
enhancedCpcEnabled Enhanced CPC Enabled boolean
Whether bids are enhanced based on conversion optimizer data. Applies to Manual CPC and Percent CPC.
Optional
targetCpaMicros Target CPA (Micros) string
Average cost per acquisition to target, in micros (1,000,000 micros = 1 unit of the account currency). Applies to Target CPA and Maximize Conversions.
Optional
cpcBidCeilingMicros CPC Bid Ceiling (Micros) string
Maximum bid limit that can be set by the bid strategy, in micros (1,000,000 micros = 1 unit of the account currency). Applies to Target CPA, Target ROAS, Target Spend, Target Impression Share, Maximize Conversions, Maximize Conversion Value and Percent CPC.
Optional
cpcBidFloorMicros CPC Bid Floor (Micros) string
Minimum bid limit that can be set by the bid strategy, in micros (1,000,000 micros = 1 unit of the account currency). Applies to Target CPA, Target ROAS, Maximize Conversions and Maximize Conversion Value.
Optional
targetRoas Target ROAS string
Revenue to target per unit of spend, as a decimal (e.g. 3.5 targets 350% return). Applies to Target ROAS and Maximize Conversion Value.
Optional
location Impression Share Location string
Where on the search results page the ads should appear. Applies to Target Impression Share.
Optional
locationFractionMicros Impression Share Target (Micros) string
Fraction of ads to be shown in the targeted location, in micros (e.g. 650000 targets 65%). Applies to Target Impression Share.
Optional
additionalFields Additional Fields object
Additional fields and values to be created. See the documentation for available fields. Values will be parsed as JSON where applicable.
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-or-update-campaign
Version
1.0.0
App
Google Ads
Authentication
OAuth
Read-only
No
Destructive
Yes
Open world
Yes