Error in WHERE clause: invalid value '

264 views
Skip to first unread message

Jonny Tushingham

unread,
Jun 17, 2022, 7:36:48 AM6/17/22
to Google Ads API and AdWords API Forum
Hello,

We can't seem to get a script to run. We're returning the below error:

Exception: Call to GoogleAdsService.Search failed: Error in WHERE clause: invalid value '. 
   at adsapp_compiled:18080:138 at adsapp_compiled:18091:9 
   at ra (adsapp_compiled:227:15) at Object.search (adsapp_compiled:235:20) 
   at dI.search (adsapp_compiled:18206:36) at NH.search (adsapp_compiled:17783:19) 
   at OH.search (adsapp_compiled:17878:20) at VH.search (adsapp_compiled:17970:19) 
   at ed (adsapp_compiled:1041:32) at ed.next (<anonymous>)

This error is returned when attempting to run the below (which has worked well on multiple accounts already):

function main() {
var SPREAD = SpreadsheetApp.openByUrl("Google Sheet URL");
var SHEET = SPREAD.getSheetByName("TabName");
var dailyBudgetChanger = function(campaign, budget) {
var campaigns = AdsApp.campaigns().withCondition("Name = '" + campaign + "'").get();
while (campaigns.hasNext()) {
var campaign = campaigns.next()
campaign.getBudget().setAmount(budget)
}
}
var lastRow = SHEET.getLastRow();
for (var i = 2; i <= lastRow; i++) {
var rowCampaign = SHEET.getRange(i, 1).getValue();
var rowBudget = SHEET.getRange(i, 2).getValue();
dailyBudgetChanger(rowCampaign, rowBudget);
}
}


Could anyone please assist?

Many thanks,
Jonny

Google Ads API Forum Advisor

unread,
Jun 17, 2022, 11:14:31 AM6/17/22
to jo...@themediapeople.co.uk, adwor...@googlegroups.com
Hi Jonny,

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

To investigate the issue further, could you please provide the complete request and response logs, with the request-id? If you haven't yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link.You can provide it via Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead. Let me know if you have any questions.

Thanks,
Google Logo
Nirmitabahen Gaurav
Google Ads API Team
 


ref:_00D1U1174p._5004Q2bxNim:ref
Reply all
Reply to author
Forward
0 new messages