Google Ads Advanced icon

Google Ads Advanced

使用 Google Ads API

广告组 → 更新

AI-generated

Overview

This node integrates with the Google Ads API to manage advertising entities such as campaigns, ad groups, and ads. Specifically, for the "广告组" (Ad Group) resource with the "更新" (Update) operation, it updates existing ad groups by modifying their name and status.

Common scenarios where this node is beneficial include:

  • Automating updates to ad group settings in bulk.
  • Integrating Google Ads management into broader marketing workflows.
  • Synchronizing ad group data from external systems or databases.

Practical example:

  • You have a list of ad groups whose names or statuses need to be updated based on recent campaign strategy changes. This node can programmatically update those ad groups without manual intervention in the Google Ads interface.

Properties

Name Meaning
认证方式 Authentication method to connect to Google Ads API. Options: OAuth2 (recommended), Service Account.
管理员客户ID Manager customer ID string required to identify the Google Ads manager account.
客户ID Client customer ID string identifying the specific Google Ads client account.
广告组ID The unique identifier of the ad group to update.
广告组名称 The new name to assign to the ad group.
状态 The status of the ad group. Options: 启用 (ENABLED), 暂停 (PAUSED), 移除 (REMOVED).

Output

The node outputs JSON objects representing the result of the update operation. For the ad group update, the output JSON typically contains the response from the Google Ads API mutation operation, including details about the updated ad group resource.

Example output JSON structure:

{
  "mutate_operation_responses": [
    {
      // Details of the updated ad group resource
    }
  ]
}

If the operation fails and "Continue On Fail" is enabled, the output will contain an error message in the JSON under the error key.

No binary data output is produced by this node.

Dependencies

  • Requires valid Google Ads API credentials, either via OAuth2 or a service account.
  • Needs configuration of appropriate credentials in n8n with access to the Google Ads API.
  • Uses the @htdangkhoa/google-ads library and google-auth-library for authentication and API calls.
  • Requires developer token, manager customer ID, and client customer ID for API requests.

Troubleshooting

  • Authentication errors: Ensure that the provided OAuth2 tokens or service account credentials are valid and have sufficient permissions for the Google Ads accounts involved.
  • Invalid IDs: Errors may occur if the provided ad group ID, client customer ID, or manager customer ID are incorrect or do not exist.
  • API quota limits: Google Ads API enforces quotas; hitting these limits will cause errors. Monitor usage and apply for higher quotas if needed.
  • Error messages: If the node throws errors related to mutation operations, verify that the fields being updated (name, status) conform to Google Ads API requirements.
  • Continue On Fail: Enable this option to allow the workflow to continue processing other items even if one update fails, capturing error details in the output.

Links and References

Discussion