Back to APIVerve in Google Sheets
SheetXAI logo
APIVerve logo
APIVerve · Google Sheets Guide

Pull Current Weather for Distribution Cities in a Google Sheet

2026-05-14
5 min read

The Scenario

It's Monday morning and you're three hours from a logistics standup where someone will inevitably ask whether any of your 80 distribution centre cities are facing weather conditions that could delay outbound shipments this week. You have all 80 cities in column A of a Google Sheet. Columns B, C, and D are empty. You've been meaning to build a weather enrichment into the weekly ops report for months, but nobody ever carved out the time, and right now you need the data before 10 AM.

The bad version:

  • Open the APIVerve weather endpoint, authenticate, and test a call to understand the response structure.
  • Write a loop that passes each city name as a query parameter, handles the ones with ambiguous names (there are three cities called "Springfield" in your list), and extracts temperature, humidity, and condition text from the response.
  • Paste 80 rows of weather data into three columns and check the standup presentation can reference the right numbers.

Weather data is only useful right now. The data you pull at 7 AM is already slightly stale by 10 AM. The longer the enrichment process takes, the less valuable the output.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Google Sheet. It reads your city list and, through its built-in APIVerve integration, it can fetch current weather for every distribution centre and write the temperature, humidity, and conditions into your target columns — before the standup.

For each city in column A, fetch the current weather from APIVerve and write temperature (°C), humidity (%), and conditions into columns B–D

What You Get

  • Column B filled with current temperature in Celsius for all 80 cities.
  • Column C filled with current humidity percentage.
  • Column D filled with the weather conditions string (e.g., "Overcast clouds", "Light rain").
  • Cities that return ambiguous results noted in column D with a disambiguation note.
  • Standup-ready data without a script having been written.

What If the Data Is Not Quite Ready

City names are ambiguous — multiple cities share the same name

For cities in column A where the state or country is available in column E, use it to disambiguate when fetching weather from APIVerve; for cities with no additional context, note the ambiguity in column D and fetch the most likely match

You need wind speed as well

For each city in column A, fetch temperature (°C), humidity (%), wind speed (km/h), and conditions from APIVerve and write them into columns B, C, D, and E respectively

Some city names are stored with country codes appended

Strip the country code suffix from city names in column A (format is "CityName_CC"), then fetch current weather for each cleaned name from APIVerve and write temperature, humidity, and conditions to columns B, C, and D

Full ops-readiness enrichment

Trim city names in column A, fetch current temperature (°C), humidity (%), wind speed (km/h), and conditions from APIVerve for each city, write to columns B–E, then flag any city with temperature below 0°C or wind speed above 60 km/h in column F as "Disruption Risk"

The flag logic runs as part of the same enrichment request — no second pass needed.

Try It

Get the 7-day free trial of SheetXAI and open your distribution city sheet, then ask SheetXAI to pull this week's weather for every location before your next ops review. You can also convert mixed-currency sales amounts to USD or see the full APIVerve integration overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more