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

Export Active Traffic Incidents by Region From TomTom Into a Google Sheet

2026-05-15
5 min read

The Scenario

You're on the city transport operations team and every shift starts the same way: someone opens a Google Sheet of 10 district bounding boxes and manually queries TomTom's incident API for each one, copies the JSON, pastes the relevant fields into a growing log, and tries not to miss a row. The control room expects the incident list to be current. The current process means it's always 20 minutes stale by the time it's usable.

The bad version:

  • Query TomTom's incident endpoint for district 1, read the JSON response, extract incident type, severity, description, and coordinates for each incident, type them into the log sheet row by row
  • Move to district 2, repeat, losing your place twice because the JSON is long and the incidents are numbered inconsistently
  • Miss two incidents in district 4 because their coordinates were at the edge of the bounding box and the response paginated

The control room dashboard shows what you've typed. What you've typed is already 20 minutes old.

The Easy Way: One Prompt in SheetXAI

SheetXAI is an AI agent that lives inside your Google Sheet. It reads the bounding box definitions, calls TomTom's traffic incident endpoint for each district, and writes every incident's details into the results tab in one pass.

For each bounding box defined by the min/max lat/lng values in columns A through D of this sheet, fetch TomTom traffic incidents and write each incident's type, severity, description, and coordinates into new rows in a results tab

What You Get

  • One row per incident in the results tab
  • Columns for incident type (accident, roadwork, closure), severity level, plain-text description, and lat/lng coordinates
  • District identifier carried through from the source tab so you can filter by district
  • Empty results tab if TomTom returned no active incidents for a district — not an error, just a clean district

What If the Data Is Not Quite Ready

Bounding boxes are stored as a single polygon string, not four columns

For each row in this sheet, parse the bounding box string in column A into min-lat, max-lat, min-lng, max-lng, then fetch TomTom traffic incidents for that area and write each incident's type, severity, and coordinates into new rows in the "Incidents" tab

You only want incidents above a certain severity

For each bounding box in columns A through D, fetch TomTom traffic incidents and write only incidents where severity is "major" or "critical" into the results tab. Include type, severity, description, and coordinates.

You need the delay in seconds alongside incident details

Fetch all active traffic incidents within the bounding box in cells A1:D1 using TomTom and write each incident's category, start time, delay in seconds, and road name into this sheet

Full incident digest with summary by district

For each district bounding box in columns A through D, fetch TomTom incidents and write all incidents into the "Log" tab with district name, type, severity, description, and coordinates. Then write a summary table in the "Summary" tab showing each district name and its incident count, sorted by count descending.

One prompt pulls all incidents across all districts and builds both the log and the summary.

Try It

Get the 7-day free trial of SheetXAI and open the Google Sheet with your district bounding boxes, then ask it to pull live TomTom traffic incidents into the log tab. For road-level speed data rather than incidents, see the live traffic flow spoke.

Stop memorizing formulas.
Tell your spreadsheet what to do.

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

Learn more