I am trying to build a selector for adgroup names, where the filtering criteria is a number (an ID) and I want to retrieve all the AdGroups where this id is existent in the AdGroup name.
I get the ids from a Google Spreadsheet and tried to convert to a string, but it doesn't give any result. When I replace the productId just with a normal value it gives results.
var productId = newSheet.getRange(i,2).getValue().toFixed(0);
var adgroupIterator = AdsApp.adGroups().withCondition("Name CONTAINS '"+ productId +"'").get();
Could you suggest a solution for this?