广告 → 获取单个
AI-generatedOverview
This node integrates with the Google Ads API to manage advertising campaigns, ad groups, and ads. It supports multiple operations such as retrieving single or multiple entities, creating, updating, and deleting them. The node is useful for automating Google Ads management tasks within n8n workflows, enabling marketers and developers to programmatically control their ad accounts.
For the specific Resource "广告" (Ad) and Operation "获取单个" (Get Single), the node fetches detailed information about a single ad by its ID. This is beneficial when you want to retrieve the current status, name, and other metadata of a particular ad for reporting, auditing, or further processing.
Practical example:
- Automatically fetch an ad's details after a campaign update to verify changes.
- Retrieve ad data to feed into a dashboard or analytics tool.
Properties
| Name | Meaning |
|---|---|
| 认证方式 | Authentication method to use: OAuth2 (recommended) or Service Account |
| 管理员客户ID | Manager Customer ID (required string) — The Google Ads manager account ID |
| 客户ID | Client Customer ID (required string) — The specific client account ID under the manager |
| 广告ID | Ad ID (required string) — The unique identifier of the ad to retrieve |
Output
The output is a JSON object representing the requested ad's details. It includes fields such as:
ad_group_ad.ad.id: The unique identifier of the ad.ad_group_ad.ad.name: The name of the ad.ad_group_ad.status: The current status of the ad (e.g., enabled, paused).
If the ad is found, the node outputs a single JSON object with these properties. If no ad matches the given ID, the output will be empty.
The node does not output binary data for this operation.
Dependencies
- Requires valid Google Ads API credentials, either via OAuth2 or a service account.
- Needs appropriate permissions on the Google Ads account specified by the Manager Customer ID and Client Customer ID.
- The node uses the Google Ads API client library and Google Auth Library internally.
- Must configure credentials in n8n with the necessary scopes (
https://www.googleapis.com/auth/adwords).
Troubleshooting
Common issues:
- Invalid or expired authentication tokens can cause authorization failures.
- Incorrect Manager or Client Customer IDs may result in "not found" errors.
- Providing an invalid or non-existent Ad ID will return no results.
- Insufficient permissions on the Google Ads account can block access.
Error messages:
- Authorization errors typically indicate problems with the OAuth2 token or service account keys. Refresh tokens or reconfigure credentials as needed.
- "Not found" errors mean the specified ad does not exist or the user lacks access.
- Network or API quota errors require checking Google Ads API usage limits and connectivity.