Auto-dispatch service requests to the closest technician on Slack

By General Input

Every new intake form submission gets routed straight to the closest technician's Slack DM, with the address, phone, and a one-tap map link.

Integrations

  • Jotform
  • OpenStreetMap Nominatim
  • Slack

Type

Agentic Task

Categories

  • Operations

Build me a field service dispatch workflow that auto-assigns new service requests to the closest technician. It should run every 10 minutes on a cron.

On each run, use Jotform's Get Form Submissions to pull the latest entries from a Jotform intake form I'll choose. Filter to submissions created after the last run (track a watermark timestamp between runs so I don't process the same submission twice). The form captures customer name, phone, and a site address.

For each new submission, use OpenStreetMap Nominatim's Search (Forward Geocode) to convert the site address into latitude and longitude.

Then compare that point against a config block of technician home bases that I (the workflow owner) can edit. Each technician entry has: name, home base latitude, home base longitude, and Slack user ID. Pick the closest technician using great-circle distance (haversine formula, inline math is fine).

Once the closest tech is picked, use Slack's Open a Conversation with that technician's Slack user ID to get a DM channel, then use Slack's Send a Message to post the assignment. The message should include: customer name, customer phone, the formatted address returned by Nominatim, the distance in miles from the technician's home base (rounded to one decimal), and a one-tap Google Maps link built from the geocoded coordinates (https://www.google.com/maps/search/?api=1&query=LAT,LON).

Fallback rules: if the site address is blank on the submission, or Nominatim returns no result, or the closest technician is beyond a configurable max radius (default 30 miles), then instead of DMing a tech, use Slack's Send a Message to post to a fallback triage Slack channel (channel ID also configurable) with the raw submission fields so a human dispatcher can route it manually. Include the reason for the fallback (missing address / no geocode / out of radius).

Config values I want to be able to edit without touching workflow logic: the Jotform form ID, the technician list (name, home lat, home lon, Slack user ID for each), the max radius in miles, and the fallback triage channel ID. Respect Nominatim's fair-use rate limit (roughly 1 request per second) by pacing geocode calls if there are multiple new submissions in a single run.

Related prompts

Explore more prompts
Call overdue Xero customers with an AI collections agentWin back LiveChat visitors whose chats went unansweredChat quality review board for LiveChat support leadsWin back no-show and cancelled appointments every morningLive Loop returns analytics with product-level drill-downNewsletter pre-flight and approval board for Mailjet sendsTurn a prospect spreadsheet into personalized sequence enrollmentsMailjet email delivery lookup console for support teamsCatch feature flags that never got switched on in productionKajabi customer support console for member access fixes