The selector of all search and display campaigns in the account.
createLabel(name, description, backgroundColor)
Creates a new Label. You must always specify a name, but description and
color are optional.
Note that you cannot create more than 100,000 labels per account.
Usage examples:
AdsApp.createLabel("My Label");
AdsApp.createLabel(
"Modified by script", "These ads have been modified by a script");
AdsApp.createLabel(
"Bad Keywords", "These keywords are performing poorly", "red");
You must specify optional arguments in order, i.e. you cannot specify color
without the description.
// CORRECT: This will set the color to '#0088FF':AdsApp.createLabel("Good","","#0088FF");// WRONG: This will set the description to '#0088FF':AdsApp.createLabel("Bad","#0088FF");
Returns nothing.
Arguments:
Name
Type
Description
name
String
The name of the new Label. Label names are case sensitive and
must be unique. Max length is 100 characters. Any leading
or trailing white spaces will be trimmed.
description
String
Optional. The description of the new label. If
not specified, the description will be empty. Max length is
200 characters.
backgroundColor
String
Optional. The background color of the new
label. The color must be specified in either RGB form
(#RRGGBB or #RGB), or one of the 16 basic CSS color
names. If not specified, the new label will assume an arbitrary
background color.
currentAccount()
Returns miscellaneous information about the Google Ads account in which the
script is currently running.
constcustomerId=AdsApp.currentAccount().getCustomerId();constcampaignId=12345;constcreateAdGroupResponse=AdsApp.mutate({adGroupOperation:{create:{campaign:`customers/${customerId}/campaigns/${campaignId}`,name:'My Ad Group Name',cpcBidMicros:'1230000'//$1.23inmicros}}});constkeywordText='Example Text';constfinalUrl='https://example.final.url.com/';constcreateKeywordResponse=AdsApp.mutate({adGroupCriterionOperation:{create:{adGroup:createAdGroupResponse.getResourceName(),keyword:{matchType:'BROAD',text:keywordText},finalUrls:[finalUrl]}}});
This method also accepts an optional arguments object. The following
fields are supported:
Name
Type
Description
apiVersion
String
The Google Ads API version to query.
Sunsetted versions
are not allowed. Defaults to the most recent supported version.
constcustomerId=AdsApp.currentAccount().getCustomerId();constcampaignId=12345;constkeywordText='Example Text';constfinalUrl='https://example.final.url.com/';constmutateResponses=AdsApp.mutateAll([{adGroupOperation:{create:{resourceName:`customers/${customerId}/adGroups/-1`campaign:`customers/${customerId}/campaigns/${campaignId}`,name:'My Ad Group Name',cpcBidMicros:'1230000'//$1.23inmicros}}},{adGroupCriterionOperation:{create:{adGroup:`customers/${customerId}/adGroups/-1`,keyword:{matchType:'BROAD',text:keywordText},finalUrls:[finalUrl]}}}]);
This method also accepts an optional arguments object. The following
fields are supported:
Name
Type
Description
apiVersion
String
The Google Ads API version to query.
Sunsetted versions
are not allowed. Defaults to the most recent supported version.
partialFailure
boolean
If false, then all operations either succeed together,
or all fail. If true, then some operations may succeed
while others fail.
A selector of all negative keyword lists in this account.
newExcludedPlacementListBuilder()
Returns a new excluded placement list builder for this account. Once
builder.build() is called, the new excluded placement list
will be created in this account.
The builder for creating an experiment in the account.
newNegativeKeywordListBuilder()
Returns a new negative keyword list builder for this account. Once
builder.build() is called, the new negative keyword list will
be created in this account.
This method also accepts an optional arguments object. The following
optional arguments are supported:
Name
Type
Description
includeZeroImpressions
boolean
Whether or not to include entities that had zero impressions in the
report. This field is not allowed when the query uses GAQL. See here for
details on how GAQL handles zero impressions. Defaults to
true for AWQL queries.
returnMoneyInMicros
boolean
Whether or not to represent money in micros ('1370000') or in
currency ('1.37'). This field is not allowed when the query uses
GAQL. In that case, all money values are represented in micros.
Defaults to false for AWQL queries.
apiVersion
String
For GAQL queries, the Google Ads API version to query. Sunsetted versions for
GAQL queries are not allowed.
resolveGeoNames
boolean
Whether or not to convert Geo CriteriaIds (e.g. CountryCriteriaId and
CityCriteriaId) into names (e.g. 'United States' and 'San
Francisco'). Set to true if you want names. Set to
false if you want numerical IDs. Defaults to
true.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-16 UTC."],[],[]]