The Scenario
You are a property manager overseeing forty properties. A new vendor just onboarded who builds property reports for prospective buyers — they need a static satellite map image for each property to embed in the PDF. Your data is already in a Google Sheet: latitude in column B, longitude in column C. The vendor asked for image URLs, not uploaded files. They need them by noon.
You have never used the Mapbox Static Images API.
The bad version:
- Read the Mapbox Static Images API documentation, learn the URL construction syntax: base URL, style, coordinates, zoom, dimensions, all as path parameters.
- Build the URL string for one property manually, test it in a browser, verify the image appears correctly.
- Write a formula or script to construct the URL for all forty rows, handle coordinate decimal precision, and paste the results into column D.
- Discover that row twelve has swapped latitude and longitude — the map image shows the middle of the Atlantic Ocean.
The vendor's deadline is in three hours.
The Easy Way: One Prompt in SheetXAI
SheetXAI is an AI agent that lives inside your Google Sheet. It reads the coordinates from each row, constructs the Mapbox Static Images API URL with the right style and zoom level, and writes the URL directly into column D — without you touching the URL format or writing a formula.
For each row with latitude in column B and longitude in column C, generate a Mapbox static satellite map image at zoom 15 and write the image URL into column D.
What You Get
- Column D with a valid Mapbox Static Images URL for each property, using satellite style at zoom 15 and a standard 600x400 pixel size.
- Any row where the coordinates appear to be out of valid range gets "INVALID COORDS" in column D instead of a broken URL.
- URLs are ready to paste into the vendor's report template without any further formatting.
What If the Data Is Not Quite Ready
You need street map style instead of satellite for some properties
Urban properties look better on street map style; rural ones need satellite to show land features. Column E has "URBAN" or "RURAL" for each property.
For each row, generate a Mapbox static map image URL using satellite style if column E is RURAL or street style if column E is URBAN, both at zoom 15. Write the URL into column D.
Some rows have addresses instead of coordinates
About eight properties were added by address rather than geocoded coordinates. You cannot generate a static image URL from a raw address.
For any row where columns B and C are empty but column A has an address, geocode the address using Mapbox and fill in latitude and longitude in columns B and C. Then generate a Mapbox static satellite image URL at zoom 15 for all rows and write it into column D.
The vendor wants 400x300 images instead of the default 600x400
Their report template changed.
For each row with latitude in column B and longitude in column C, generate a 400x300 Mapbox static satellite map image URL at zoom 15 and write the URL into column D.
Full pipeline: validate coordinates, geocode missing ones, generate dual-style image URLs, and flag swapped coordinates
First, check all rows for obviously swapped coordinates — latitude values greater than 90 or less than -90 likely mean longitude and latitude are switched. Flag those rows in column F as COORDS SWAPPED. For rows with empty columns B and C, geocode from column A using Mapbox and fill in the coordinates. Then generate a Mapbox static satellite image URL at zoom 15 for each row and write it into column D. For any COORDS SWAPPED row, write SKIP in column D instead of a broken URL.
One prompt handles coordinate validation, fallback geocoding, URL generation, and skip-flagging.
Try It
Get the 7-day free trial of SheetXAI and open your property sheet — bring your lat/lon columns and ask SheetXAI to generate Mapbox static image URLs for each row. If you need isochrone catchment areas for those same properties, the isochrone article covers that. The Mapbox hub has the full list of geographic tasks SheetXAI can handle.
