Unable to attach an assets to the Asset Group.

61 views
Skip to first unread message

Shahil Verma

unread,
Feb 17, 2025, 7:21:34 PM2/17/25
to Google Ads API and AdWords API Forum

Hi,

I'm encountering an issue while attaching an asset (such as Sitelink, Call, or Callout extensions) to an asset group. In the request below, I first create an asset group and then attach various assets, including Text assets, Image assets, and YouTube Video assets, linking them to the created asset group. Could you guide me on how to attach an existing Sitelink asset to the asset group using the API?

Here is request - 

{
  "customerId": "4973912890",
  "mutateOperations": [
    {
      "assetGroupOperation": {
        "create": {
          "resourceName": "customers/4973912890/assetGroups/-100000",
          "campaign": "customers/4973912890/campaigns/21146493036",
          "name": "new Ag Group17-02-2025 17:38:14",
          "finalUrls": [
            "https://groups.google.com/u/2/g/adwords-api"
          ],
          "status": "ENABLED"
        }
      }
    },
    {
      "assetGroupAssetOperation": {
        "create": {
          "assetGroup": "customers/4973912890/assetGroups/-100000",
          "asset": "customers/4973912890/assets/202672153914",
          "fieldType": "SITELINK"
        }
      }
    },

    {
      "assetGroupAssetOperation": {
        "create": {
          "assetGroup": "customers/4973912890/assetGroups/-100000",
          "asset": "customers/4973912890/assets/201189106280",
          "fieldType": "HEADLINE"
        }
      }
    },
    {
      "assetGroupAssetOperation": {
        "create": {
          "assetGroup": "customers/4973912890/assetGroups/-100000",
          "asset": "customers/4973912890/assets/201189106283",
          "fieldType": "HEADLINE"
        }
      }
    },
    {
      "assetGroupAssetOperation": {
        "create": {
          "assetGroup": "customers/4973912890/assetGroups/-100000",
          "asset": "customers/4973912890/assets/201189106286",
          "fieldType": "HEADLINE"
        }
      }
    },
    {
      "assetGroupAssetOperation": {
        "create": {
          "assetGroup": "customers/4973912890/assetGroups/-100000",
          "asset": "customers/4973912890/assets/201189123767",
          "fieldType": "DESCRIPTION"
        }
      }
    },
    {
      "assetGroupAssetOperation": {
        "create": {
          "assetGroup": "customers/4973912890/assetGroups/-100000",
          "asset": "customers/4973912890/assets/201189123770",
          "fieldType": "DESCRIPTION"
        }
      }
    },
    {
      "assetGroupAssetOperation": {
        "create": {
          "assetGroup": "customers/4973912890/assetGroups/-100000",
          "asset": "customers/4973912890/assets/201189116558",
          "fieldType": "LONG_HEADLINE"
        }
      }
    },
    {
      "assetGroupAssetOperation": {
        "create": {
          "assetGroup": "customers/4973912890/assetGroups/-100000",
          "asset": "customers/4973912890/assets/201189319394",
          "fieldType": "BUSINESS_NAME"
        }
      }
    },
    {
      "assetGroupAssetOperation": {
        "create": {
          "assetGroup": "customers/4973912890/assetGroups/-100000",
          "asset": "customers/4973912890/assets/133180855373",
          "fieldType": "MARKETING_IMAGE"
        }
      }
    },
    {
      "assetGroupAssetOperation": {
        "create": {
          "assetGroup": "customers/4973912890/assetGroups/-100000",
          "asset": "customers/4973912890/assets/133180886666",
          "fieldType": "LOGO"
        }
      }
    },
    {
      "assetGroupAssetOperation": {
        "create": {
          "assetGroup": "customers/4973912890/assetGroups/-100000",
          "asset": "customers/4973912890/assets/201244091977",
          "fieldType": "SQUARE_MARKETING_IMAGE"
        }
      }
    },
    {
      "assetGroupAssetOperation": {
        "create": {
          "assetGroup": "customers/4973912890/assetGroups/-100000",
          "asset": "customers/4973912890/assets/201244084885",
          "fieldType": "YOUTUBE_VIDEO"
        }
      }
    },
    {
      "assetGroupAssetOperation": {
        "create": {
          "assetGroup": "customers/4973912890/assetGroups/-100000",
          "asset": "customers/4973912890/assets/201211721643",
          "fieldType": "CALL_TO_ACTION_SELECTION"
        }
      }
    }
  ]
}


I am getting this error in response - 

{
  "status": {
    "statusCode": "InvalidArgument",
    "detail": "Request contains an invalid argument."
  },
  "data": "System.Collections.ListDictionaryInternal",
  "failure": {
    "errors": [
      {
        "errorCode": {
          "requestError": "UNKNOWN"
        },
        "message": "The error code is not in this version.",
        "trigger": {
          "stringValue": "SITELINK,UBERVERSAL"
        },
        "location": {
          "fieldPathElements": [
            {
              "fieldName": "mutate_operations",
              "index": 1
            },
            {
              "fieldName": "asset_group_asset_operation"
            },
            {
              "fieldName": "create"
            },
            {
              "fieldName": "field_type"
            }
          ]
        }
      }
    ],
    "requestId": "qTI2L_0RnvYdbxiqeM4Fnw"
  },
  "hResult": -2146233088,
  "helpLink": null,
  "innerException": null,
  "message": "Status(StatusCode=\"InvalidArgument\", Detail=\"Request contains an invalid argument.\")",
  "requestId": "qTI2L_0RnvYdbxiqeM4Fnw",
  "source": "Google.Ads.Gax",
  "stackTrace": [
    "at Google.Ads.Gax.Interceptors.UnaryRpcInterceptor.<>c__DisplayClass1_0`2.<Intercept>b__0(Task`1 oldTask)",
    "at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke()",
    "at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)",
    "--- End of stack trace from previous location ---",
    "at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)",
    "--- End of stack trace from previous location ---",
    "at Google.Api.Gax.Grpc.ApiCall.GrpcCallAdapter`2.<>c__DisplayClass4_0.<<CallAsync>g__WaitAndCallHandlers|0>d.MoveNext()",
    "at Google.Api.Gax.TaskExtensions.WaitWithUnwrappedExceptions(Task task)",
    "at Google.Api.Gax.TaskExtensions.ResultWithUnwrappedExceptions[T](Task`1 task)",
    "at Google.Api.Gax.Grpc.ApiCall.GrpcCallAdapter`2.CallSync(TRequest request, CallSettings callSettings)",
    "at Google.Api.Gax.Grpc."
  ]
}

Additionally, is there a way to update the Final URL and Business Name of an existing asset group?

Thanks in advance.

Google Ads API Forum Advisor

unread,
Feb 18, 2025, 1:42:10 AM2/18/25
to shahilve...@gmail.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out to the Google Ads API support team.

By reviewing your query, I understand that you are encountering "The error code is not in this version" error when trying to attach an asset to an asset group for the PMax campaign. The error might occur when asset requirements are not met. I would recommend you to kindly follow the "Asset Requirements" documentation while attaching assets to an asset group. Please note that the Performance Max campaigns are composed of multiple resources, and you have the option to create these separate resources in unique requests or in a single bulk mutate request. However, AssetGroups and associated AssetGroupAssets in standard Performance Max campaigns must be created in a single atomic request. Assets can be created individually and need to be attached with the asset IDs directly or you need to create the assets using the assetOperation. 

I would suggest you create the AssetGroupOperation with some temporary negative ID and then create the assets by using the assetoperation by giving the asset ID as some temporary unique IDs. Kindly note that for a single job or mutate request, each temporary resource name must use a unique negative number, even if they are from different resource types. If a temporary ID is reused in a single job or mutate request, then an error is returned. And then attach all these assets to the asset group with AssetGroupAssetOperation. Please note that all operations can be performed in customers.googleAds.mutate method in the Google Ads API. You can refer to the sample code for your requirement. Also, I would recommend you to refer to the 'Group operations with mutate requests' for more information. Additionally I would recommend you to go through this temporary IDs documentation as it explains how to use the temporary IDs.

Also, I would suggest you kindly refer to the "Link asset groups to assets in Performance Max retail campaigns" documentation as it explains how to add asset groups to assets. 

I hope this helps! If you have any questions, please feel free to contact us.


Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-02-18 06:41:32Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02vH2KH:ref" (ADR-00288638)



Shahil Verma

unread,
Feb 18, 2025, 12:35:32 PM2/18/25
to Google Ads API and AdWords API Forum
Hello again, 
Thanks for your reply. 

The above error message shows that the issue is with the "Sitelink" value. I only face this problem when adding an existing sitelink asset extension to an asset group. Otherwise, asset group creation works fine using the same query without sitelink assets. The issue happens only when attaching asset extensions like sitelink, callout, call, and others. Can you help me understand the cause of this error? 

Here is the trigger Value which causes the failure of request , you can also see in the above error message- 
        "trigger": {
          "stringValue": "SITELINK,UBERVERSAL"
        },

It would be really helpful if you could guide me on this. I don’t think the issue is related to asset requirements because, as you can see in my request, I am sending all the necessary details for the asset group.

Additionally, I would appreciate it if you could explain how to edit asset extensions (like sitelink, callout, call, etc.) in an asset group. Specifically, if an asset group already has an attached sitelink and I want to add another sitelink, how can I do that? Also, how can I remove an existing asset extension from the asset group?

And one more thing I am firstslty created each assets and then attaching all the assets to the asset group after creation of asset group so I don't think so asset group creation give this type of error.

Thanks in advance!

Google Ads API Forum Advisor

unread,
Feb 18, 2025, 4:18:56 PM2/18/25
to shahilve...@gmail.com, adwor...@googlegroups.com
Hi,

I would recommend that you use remove operation to remove the existing asset extension from the asset group. You may use the create operation to add the new asset extension to the asset group.

Also, please note that adding SITELINK asset extensions to an asset group is not supported via Google Ads API.

Hope this helps. If you have any more queries, please feel free to get back to us.


Thanks,
 
Google Logo Google Ads API Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-02-18 21:18:23Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02vH2KH:ref" (ADR-00288638)


 


Reply all
Reply to author
Forward
0 new messages