negativeKeywordsList.addNegativeKeywords() Not Working

25 views
Skip to first unread message

Dennis Kreeft

unread,
May 31, 2023, 8:09:33 AM5/31/23
to Google Ads API and AdWords API Forum
Hi, I have a script which is designed to fetch an array of keywords, and add them to an account level negatives list. 

The script runs fine, but doesn't actually make any changes to the shared list.

Snippet using a fixed string for keywords:

   if(account.getName() == 'XYZ'){
    var keywords = ["planes", "trains"]
    var list = AdsApp.negativeKeywordLists().withCondition("Name CONTAINS 'list_name'").get();
      while (list.hasNext()){
        var ex_list = list.next();
              ex_list.addNegativeKeywords(keywords);
   }
  }

Is this an issue with my script or the AdsApp.negativeKeywordLists()  ?

Thanks,
Dennis

Google Ads API Forum Advisor

unread,
Jun 2, 2023, 2:17:58 PM6/2/23
to dennis...@faire.com, adwor...@googlegroups.com

Hi Dennis,

I'm from the Google Ads API team. I hope you're doing well today.

Kindly note that this forum channel is intended for discussion of technical implementation issues and related concerns to Google Ads API. If you're encountering issues with the said API, please provide more context on your concern along with some screenshots of the issue and the complete request and response logs with request-id so we can further investigate.

Otherwise, if you're encountering issues in Google Ads Scripts, I suggest you post the details of your concern on their forum to get further assistance.

Reference links:
Google Ads API - https://developers.google.com/google-ads/api/docs/start
request - https://developers.google.com/google-ads/api/docs/concepts/field-service#request
response - https://developers.google.com/google-ads/api/docs/concepts/field-service#response
request-id - https://developers.google.com/google-ads/api/docs/concepts/call-structure#request-id
forum - https://groups.google.com/forum/#!forum/adwords-scripts

This message is in relation to case "ref:_00D1U1174p._5004Q2lv5S5:ref"


Thanks,
 
Google Logo Google Ads API Team


Google Ads API Forum Advisor

unread,
Jun 2, 2023, 2:19:39 PM6/2/23
to dennis...@faire.com, adwor...@googlegroups.com

Hi Dennis,

I'm from the Google Ads API team. I hope you're doing well today.

Kindly note that this forum channel is intended for discussion of technical implementation issues and related concerns to Google Ads API. If you're encountering issues with the said API, please provide more context on your concern along with some screenshots of the issue and the complete request and response logs with request-id via Reply privately to author option so we can further investigate.

Reply all
Reply to author
Forward
0 new messages