Google Ads Script - Pause multiple campaigns
I'm getting to Google Ads scripts. I managed to execute this script that pauses a specific campaign but I couldn't apply this to multiple campaigns. Here is what I tried, but it only pauses the first campaign in ("Name IN ['test1', 'test2']"). Could someone help me to achieve this?
function main () { var campaignIterator = AdsApp.campaigns() .withCondition("Name IN ['test1', 'test2']").get(); if (campaignIterator.hasNext()) { var campaign = campaignIterator.next(); campaign.pause(); } }