广告系列 → 获取多个
AI-generatedOverview
This node integrates with the Google Ads API to manage advertising campaigns, ad groups, and ads. Specifically for the "广告系列" (Campaign) resource with the "获取多个" (Get All) operation, it retrieves multiple advertising campaigns from a specified Google Ads account.
Common scenarios where this node is beneficial include:
- Fetching all active or paused campaigns for reporting or analysis.
- Integrating campaign data into marketing dashboards.
- Automating workflows that require up-to-date campaign information.
Practical example:
- A marketing team wants to pull all enabled campaigns from their Google Ads account daily to analyze performance trends in an external BI tool. This node can fetch all campaigns with their IDs, names, and statuses efficiently.
Properties
| Name | Meaning |
|---|---|
| 认证方式 (authentication) | Method of authentication to use: OAuth2 (recommended) or Service Account. |
| 管理员客户ID (managerCustomerId) | The manager customer ID associated with the Google Ads account. Required for API access. |
| 客户ID (clientCustomerId) | The client customer ID representing the specific Google Ads account to query. Required. |
| 其他选项 (additionalOptions) | Additional filtering options when retrieving campaigns: |
| - 日期范围 (dateRange) | Date range filter for statistics, options include all time, today, yesterday, last 7 days, etc. |
| - 按状态筛选广告系列 (campaignStatus) | Filter campaigns by status: all, enabled, paused, or removed. |
| 将使用 micros 表示的字段名称除以 1,000,000 以获得实际值 (campaigsNotice) | Notice indicating that fields represented in micros should be divided by 1,000,000 to get actual values. |
Output
The output is an array of JSON objects, each representing a campaign with the following structure:
{
"id": "string", // Campaign ID
"name": "string", // Campaign name
"status": "string" // Campaign status (e.g., ENABLED, PAUSED, REMOVED)
}
If multiple campaigns are retrieved, each campaign appears as a separate item in the output 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 configuration of:
- Manager Customer ID
- Client Customer ID
- Developer token (provided in credentials)
- Uses Google Ads API scopes for authorization.
- Requires n8n credentials setup for Google Ads API authentication.
Troubleshooting
- Authentication errors: Ensure that the OAuth2 tokens or service account credentials are correctly configured and have the necessary permissions.
- 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 apply for higher quotas if needed.
- Empty results: If no campaigns are returned, check filters such as campaign status and date range to ensure they match existing campaigns.
- Error messages: Errors thrown by the node will typically contain messages from the Google Ads API. Review these messages for details on issues like invalid parameters or permission problems.