Help wanted, collection_size_error TOO_FEW when creating adGroupAds

194 views
Skip to first unread message

Adam Genshaft

unread,
Jul 3, 2022, 12:35:08 PM7/3/22
to Google Ads API and AdWords API Forum
I'm sending this object:

{
    "status": "ENABLED",
    "resource_name": "customers/1310914546/adGroupAds/138411489117~-1",
    "ad": {
        "name": "Image ad1656865946261",
        "final_urls": [
            "https://www.sobelifestylegroup.com/?retarget=1&utm_source=retarget&utm_medium=GG&utm_campaign="
        ],
        "responsive_display_ad": {
            "business_name": "Sobe Lifestyle Group",
            "headline": "So Be It",
            "long_headline": {
                "text": "So Be It"
            },
            "descriptions": [
                {
                    "text": "Reserve your next Miami vacation with the most trusted concierge service in Miami."
                }
            ],
            "marketing_images": [
                {
                    "asset": "customers/1310914546/assets/43047554250"
                }
            ],
            "square_marketing_images": [
                {
                    "asset": "customers/1310914546/assets/43017270794"
                }
            ]
        }
    }
}

And I recieve this response:

{
  "errors": [
    {
      "error_code": {
        "collection_size_error": "TOO_FEW"
      },
      "message": "Too few.",
      "location": {
        "field_path_elements": [
          {
            "field_name": "operations",
            "index": 0
          },
          {
            "field_name": "create"
          },
          {
            "field_name": "ad"
          },
          {
            "field_name": "responsive_display_ad"
          }
        ]
      }
    }
  ],
  "request_id": "mgwfdaAiCjDqvtX71qFfSQ"
}

Any idea why?

Google Ads API Forum Advisor

unread,
Jul 4, 2022, 3:48:09 AM7/4/22
to adam...@gmail.com, adwor...@googlegroups.com
Hi Adam,

Thank you for raising your concern to my team.

Upon checking the API request, I can see that it already met the minimum requirements for creating responsive display ads. With this, allow me to raise the issue to my team to further check why the error occurs. Rest assured that we will provide updates when it becomes available.

Regards,
Google Logo
Ernie John
Google Ads API Team
 


ref:_00D1U1174p._5004Q2cFofy:ref

Google Ads API Forum Advisor

unread,
Jul 4, 2022, 9:06:15 AM7/4/22
to adam...@gmail.com, adwor...@googlegroups.com

Hi Adam,

Thanks for your patience.

Our team sees that you’re using AdGroupAdService to create ads, and specified a resource name with -1 in the path as resource name. 

Note that specifying -1 in the resource name is intended only for Batch Job and GoogleAdsService.Mutate as they support temporary resource names that can be referenced later on in the same request. If you have set using AdGroupAdService without using batch job or Mutate, then you may need to avoid using temporary resource names to avoid any error.

Could you please confirm this? If you’re indeed using Batch Job or GoogleAdsService.Mutate, then you may provide us privately with the complete logs in the format of the request as seen in their respective links.

Regards,

Google Logo
Yasar
Google Ads API Team
 


ref:_00D1U1174p._5004Q2cFofy:ref

Adam Genshaft

unread,
Jul 10, 2022, 5:02:11 PM7/10/22
to Google Ads API and AdWords API Forum
Confirmed! Removing the resource_name and adding an ad_group instead worked. However, I had more similar errors downstream that I had to tinker through.

Google Ads API Forum Advisor

unread,
Jul 10, 2022, 11:51:21 PM7/10/22
to adam...@gmail.com, adwor...@googlegroups.com
Hi Adam,

I am Sherwin from Google Ads API. I hope that you are doing well today.

Thank you for confirming Adam. I am glad that Yasar's recommendation works for you. For the errors that you still encounter, we will be glad to extend our hand to help you resolve it. Could you please share those errors that you still encounter to us by providing us the complete request and response logs with request ID and request header generated on your end? You can provide it via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com. If you haven't enabled the logging yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link.

Kind regards,
Google Logo
Sherwin Vincent
Google Ads API Team
 


ref:_00D1U1174p._5004Q2cFofy:ref
Reply all
Reply to author
Forward
0 new messages