Google Ads Advanced icon

Google Ads Advanced

使用 Google Ads API

广告 → 更新

AI-generated

Overview

This node integrates with the Google Ads API to manage advertising campaigns, ad groups, and ads. Specifically, for the "广告" (Ad) resource with the "更新" (Update) operation, it updates existing ads in a Google Ads account.

Typical use cases include:

  • Modifying the status of an ad (e.g., enabling, pausing, or removing it).
  • Updating the final URLs where the ad directs users.
  • Changing the display URL shown on the ad.
  • Editing the ad's headlines and descriptions.

For example, a marketing team might use this node to pause underperforming ads or update URLs after a website redesign without manually accessing the Google Ads dashboard.

Properties

Name Meaning
认证方式 Authentication method to access Google Ads API. Options: OAuth2 (recommended), Service Account
管理员客户ID Manager customer ID associated with the Google Ads account
客户ID Customer ID of the Google Ads account
广告ID The unique identifier of the ad to update
状态 Status of the ad. Options: 启用 (ENABLED), 暂停 (PAUSED), 移除 (REMOVED)
最终URL Final URLs for the ad, multiple URLs separated by commas
显示URL Display URL shown on the ad
标题 Headlines of the ad, multiple headlines separated by commas
描述 Descriptions of the ad, multiple descriptions separated by commas

Output

The node outputs JSON objects representing the result of the update operation. Typically, this includes:

  • The updated ad resource details returned from the Google Ads API, such as resource name and updated fields.
  • In case of success, the response contains confirmation of the updated ad.
  • If an error occurs and "Continue On Fail" is enabled, the output will contain an error field with the error message.

No binary data output is produced by this node.

Dependencies

  • Requires valid Google Ads API credentials, either via OAuth2 or a service account.
  • Needs appropriate permissions and developer token configured in the credentials.
  • Uses the @htdangkhoa/google-ads library and google-auth-library for authentication and API calls.
  • Requires n8n credentials setup for either OAuth2 or service account authentication.

Troubleshooting

  • Authentication errors: Ensure that the provided OAuth2 tokens or service account keys are valid and have the necessary scopes (https://www.googleapis.com/auth/adwords).
  • Invalid Ad ID: If the ad ID does not exist or is incorrect, the API will return an error. Verify the ad ID before updating.
  • Permission issues: The authenticated user must have permission to modify the specified ad.
  • Malformed input: Fields like final URLs, headlines, and descriptions expect comma-separated strings; improper formatting may cause errors.
  • API quota limits: Exceeding Google Ads API quotas can cause failures; monitor usage and apply for higher quotas if needed.

If errors occur, check the error messages returned in the output JSON for guidance.

Links and References

Discussion