Weather API Script

945 views
Skip to first unread message

From_Russia_with_Vlad

unread,
Dec 6, 2019, 8:14:59 AM12/6/19
to Google Ads Scripts Forum


Hi,

Could someone point me in the right direction as to what I'm actually supposed to edit from the Weather API bid adjustment script template? 

It can be found here: https://developers.google.com/google-ads/scripts/docs/solutions/weather-based-campaign-management#bid-by-weather


So far, I've put in my API Key from OpenWeatherMap.org & inserted the link where the Google sheet with the bid adjustment parameters is located. 

I've attached screenshots of the Google Sheet template that I got from the link provided above as well for reference. 



Screen Shot 2019-12-06 at 7.10.19 AM.png



Screen Shot 2019-12-06 at 7.10.36 AM.png



Screen Shot 2019-12-06 at 7.10.54 AM.png


Below is the error I am getting right away when I try the "Preview" tool inside of Google Ads Scripts. 

Thank you in advance for your assistance.



Screen Shot 2019-12-06 at 7.05.35 AM.png


Google Ads Scripts Forum Advisor

unread,
Dec 6, 2019, 9:59:03 AM12/6/19
to adwords-scripts+apn2wqez3r_vx77b...@googlegroups.com, adwords-scripts+apn2wqez3r_vx77b...@googlegroups.co, adwords...@googlegroups.com
Hello,

I noticed that your spreadsheet sheets are out of order. They should remain in the same order as when you made the copy of it, so Instructions should be the first sheet on the spreadsheet.

Cheers,
Anthony
Google Ads Scripts Team

ref:_00D1U1174p._5001UODzhT:ref

From_Russia_with_Vlad

unread,
Dec 8, 2019, 11:33:08 PM12/8/19
to Google Ads Scripts Forum
Hi,

I've adjusted the sheets and it's running but with errors. 

Getting the following errors: 

Logs truncated: length exceeded limit of 100000.

Request failed for http://api.openweathermap.org returned code 404. Truncated server response: {"cod":"404","message":"city not found"} (use muteHttpExceptions option to examine full response) (file Code.gs, line 392)
Also, cities, such as Los Angeles are getting a bid adjustment modifier applied to them even though it's not raining there currently (and hasn't rained there all day) Please advise.

Google Ads Scripts Forum Advisor

unread,
Dec 9, 2019, 9:46:49 AM12/9/19
to adwords-scripts+apn2wqez3r_vx77b...@googlegroups.com, adwords-scripts+apn2wqez3r_vx77b...@googlegroups.co, adwords...@googlegroups.com
Hi,

Can you please reply privately to author your CID and script name so that I can take a closer look? You will also need to share a shareable link to your spreadsheet.

Thanks,
Reply all
Reply to author
Forward
0 new messages