Create a weather widget using Google Sheets

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

  1. Sign up for 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).

    Examples

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

    For a city outside the US, you could enter Welwyn Garden City, UK

  4. On cell A5, enter your API Access Key  for weatherstack (which you can find at https://weatherstack.com/dashboard?logged_in=1).
  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. set_a_trigger.png
  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.Google Analytics authentication box
  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_script.png
  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 Spreadsheets to build a text or column widget for your dashboard that will update hourly.

    Now you'll know if you need the umbrella when leaving the office.Weather.png 

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.