Buk upload Target CPA change for ad group via script

298 views
Skip to first unread message

Jakub Plech

unread,
Aug 11, 2020, 2:48:41 PM8/11/20
to Google Ads Scripts Forum
Hello, I have a problem with what title says. I want to change Target CPA values for specific ad groups in specific campaigns via bulk upload script. I have the script ready, the problem is I can't really format the google sheet CSV properly.

Here's the script:

function main() {
bulkUploadFromGoogleSpreadsheet();
}

function bulkUploadFromGoogleSpreadsheet() {
  // The format of this spreadsheet should match a valid bulk upload template.
  // for the list of supported bulk upload templates.
  var SPREADSHEET_URL = 'shreadsheetUrl';
  var spreadSheet = SpreadsheetApp.openByUrl(SPREADSHEET_URL);
  //Logger.log(spreadSheet.getName());
  var sheet = spreadSheet.getSheetByName('name');
  
  var upload = AdsApp.bulkUploads().newFileUpload(sheet);
  upload.forCampaignManagement();

  // Use upload.apply() to make changes without previewing.
  upload.apply();
}


Now when it comes to spreadsheet, I'm including Campaign, Ad group and Target CPA as columns, but it does not recognize them as proper entities. I have no idea how to format it properly. Any ideas on this?

Cheers

Google Ads Scripts Forum Advisor

unread,
Aug 11, 2020, 4:51:42 PM8/11/20
to adwords...@googlegroups.com
Hello,

Can you please share the spreadsheet with us? If preferred, this can be done privately by specifying 'reply privately to author', which you can find by clicking the down-arrow icon on the top right corner of this post.

Thanks,
Matt
Google Ads Scripts Team

ref:_00D1U1174p._5004Q23JP1H:ref

Jakub Plech

unread,
Aug 12, 2020, 4:00:16 AM8/12/20
to Google Ads Scripts Forum
Hi,

attaching screenshot. There are 2 samples included:
1. CPA change - the one that does not work;
2. Ad group status change - this one works perfectly fine when I use the same script provided in original post. So please consider that a starting point, that one works so I thought that CPA change would work as wel.

I'm 100% sure that I've put fine campaign name and ad group name (please note that I do not try to create new campaigns or ad groups, I want to change the existing entity's Target CPA), so I guess that there is some kind of problem with the "Target CPA" column name. I've been trying to change that to "Max. CPA (converted clicks)", "Max. CPA", also tried to include more columns so that Google Ads recognizes it, such ad Bid Strategy Type with "cpa" value, Action with "set" value, nothing really works, in some cases it gives me an error that it can;t recognize the entity, in other cases it recognizes the entity, but there are no changes. I'm really stuck here. I've been using this as a documentation: https://developers.google.com/google-ads/scripts/docs/features/bulk-upload-entities.

Kind regards
Screenshot_42.png

Google Ads Scripts Forum Advisor

unread,
Aug 12, 2020, 5:46:13 AM8/12/20
to adwords...@googlegroups.com
Hi Jakub,

Thank you for sending additional details about your issue.

However, so our team can more accurately investigate, could you provide your customer ID and the url of your spreadsheet instead of the screenshot? You may send the requested details using the Reply privately to author option.

Best regards,
Peter

Jakub Plech

unread,
Aug 12, 2020, 6:21:00 AM8/12/20
to Google Ads Scripts Forum
Peter,

sorry but I can't reply privately (having problems with chrome configuration), can you provide the desired email address? I'll write and email directly there and include link to this thread.

Kind regards

Jakub Plech

unread,
Aug 12, 2020, 8:42:16 AM8/12/20
to Google Ads Scripts Forum
Seems I got a partial solution. If I upload a csv from my desktop via Bulk Actions -> Upload section in Google Ads, everything works fine. But when i upload the exactly same thing via script provided, then I'm getting an error "Unable to determine the entity-type of this row. Make sure to only provide fields for columns that are appropriate for the entity.".

I suppose that bulk editor in Ads can't recognize if the CPA level I want to edit refers to campaign level or ad group level for some reason. So the question is, how do I make bulk editor recognize that I'm pushing data related to ad group, not campaign level?
upload ok z kompa, nie działa przez skrypt.png

Google Ads Scripts Forum Advisor

unread,
Aug 12, 2020, 1:38:10 PM8/12/20
to adwords...@googlegroups.com
Hi Jakub,

Unfortunately, we don't post support email addresses publicly. 

Looking at the screenshots of your CSV, I see there is a column 'Target CPA', which isn't listed as a supported bulk upload entity for campaigns or ad groups. Also, please note that the bid strategy type column has different values for campaign and ad groups.

If you continue to have issues, you can provide your CID publicly (this is safe) and we can delete the post containing the CID.

Regards,
Matt
Message has been deleted

Google Ads Scripts Forum Advisor

unread,
Aug 13, 2020, 11:52:38 AM8/13/20
to adwords...@googlegroups.com
Hi Jakub,

Thanks for bringing this to our attention. We need to further investigate this issue internally. As soon as I have more information, I will provide an update on this thread.

Thanks,

Jakub Plech

unread,
Aug 17, 2020, 3:51:22 AM8/17/20
to Google Ads Scripts Forum
Matt,

any update on this?

Google Ads Scripts Forum Advisor

unread,
Aug 17, 2020, 4:05:58 AM8/17/20
to adwords...@googlegroups.com
Hi Jakub,

Thank you for following up.

Our team is still currently looking into this issue. We'll reach out to you immediately via this thread as soon as we have updates.

Best regards,
Peter

Jakub Plech

unread,
Aug 25, 2020, 4:32:45 AM8/25/20
to Google Ads Scripts Forum
Guys, can we make things moving here? It's been 2 weeks since original post, if you're not able to help then please let me know so that I can try to find another solution. 

Kind regards

Google Ads Scripts Forum Advisor

unread,
Aug 25, 2020, 6:37:28 AM8/25/20
to adwords...@googlegroups.com
Hi Jakub,

My apologies for the inconvenience, and back and forth. Our team has already identified the cause of the issue, however, we are still working for the fix. We will notify you to this forum thread as soon as I get some updates.

Also, the workaround that our team can recommend is to use bulk upload on the UI.

Regards,
Google Logo
Ernie John Blanca Tacata
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q23JP1H:ref

Jakub Plech

unread,
Aug 25, 2020, 7:28:52 AM8/25/20
to Google Ads Scripts Forum
Thank for a fast answer. I can upload files manuall via the UI but that's a lot of manual work. So last question for now: any idea about when this fix will be released so that I can automate the whole process?

Kind regards

Google Ads Scripts Forum Advisor

unread,
Aug 25, 2020, 1:52:42 PM8/25/20
to adwords...@googlegroups.com
Hi Jakub,

Unfortunately, we cannot release information on fix timelines on the forum. We will get back to you ASAP as soon as we have more information.

Thanks,
Matt

Jakub Plech

unread,
Oct 7, 2020, 7:51:16 AM10/7/20
to Google Ads Scripts Forum
Hi,

any update on that? It's been 1,5 month now since your last reply.

Kind regards

Google Ads Scripts Forum Advisor

unread,
Oct 7, 2020, 9:18:20 PM10/7/20
to adwords...@googlegroups.com

Hi Jakub,

Thanks for the follow up. I'm afraid that there is still no update on this; however, allow me to make another follow up with the team. We'll update this thread for any feedbacks available.

Regards,

Google Logo
Mark Kevin Albios
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q23JP1H:ref

Mikael

unread,
Oct 9, 2020, 2:20:43 PM10/9/20
to Google Ads Scripts Forum
Hi Matt, 

I've raised similar issues in Jan this year; I wouldn't hold my breath :\ 

BR
Mikael

Google Ads Scripts Forum Advisor

unread,
Oct 11, 2020, 11:42:05 PM10/11/20
to adwords...@googlegroups.com
Hi Mikael,

Thanks for getting back to us.

We're currently aware of this and our team have been discussing this. We'll update this thread as soon as we receive any information from the team.

Regards,
Google Logo
Mark Kevin Albios
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q23JP1H:ref

Google Ads Scripts Forum Advisor

unread,
Jan 7, 2021, 2:10:42 AM1/7/21
to adwords...@googlegroups.com

Hi All,

 

I am Harry from the Google Ads Scripts Team. I am writing to inform you that bulk uploading Target CPA for Ad Groups should be working as expected by now. Let me know if there are still issues.

 

Thanks,

Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q23JP1H:ref

Jakub Plech

unread,
Feb 8, 2021, 10:23:11 AM2/8/21
to Google Ads Scripts Forum
Hey all,

just letting you know that it works now, thanks, took you some time, but in the end I very much appreciate that you developed this, it's gonna help a lot of people out there. Cheers!

Reply all
Reply to author
Forward
0 new messages