Thursday, July 13, 2023

Generic mutate support in Google Ads scripts

We are announcing support for new generic mutate functionality in Google Ads scripts, available today. Most mutate operations that are supported by the Google Ads API can now be performed directly in scripts.


For example, to create a simple budget:
const budgetResult = AdsApp.mutate({
    campaignBudgetOperation: {
        create: {
            amountMicros: 10000000,
            explicitlyShared: false
        }
    }
});
The new functionality enables you to create full campaign hierarchies, new conversion actions, and more that previously was not possible in scripts. For a full list of available operations, check out the MutateOperation reference documentation for the Google Ads API. Note that a few operation types are still restricted in scripts.

Check out the new guide for a complete overview of how to use the feature, including update and remove operations and performing multiple operations in a single call.

Please contact us on our forum or at googleadsscripts-support@google.com if you have any questions.