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 programmatically. Specifically for the "广告系列" (Campaign) resource with the "创建" (Create) operation, it allows users to create new advertising campaigns within a specified Google Ads account.

Typical use cases include automating campaign creation workflows, integrating campaign setup into larger marketing automation pipelines, or bulk-creating campaigns based on external data sources.

For example, a marketing team can use this node to automatically create search or display campaigns with predefined names, statuses, and channel types without manually configuring them in the Google Ads interface.

Properties

Name Meaning
认证方式 (authentication) Method of authentication to access Google Ads API. Options: OAuth2 (recommended), Service Account.
管理员客户ID (managerCustomerId) The manager customer ID that manages the client account. Required string input.
客户ID (clientCustomerId) The client customer ID where the campaign will be created. Required string input.
广告系列名称 (name) The name of the campaign to be created. Required string input.
状态 (status) The status of the campaign. Options: 启用 (ENABLED), 暂停 (PAUSED), 移除 (REMOVED). Required.
广告渠道类型 (advertisingChannelType) The advertising channel type for the campaign. Options: 搜索 (SEARCH), 展示 (DISPLAY), 视频 (VIDEO), 购物 (SHOPPING). Required.
广告渠道子类型 (advertisingChannelSubType) The advertising channel subtype for the campaign. Options: 标准 (SEARCH_STANDARD), 动态搜索 (SEARCH_DYNAMIC_ADS), 展示标准 (DISPLAY_STANDARD), 展示智能 (DISPLAY_SMART_CAMPAIGN). Required.

Output

The node outputs JSON objects representing the result of the campaign creation operation. The output JSON typically contains the response from the Google Ads API's mutate operation, including details about the newly created campaign resource.

Example output structure:

{
  "resourceName": "customers/{customerId}/campaigns/{campaignId}",
  "status": "SUCCESS",
  ...
}

No binary data is produced by this node.

Dependencies

  • Requires valid Google Ads API credentials, either via OAuth2 or a service account.
  • Needs proper configuration of authentication credentials in n8n, including developer tokens and customer IDs.
  • Uses the @htdangkhoa/google-ads library and google-auth-library for API communication and authentication.

Troubleshooting

  • Authentication errors: Ensure that the provided OAuth2 token or service account credentials are valid and have sufficient permissions to create campaigns.
  • Invalid customer IDs: Verify that the manager and client customer IDs are correct and correspond to your Google Ads accounts.
  • API quota limits: Google Ads API enforces quotas; hitting these may cause errors. Monitor usage and request quota increases if necessary.
  • Missing required fields: The node requires certain fields like campaign name, status, and channel types. Omitting these will cause validation errors.
  • Error messages from API: The node surfaces error messages returned by the Google Ads API. Review these messages carefully to adjust parameters accordingly.

Links and References

Discussion