Help Me To Update Old Ad Groups Builder Script

104 views
Skip to first unread message

Harshad Patel

unread,
Jan 7, 2020, 2:03:06 AM1/7/20
to Google Ads Scripts Forum

Hello everyone!


I found one of the most useful scripts that help me to create an ad group, ads, keywords and negative keywords straight from the Google Spreadsheet.


Get Script and Spreadsheet from this Link - http://automatingadwords.com/free-adwords-script-adgroup-builder/


But, the problem is, this script is work as per old "Expanded Text Ad" format means you can only set up 2 Headlines, 2 Path, and only 1 Description.


Currently, Google Ads support 3 Headlines, 2 Paths, and 2 Description Line. 


So, if anyone could help me to update this script and spreadsheet as per current Google Ads "Expanded Text Ad" and "Responsive search ad" format, then it would be more helpful for me.


Thanks in Advance!

Harshad Patel

Google Ads Scripts Forum Advisor

unread,
Jan 7, 2020, 5:06:26 AM1/7/20
to adwords...@googlegroups.com
Hi Harshad,

Thanks for posting your concern.

I am afraid that our team doesn't provide support to a third-party script. You may try to reach out to the author of that script via this link to get further support on updating the said third-party script.

However, you may refer and use the sample code below where the 3 headline fields, 2 path fields and 3 description fields are implemented. Also, you may try to utilize this Spreadsheet code and combine it with the sample code below to get the details of the expanded text ads from the Google spreadsheet. 
function main() {
  var adGroupIterator = AdsApp.adGroups()
      .withCondition('Name = "INSERT_ADGROUP_NAME_HERE"')
      .get();
  if (adGroupIterator.hasNext()) {
    var adGroup = adGroupIterator.next();
    adGroup.newAd().expandedTextAdBuilder()
        .withHeadlinePart1('First headline of ad')
        .withHeadlinePart2('Second headline of ad')
        .withHeadlinePart3('Third headline of ad')
        .withDescription('Ad description')
        .withDescription1('First additional Ad description')
        .withDescription2('Second additional Ad description')
        .withPath1('path1')
        .withPath2('path2')
        .withFinalUrl('http://www.example.com')
        .build();
  }
}


Let me know if you have questions and clarifications.

Regards,
Ejay
Google Ads Scripts Team

ref:_00D1U1174p._5001UOG8lW:ref

Harshad Patel

unread,
Jan 7, 2020, 7:08:31 AM1/7/20
to Google Ads Scripts Forum
Hi Ejay,

Thank you for the reply and nice to see you again to help me.

Anyways, let me try to build a new script from scratch as per your suggestion and get in touch with you if I need your help.

Thanks
Harshad Patel

Harshad Patel

unread,
Jan 8, 2020, 1:42:15 AM1/8/20
to Google Ads Scripts Forum
Hi Ejay,

Could you please help me with the following task:

1) How to compare sheet ads data with existing Ad group, Keywords, Extended Text Ads?
2) How to skip building Ad group, Keywords and Extended Text Ads, if already exists?

( I would like to compare Ad Group at Campaign level but Keywords and Extended Text Ads must be compared at Ad Group Level.)

Thanks
Harshad Patel

Google Ads Scripts Forum Advisor

unread,
Jan 8, 2020, 5:50:49 AM1/8/20
to adwords...@googlegroups.com
Hi Harshad,

I am afraid that there is no readily available script for the use case that you've provided.

However, you may try to implement some of the SpreadsheetApp sample codes to retrieve the data of the entities from Google spreadsheet. Then, use the data that have been retrieved from the spreadsheet to the corresponding selector and iterator specified below:  After implementing the selector and iterator, you can utilize the returned value of the totalNumEntities() method of each entity as condition. If the total number of entities is greater than 0, then, you can skip the entity builder for these entities.

Hope this will help.
Reply all
Reply to author
Forward
0 new messages