The problem is I can create a campaign with the Apps Script which shows up in Ads Words Console, the problem is, I can't find it with the Apps Script API. All manually create Campaign can be found. So the question is how can I retrieve the newly created Ads Campaign id.

This is how I create the Ads Campaign, which runs through with no error. Once the code runs through it shows up in the Upload details view.

var upload = AdsApp.bulkUploads()     .newCsvUpload([         "Campaign",         "Start Date",         "Budget",         "Campaign type",         "Bid Strategy Type",         "Campaign state",     ]); upload.append({     "Campaign": "Some Campaign name",     "Start Date": "2020-06-01",     "Budget": "1",     "Campaign type": "video",     "Bid Strategy Type": "Manual CPV",     "Campaign state": "enabled", }); upload.forCampaignManagement(); upload.apply(); 

To retrieve all campaigns I use this code snipped, but the created campaign never shows up.

var campaignIterator = AdsApp.campaigns()     .get(); while (campaignIterator.hasNext()) {     var campaign = campaignIterator.next();     Logger.log('Name: ' + campaign.name); } 

Tag:google-ads-api, javascript, google-apps-script

Add a new comment.