Trouble debugging "GENERIC_ISSUE : Failed to create AdWords entity. : "

14 views
Skip to first unread message

Eric Gesinski

unread,
Aug 13, 2019, 5:25:20 PM8/13/19
to Google Ads Scripts Forum
I'm reviewing an old script that copied ads to a new ad group. What I'm trying to do is update expanded text ads from the original text ad format.

Here is the code:

      // Now we have to make ads for this ad group. First find all the ads from the old group.
      var adList = AdsApp.ads().withCondition("CampaignName = '" + currentCampaignName + "'").withCondition("AdGroupName = '" + adGroup.getName() + "'").withCondition("Status = ENABLED").get();

      var adOps = [];
      while (adList.hasNext()) {
        var oldAd = adList.next();
        adOps.push(
          newAdGroup.newAd().expandedTextAdBuilder()
            .withHeadlinePart1(oldAd.getHeadlinePart1()).withHeadlinePart2(oldAd.getHeadlinePart2()).withHeadlinePart3(oldAd.getHeadlinePart3())
            .withDescription(oldAd.getDescription()).withDescription1(oldAd.getDescription1()).withDescription2(oldAd.getDescription2())
            .withPath1(oldAd.getPath1()).withPath2(oldAd.getPath2())
            .withFinalUrl(oldAd.urls().getFinalUrl()).withFinalUrlSuffix(oldAd.urls().getFinalUrlSuffix())
            .build());
      }
      // Review success or failure of ad creation.
      for (var i = 0; i < adOps.length(); i++) {
        if (adOps[i].isSuccessful())
        Logger.log('New ad built: ' + oldAd.getType() + ' ad type has been created, in the "' + newName + '" ad group.');
        else
        Logger.log('Error from ad [' + oldAd.getHeadlinePart1() + ']: ' + adOps[i].getErrors());
      }

When testing, it's throwing the "GENERIC_ISSUE : Failed to create AdWords entity. : " error. This code worked previously before using expanded text ads.

Am I missing something? Or is it a bug?

Eric

Google Ads Scripts Forum Advisor Prod

unread,
Aug 14, 2019, 3:12:41 AM8/14/19
to adwords...@googlegroups.com
Hi Eric,

So that I can further investigate the error, could provide the customer ID and the name of the script where you implemented the provided script via Reply privately to author option?

Regards,
Ejay
Google Ads Scripts Team

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