Not able to remove VIDEO campaign with status "REMOVED" from shared set (Negative Keyword List)

134 views
Skip to first unread message

Google House Ads

unread,
Apr 29, 2021, 4:44:50 AM4/29/21
to Google Ads Scripts Forum
Hello,

I want to remove negative keywords list via Google Ads API.
I am able to remove non-video campaigns from negative keyword list and then remove negative keywords list.

But when VIDEO campaign is attached to negative keyword list then I am not able to deattach from negative keyword list via Google Ads API (due to Google ADS API limitation for VIDEO campaigns). So I am using Google Ads script for removing VIDEO campaigns  from negative keyword list.

When active VIDEO campaign is attached to negativekeyword list then I am able to get and later to remove it from negative keyword list.

But if VIDEO campaign with status "REMOVED" is attached to negative keyword list then I am not able to get it and remove it from shared set via Google Ads Script.

I have created script 'GET_REMOVED_CAMPAIGNS_FROM_NEGATIVE_KEYWORD_LIST' in MCC 773-517-3772.

We have such shared set (Negative Keyword list) :
 
Account ID        "1317804939"
Shared Set ID     "1317804939"
Shared Set Name   "******************************* - AUTO_DELETED"
Number of Video Campaigns attached to shared set:  1
Video Campaigns IDs:   6818126382
Status of VIDEO campaign:  "REMOVED"

Script is here: 
=========================================================================================================
function getCampaignsFromSharedSet(accountId, shared_set_id) {
try {
var childAccounts = MccApp.accounts().withIds([accountId]).get();
if (!childAccounts.hasNext()) {
Logger.log('Account ' + accountId + ' not found; skipping.');
return;
}
var childAccounts = MccApp.accounts().withIds([accountId]).get();
var childAccount = childAccounts.next();

MccApp.select(childAccount);

var childAccount = AdsApp.currentAccount();
var accountId = childAccount.getCustomerId();
Logger.log('Processing account ' + accountId);
var negativeKeywordList = AdsApp.negativeKeywordLists().withIds([shared_set_id]).get().next();
    var negativeKeywordListCampaignIterator = negativeKeywordList.campaigns().get();
  Logger.log(negativeKeywordListCampaignIterator.totalNumEntities() + ' regular campaigns');
  var negativeKeywordListVideoCampaignIterator = negativeKeywordList.videoCampaigns().get();
  Logger.log(negativeKeywordListVideoCampaignIterator.totalNumEntities() + ' video campaigns');
    Logger.log(negativeKeywordList.getName());

} catch (e) {
return "Getting campaigns failed with error " + e
}

return null;
}


// entrypoint
function main() {
  accountId = "1317804939";
  shared_set_id = "1317804939";
  getCampaignsFromSharedSet(accountId, shared_set_id)
}
=========================================================================================================
How I can get/remove VIDEO  campaign (with status "REMOVED") from shared set (Negative keyword list) ?
Can you check what's the problem?

Thanks

Br,
Nazar

Google Ads Scripts Forum Advisor

unread,
Apr 29, 2021, 5:56:15 AM4/29/21
to adwords...@googlegroups.com
Hi Nazar,

Thanks for reaching out. I am Harry from the Google Ads Scripts Team.

Unfortunately, retrieving removed entities via scripts is not supported. Hence, why you can't remove Negative Keywords Lists in your Video Campaigns that are already removed. The best way to go about here is that if you want to retrieve unused entities in the future, make sure that you pause the old/unused entities instead of removing them.

Let me know if you have questions on this.

Thanks,
Google Logo
Harry Cliford Rivera
Google Ads Scripts Team
 


ref:_00D1U1174p._5004Q2GIYta:ref

Google House Ads

unread,
May 6, 2021, 6:50:30 AM5/6/21
to Google Ads Scripts Forum
Hi Harry,

Thanks for detailed explanation, so for me now it is clear that we have API limitation for getting/removing VIDEO  campaign (with status "REMOVED") from shared set (Negative keyword list) .

But now I noticed another issue 

For example, we have account 5054945277 and under mention account we have shared set 6550372444 .
Shared set 6550372444 is applied for campaign 8383946827.
I am not able to remove  campaign 8383946827 from  shared set 6550372444 . 
Could you investigate that ?

Campaign 8383946827 have  Buying plan "Instant Reserve" and campaign "End date" is 12/16/2019
Maybe due to that API is not allowing us to remove  campaign 8383946827 from  shared set 6550372444 .

Thanks,

Br,
Nazar

Google Ads Scripts Forum Advisor

unread,
May 7, 2021, 12:18:25 AM5/7/21
to adwords...@googlegroups.com
Hi Nazar,

Thanks for coming back.

I have checked further with the team, unsupported retrieving removed entities only applies to some entities like Ads so you should be able to retrieve Video Campaign with REMOVED status as seen in this link. However, it does not seem that an ENDED status can be retrieved for Video Campaigns and the NegativeKeywordList.campaigns() will only return Search and Display campaigns. You should instead remove Negative Keywords Lists of Video campaigns using the VideoCampaign.removeNegativeKeywordList() method.

Let me know if you have further questions on this.

Google House Ads

unread,
May 7, 2021, 5:59:25 AM5/7/21
to Google Ads Scripts Forum
Hi,

Today I tried to remove  Negative Keywords Lists of Video campaigns using the VideoCampaign.removeNegativeKeywordList() method , but issue  occurred "You can't make changes because the campaign was set to read-only."
You will be able to reproduce my issue after running script DEBUG_NEGATIVE_KEYWORD_LIST 

Could you look into this ?

Thanks,

Br,
Nazar

Google Ads Scripts Forum Advisor

unread,
May 9, 2021, 11:34:24 PM5/9/21
to adwords...@googlegroups.com
Hi Nazar,

Thanks for coming back. Kindly try to remove the Negative Keywords List through the Google Ads UI. If you encounter the same error message, please reach out to the Google Ads Product Team instead through this link. Their team should be able to assist you further on what causes the read only error you are encountering.
Reply all
Reply to author
Forward
0 new messages