New Bulk Uploads for Label Updates

249 views
Skip to first unread message

Mert Ozal

unread,
Aug 23, 2021, 7:39:30 AM8/23/21
to Google Ads Scripts Forum
Hello Everyone!


So i tried label campaign, adgroup and keywords but no luck. When i check supported entities (https://developers.google.com/google-ads/scripts/docs/features/bulk-upload-entities) There is no such attribute named "Label" but there are label column in example sheets (https://support.google.com/google-ads/answer/10702525?hl=en&ref_topic=10703532)

Moreover when i try to use bulk update without label it works successfully but if i add label column it not works WITHOUT ERROR. So i'm stuck. I can't debug and there is conflict between documentation. 

I'm putting example code to replicate the issue. Hope someone knows what going on :)

// *******************
// THIS SCRIPT FAILS
// *******************
function main() {
  var columns = [
     "Action", "Campaign", "Ad group", "Keyword", "Keyword status", "Label"
  ];

  var upload = AdsApp.bulkUploads().newCsvUpload(columns,{useLegacyUploads: false});

  upload.append({
     "Action": "Add",
     "Campaign": "Brand_exact_",
     "Ad group": "Ad group 2",
     "Keyword": "mert_keyword4",
     "Keyword status": "Enabled",
     "Label": "test_label1"
  });
  upload.forCampaignManagement();
  upload.apply();
}



// *******************
// THIS SCRIPT WORKS
// *******************
function main() {
  var columns = [
     "Action", "Campaign", "Ad group", "Keyword", "Keyword status"
  ];

  var upload = AdsApp.bulkUploads().newCsvUpload(columns,{useLegacyUploads: false});

  upload.append({
     "Action": "Add",
     "Campaign": "Brand_exact_",
     "Ad group": "Ad group 2",
     "Keyword": "mert_keyword4",
     "Keyword status": "Enabled"
  });
  upload.forCampaignManagement();
  upload.apply();
}

As Screenshot attached, both functions seems to worked and not changed anything BUT one of them failed and other one created new keyword to ad group. Something is very wrong here :)

Best!
Mert


Screen Shot 2021-08-23 at 14.33.52.jpg

Google Ads Scripts Forum Advisor

unread,
Aug 24, 2021, 12:10:18 AM8/24/21
to adwords...@googlegroups.com
Hi Mert,

Thanks for reaching out. Harry here, from the Google Ads Scripts Team.

All bulk upload results would be recorded in the Uploads section (Tools & Settings > under Bulk Actions, Uploads) regardless whether the upload is through a script o the Google Ads UI. It is intended that all bulk upload scripts' results show no changes in the Script History section as uploads will still go through the same process as manually using the UI's bulk upload. I would recommend checking out the Uploads section first where you can download the results and see why uploads failed.

Moreover, if you are looking at a bulk upload template from the UI, you'd be better off using the AdsApp.​FileUpload instead. See Bulk upload examples for your reference. For better assistance, it would be best to provide your CID and script's name in which you can provide here or privately via the reply to author option.

Kindly check and let me know. We can proceed from there.

Thanks,
Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2Mhxkw:ref

Aarthi Ilangovan

unread,
Feb 21, 2023, 5:37:11 PM2/21/23
to Google Ads Scripts Forum
Hi, 

Is there an option to do bulk uploads for applying label to Adgroup & keyword IDs?

I have a similar requirement & would like to know if it is possible 

Google Ads Scripts Forum Advisor

unread,
Feb 22, 2023, 5:38:05 AM2/22/23
to adwords...@googlegroups.com

Hi Aarthi,

 

Yasmin here from the Google Ads Scripts Team.

 

You may check this link for the entities supported by bulk upload in Google Ads Scripts. Upon checking our documentation guide for Bulk Uploads, there doesn't appear to be a template spreadsheet for updating keywords and ad groups to add a label for them. I would recommend you to iterate through the entities using AdsApp methods instead and use the applyLabel method. You may check this link for a guide on how to apply a label to an entity; in the example's case, a campaign.

 

Let us know if you have any further clarifications.

 

Best regards,

 

Google Logo
Yasmin Gabrielle
Google Ads Scripts Team
 


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