A traffic incidents feed for business: closures as rows a team acts on
Turn road closures and roadworks into a tidy table: one row per incident, matched to your nearest site, new ones only, owned by someone who can act.
Part of the guide Location intelligence automation
A traffic incidents feed for business is most useful as a table, not a map someone glances at: one row for each closure, roadworks site or other incident, with its kind, street, district and position, the name of your nearest site and how far away it is, and a column for who deals with it. New rows arrive on a timetable, rows already seen are left out, and the people who own each site read only their own part. That turns a stream of road news into a short list of jobs.
This is for operations, facilities and service managers whose work depends on getting to places: depots, stores, plants, clinics, construction sites, customer addresses. It explains what each incident carries, how to shape the rows, an invented example from Kuala Lumpur, what goes wrong, and the blocks that keep the table filled. It belongs to the broader guide on location intelligence automation.
What one incident row holds
The Traffic incidents block reads closures, roadworks and other incidents from online maps, live, at the moment it runs. It is a different block from Traffic Flow, which measures speeds. Each incident comes back as an item with:
- name and category: Road closure, Roadworks or Incident, with the street when known.
- street and district: worked out from its position, for the first 40 incidents a run.
- city: the city or area it was found in.
- lat and lng: its position, to about 150 metres, with accuracy_m.
- incident_id: its own ID, the same for as long as it lasts, which is what lets a flow tell new from old.
- image: the small icon the map shows, kept for emails and maps, left out of downloads.
Accidents are reported as road closures for now, so a column called accident will stay empty. Plan your categories around the three kinds the data really has.
Shape the rows around what your team does
A raw list of every incident in a city is long and mostly irrelevant. Four columns make it a work list:
- Nearest site. The Find nearest block adds, to each incident, the closest of your own points from a table or CSV you upload, with the distance in km.
- Relevance. A Filter keeps incidents within, say, 3 km of a site. The rest are someone else's problem.
- Freshness. The Only new block lets through only incidents this flow has not seen before, by their incident_id.
- Owner. Your sites table carries the manager's name or team, so it travels with the nearest-site columns onto each row.
With those, the morning sheet reads like a dispatcher's notepad: "Roadworks on Jalan Tun Razak, 1.2 km from the Ampang warehouse, owner: north team."
An invented example: a facilities firm in Kuala Lumpur
The numbers are made up to show the flow. A facilities company maintains lifts and air conditioning in 60 buildings across Kuala Lumpur and Petaling Jaya. Technicians lose time when an access road is shut.
| Step | What happens | Rows |
|---|---|---|
| Search | Incidents across both cities at 06:45 | 48 |
| Find nearest | Each matched to the closest building | 48 |
| Filter | Kept if within 2 km of a building | 11 |
| Only new | Already seen yesterday removed | 4 |
| Google Sheets | One new row each, owner filled in | 4 |
A made-up morning: 48 incidents become four rows someone needs to read.
The supervisor scans four rows, moves two jobs to the afternoon and tells one technician to use the service entrance. Yesterday's long-running roadworks do not reappear, because their incident_id has been seen.
What goes wrong with incident feeds
- Searching too wide. A big drawn area is searched in up to 8 parts of about 24 km, centre first, and the step says when an area was only partly covered. Several smaller areas, or searching around each site, cover better than one vast polygon.
- Never retiring rows. A closure that has ended stays in the sheet until someone marks it. Add a done column and a weekly tidy.
- Reading positions as exact. About 150 metres is enough to know which road is affected, not which side of a junction.
- Treating it as a speed reading. Incidents say what is shut or being dug up. How slow the traffic is around a site is a job for Traffic Flow.
- Sending everything to everyone. A row is only acted on when one named person owns it.
Keep the table filled with an AI employee
An AI employee in xMap Flows can run the whole routine and leave you the short list. In order:
- Schedule: every hour from 06:00 to 18:00, or once at 06:45 if mornings are what matter.
- Area of interest: the cities you work in, or areas you draw.
- Traffic incidents: searching the Area of interest.
- Find nearest: your sites, with the owner column.
- Filter: nearest site within 2 or 3 km.
- Only new: by incident.
- Google Sheets, adding a row each, and the Email block to the owners when something lands.
Ready-made versions to start from: Road closures near my depots, every hour, Weekly road disruption report for a Sunday summary, and New roadworks and the residents affected for public bodies. Teams in construction and facilities and logistics use the same pattern.
Questions
What kinds of incidents are in the data?
Road closures, roadworks and other incidents, each with its position, street and district. Accidents currently come back as road closures.
Can I get only incidents near my own locations?
Yes. Match each incident to your nearest site with Find nearest and filter by distance, or set Traffic incidents to check around each of your places.
How do I stop the same roadworks appearing every day?
Put Only new after the incidents block. Each incident keeps its ID while it lasts, so it is passed on once.
Can the rows go into a spreadsheet?
Yes. Google Sheets can add one row per incident on every run, and the same rows can be emailed or posted to Slack.