广告组 → 获取多个
AI-generatedOverview
This node interacts with the Google Ads API to manage advertising groups ("广告组") within a Google Ads account. Specifically, for the "获取多个" (Get Multiple) operation on the 广告组 resource, it retrieves multiple ad groups based on specified criteria.
Common scenarios where this node is beneficial include:
- Fetching all ad groups under a specific campaign to analyze their status or performance.
- Filtering ad groups by their status (enabled, paused, removed) to monitor or report on active campaigns.
- Integrating Google Ads data into workflows for automated reporting or decision-making.
Practical example:
- A marketing analyst wants to retrieve all enabled ad groups from a particular campaign to generate a performance report. They configure this node with the appropriate authentication, specify the manager and client customer IDs, provide the campaign ID, and set the filter to only fetch enabled ad groups.
Properties
| Name | Meaning |
|---|---|
| 认证方式 | Authentication method to access Google Ads API. Options: OAuth2 (recommended), Service Account. |
| 管理员客户ID | Manager Customer ID - the Google Ads manager account ID that manages the client account. |
| 客户ID | Client Customer ID - the specific Google Ads client account ID to operate on. |
| 广告系列ID | Campaign ID - the identifier of the campaign whose ad groups are to be retrieved. |
| 其他选项 | Additional options for filtering results. |
| 按状态筛选广告组 | Filter ad groups by status. Options: 全部 (all), 启用 (ENABLED), 暂停 (PAUSED), 移除 (REMOVED). |
Output
The output is an array of JSON objects, each representing an ad group retrieved from the Google Ads API. Each object contains fields such as:
ad_group.id: The unique identifier of the ad group.ad_group.name: The name of the ad group.ad_group.status: The current status of the ad group (e.g., ENABLED, PAUSED, REMOVED).
If no ad groups match the query, the output will be an empty array.
No binary data output is produced by this operation.
Dependencies
- Requires valid Google Ads API credentials, either via OAuth2 or a service account.
- Needs proper configuration of:
- Manager Customer ID
- Client Customer ID
- Developer token (part of credentials)
- Uses the Google Ads API scopes for authorization.
- The node depends on the
@htdangkhoa/google-adslibrary andgoogle-auth-libraryfor API communication and authentication.
Troubleshooting
- Authentication errors: If the node fails to authenticate, verify that the provided OAuth2 tokens or service account credentials are correct and have sufficient permissions.
- Invalid Customer IDs: Ensure that the Manager Customer ID and Client Customer ID are accurate and correspond to existing accounts in Google Ads.
- Campaign ID issues: If no ad groups are returned, confirm that the campaign ID exists and has associated ad groups.
- API Quotas and Limits: Google Ads API enforces quotas; hitting these may cause errors. Monitor usage and apply for higher quotas if needed.
- Error messages typically include details about invalid parameters or permission issues. Review the error message and adjust inputs accordingly.
- Use the "Continue On Fail" option in n8n to handle errors gracefully during batch operations.