Create a weather widget using Google Sheets

To create a weather widget using Google Sheets, follow these steps:

  1. To begin, create a free weatherstack account.
  2. Make your own copy of this Google Sheet template.
  3. On cell A2, enter your city as "City, CO" where City is the name of your city and CO is a two-letter code identifier of your state (if in the US), or a two-letter code identifier of your country (if outside of the US).


    For a US city, you could enter New York, NY

    For a city outside the US, you could enter London, UK

  4. On cell A5, enter your API Access Key  for weatherstack (which you can find at
  5. On cell A9, enter m to get the temperature in °C or fto get the temperature in °F
  6. Click on the Tools menu and select the option Script editor.
  7. You'll see a script. Click on the project's trigger's menu. Add a trigger to your Apps script
  8. Click the + Add Trigger button in the bottom right corner of the page. add_trigger.png
  9. Set a trigger for the myFunction function, that runs from Head on a Time-driven source that's triggered on an Hourly timer.Set the trigger
  10. Once you set the trigger (and so that you don't have to wait 1 hour to get data), run the script for the first time Run the function
  11. That will retrieve (on cells D2 and D3) the weather for the city you entered on cell A2 on an hourly basis. You can use that weather data and our Spreadsheets data source to build a text widget using the concatenated cell D4 for your dashboard that will update hourly.

    Now you'll know if you need the umbrella when you're heading out.Weather widget 


There are alternatives to Weatherstack you might want to try. This helpful article reviews several weather APIs that, used in conjunction with Google Sheets' =ImportData() function to retrieve JSON data, can pull detailed weather forecast data to a Google Sheet.

Turn spreadsheet data into shareable dashboards

Was this article helpful?

Awesome! 👍 Thanks so much for your feedback!

Sorry about that! Start a conversation now.

Ready to create your own dashboard?

Get started for free

Still have questions? Get in touch.