campaign.addNegativeKeywordList method failing

22 views
Skip to first unread message

Daniel W

unread,
Nov 5, 2025, 7:51:29 PM (10 days ago) Nov 5
to Google Ads Scripts Forum
Hello,
I have a script that is adding missing negative keyword lists to campaigns that don't have them. However, when I run it in preview, it returns an error.

Screenshot 2025-11-05 160428.jpg

The script name in my account is "Locations & NKWList Exclusion Auto-Apply (WIP)" I have confirmed that I am passing in the negative keyword list as an object (i added a few console log statements to confirm it's the list I expected, which is not already applied to the campaign). 

I even tried switching to passing it in as the ID, but got an error telling me to use the list object (which is what I was trying to do originally, but that is failing).

Eventually, I ran as a normal run and it worked fine. I suspect this is a bug related to the preview mode that needs to be fixed, since it improperly displays the outcome of a "previewed" change to negative keyword lists.




Google Ads Scripts Forum Advisor

unread,
Nov 5, 2025, 10:06:14 PM (10 days ago) Nov 5
to adwords...@googlegroups.com

Hi,

Thank you for reaching out to the Google Ads Scripts support team.

Please be noted that the Google Ads Script will make changes only when it is executed and in Preview mode, they make no changes to campaigns’ data. Kindly execute the script and get back to us with the following details if you are still facing any issues.

  • Google Ads account ID/CID
  • Shareable spreadsheet link if you are using any in the script. You may follow this article to share a file publicly
You can share the requested details via Reply privately to the author option or a direct private reply to this email.

Thanks,
 
Google Logo Google Ads Scripts Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-11-06 03:05:38Z GMT] This message is in relation to case "ref:!00D1U01174p.!500Ht01vSotY:ref" (ADR-00338599)



Reply all
Reply to author
Forward
0 new messages