Table of contents
So there I was, deep in the weeds of integrating the Performance Ad launch feature for a campaign using Google Ads API. Everything was going swimmingly… until bam! I got hit with error messages like "Not Enough Assets," "Not Enough Headline Assets," "Not Enough Description Assets," "Not Enough Long Headline Assets." 😩
The weird part? I knew I had more than enough assets to meet Google's requirements. Like, way more. Yet, the API was stubbornly refusing to cooperate. 🤔
At this point, I figured I had two options: scream into the void 😱 or reach out to Google Ads API support. Luckily, I went with the second option. 😅
The Support Lifeline 🆘
I sent a desperate email to Google Ads API support, and they hit me back with some crucial info. Apparently, I was creating asset groups using the assetGroups
method, but here’s the catch: while you can create resources in separate requests, AssetGroups
and AssetGroupAssets
for Performance Max (PMax) campaigns need to be created in a single atomic request. 🤯
Basically, they said I could either attach the asset IDs directly or use the assetOperation
. The trick was making a bulk request using the googleAds.mutate
method. 💡 They even sent me a Java sample (which I’ll spare you from, lol).
The Fix 🛠️
Once I followed their advice and created the AssetGroups
and AssetGroupAssets
in a single atomic request (all in one go), like magic 🪄, the errors disappeared, and everything started working smoothly. 🎉
Making the Request
Here’s the endpoint and request body that worked for me:
POST https://googleads.googleapis.com/v17/customers/${customerId}/googleAds:mutate
{
"mutateOperations": [
{
"assetGroupOperation": {
"create": {
"campaign": "customers/{customer ID}/campaigns/{campaign ID}",
"name": "pmax asset group final",
"finalUrls": ["https://www.example.com"],
"status": "ENABLED",
"path1": "home",
"path2": "orders",
"resourceName": "customers/{customer ID}/assetGroups/-1"
}
}
},
{
"assetOperation": {
"create": {
"textAsset": {
"text": "Headline 1"
},
"resourceName": "customers/{customer ID}/assets/-2"
}
}
},
{
"assetOperation": {
"create": {
"textAsset": {
"text": "Headline 2"
},
"resourceName": "customers/{customer ID}/assets/-3"
}
}
},
{
"assetOperation": {
"create": {
"textAsset": {
"text": "Headline 3"
},
"resourceName": "customers/{customer ID}/assets/-4"
}
}
},
{
"assetOperation": {
"create": {
"textAsset": {
"text": "Long headline sample"
},
"resourceName": "customers/{customer ID}/assets/-5"
}
}
},
{
"assetOperation": {
"create": {
"textAsset": {
"text": "Description 1 sample"
},
"resourceName": "customers/{customer ID}/assets/-6"
}
}
},
{
"assetOperation": {
"create": {
"textAsset": {
"text": "Description 2 sample"
},
"resourceName": "customers/{customer ID}/assets/-7"
}
}
},
{
"assetOperation": {
"create": {
"textAsset": {
"text": "Business name"
},
"resourceName": "customers/{customer ID}/assets/-8"
}
}
},
{
"assetOperation": {
"create": {
"imageAsset": {
"mimeType": "UNKNOWN",
"fullSize": {
"heightPixels": 1200,
"widthPixels": 628,
"url": "sample url"
}
},
"resourceName": "customers/{customer ID}/assets/-9"
}
}
},
{
"assetOperation": {
"create": {
"imageAsset": {
"mimeType": "UNKNOWN",
"fullSize": {
"heightPixels": 1200,
"widthPixels": 1200,
"url": "sample url"
}
},
"resourceName": "customers/{customer ID}/assets/-10"
}
}
},
{
"assetGroupAssetOperation": {
"create": {
"fieldType": "HEADLINE",
"assetGroup": "customers/{customer ID}/assetGroups/-1",
"asset": "customers/{customer ID}/assets/-2"
}
}
},
{
"assetGroupAssetOperation": {
"create": {
"fieldType": "HEADLINE",
"assetGroup": "customers/{customer ID}/assetGroups/-1",
"asset": "customers/{customer ID}/assets/-3"
}
}
},
{
"assetGroupAssetOperation": {
"create": {
"fieldType": "LONG_HEADLINE",
"assetGroup": "customers/{customer ID}/assetGroups/-1",
"asset": "customers/{customer ID}/assets/-5"
}
}
},
{
"assetGroupAssetOperation": {
"create": {
"fieldType": "DESCRIPTION",
"assetGroup": "customers/{customer ID}/assetGroups/-1",
"asset": "customers/{customer ID}/assets/-6"
}
}
},
{
"assetGroupAssetOperation": {
"create": {
"fieldType": "MARKETING_IMAGE",
"assetGroup": "customers/{customer ID}/assetGroups/-1",
"asset": "customers/{customer ID}/assets/-9"
}
}
}
]
}
Here, you’ll dynamically replace {customerId}
and {campaignId}
with your customerId and campaignId.
Moral of the Story
If you’re ever facing those pesky "Not Enough Assets" errors, don’t let them mess with your head. Just make sure you're bundling everything into one atomic request when you're creating those asset groups. The key is the googleAds.mutate
method!
Lesson learned: When in doubt, bulk it out! 💪
Still in doubt, don’t hesitate to reach us out at https://ghanshyamdigital.com/contact/.😉