广告组 → 创建
AI-generatedOverview
This node integrates with the Google Ads API to manage advertising entities programmatically. Specifically, for the 广告组 (Ad Group) resource and the 创建 (Create) operation, it allows users to create new ad groups within a specified campaign in their Google Ads account.
Typical use cases include automating the setup of ad groups as part of larger marketing workflows, bulk creation of ad groups based on external data, or integrating Google Ads management into custom applications or automation pipelines.
For example, a marketing team could use this node to automatically create multiple ad groups for different product categories under a single campaign, streamlining campaign setup and reducing manual effort.
Properties
| Name | Meaning |
|---|---|
| 认证方式 | Authentication method to connect to Google Ads API. Options: OAuth2 (recommended), 服务账号 (Service Account). |
| 管理员客户ID | Manager customer ID associated with the Google Ads account. Required to identify the managing account. |
| 客户ID | Client customer ID representing the specific Google Ads account where the ad group will be created. |
| 广告系列ID | Campaign ID under which the new ad group will be created. |
| 广告组名称 | Name of the ad group to be created. |
| 状态 | Status of the ad group. Options: 启用 (ENABLED), 暂停 (PAUSED), 移除 (REMOVED). |
| 广告组类型 | Type of the ad group. Options: 标准 (SEARCH_STANDARD), 动态搜索 (SEARCH_DYNAMIC_ADS), 展示标准 (DISPLAY_STANDARD), 展示智能 (DISPLAY_SMART_CAMPAIGN). |
Output
The node outputs JSON objects representing the result of the create operation. The output JSON typically contains the response from the Google Ads API's mutate operation, including details about the newly created ad group such as its resource name and identifiers.
Example output structure (simplified):
{
"resourceName": "customers/{customerId}/adGroups/{adGroupId}",
"status": "ENABLED",
"name": "Example Ad Group",
"type": "SEARCH_STANDARD"
}
If the operation is successful, the output confirms the creation and provides identifiers that can be used for further operations.
Dependencies
- Requires an active Google Ads API connection.
- Supports two authentication methods:
- OAuth2 authentication (recommended).
- Service account authentication.
- Requires credentials configured in n8n for either OAuth2 or service account with appropriate permissions.
- Needs valid Manager Customer ID and Client Customer ID to target the correct Google Ads accounts.
- Uses the
@htdangkhoa/google-adslibrary andgoogle-auth-libraryfor API communication and authentication.
Troubleshooting
- Authentication errors: Ensure that the provided OAuth2 tokens or service account credentials are valid and have sufficient permissions to create ad groups.
- Invalid IDs: Verify that the Manager Customer ID, Client Customer ID, and Campaign ID are correct and correspond to existing entities in your Google Ads account.
- API quota limits: Google Ads API enforces quotas; hitting these may cause errors. Monitor usage and apply for higher quotas if necessary.
- Status or type values invalid: Use only the allowed options for status and ad group type to avoid validation errors.
- Network issues: Ensure stable internet connectivity and that firewall settings allow outbound connections to Google APIs.
Common error messages:
"Invalid Credentials": Check authentication credentials and refresh tokens."Resource not found": Confirm that the campaign ID exists and belongs to the specified client account."Permission denied": Verify that the authenticated user has rights to modify the targeted account.