Plan your daily field visits in the best driving order

By General Input

Every weekday at 7am, Geni reads your calendar, finds the fastest order to hit every stop, and sends a Slack DM with drive times and a route map.

Integrations

  • Google Calendar
  • Mapbox
  • Slack Bot

Type

Agentic Task

Categories

  • Personal Productivity
  • Operations

Every weekday at 7am in my local time zone, build me an optimized field-visit plan for the day and DM it to me on Slack.

Trigger: cron, Monday through Friday at 7:00am local time.

Steps:

1. Use Google Calendar List Events to pull today's events from my primary calendar (timeMin = start of today local, timeMax = end of today local, singleEvents = true, orderBy = startTime).

2. Keep only events whose location field looks like a real physical street address. Drop anything with an empty location, a video-meeting URL (Zoom, Google Meet, Microsoft Teams, Webex), a phone-only dial-in, or text that is clearly virtual. Also drop all-day events.

3. For each remaining event, call Mapbox Forward Geocode (v6) on the location string to get longitude/latitude coordinates. If geocoding fails or returns low confidence, skip that event and note it in the final message.

4. Call Mapbox Get Optimization (V1) with the driving (or driving-traffic) profile, starting from my fixed starting address (ask me for this once during setup: home or office) and including all the geocoded stops. Optimization is capped at 12 waypoints total. If I have more than 11 in-person events (12 minus the starting point), drop the lowest-priority ones (treat events marked optional, tentative, or declined as lowest priority) and surface in the Slack message which events were left off and why.

5. Call Mapbox Get Directions with the driving-traffic profile on the ordered waypoints from the optimization result to get total drive time and per-leg ETAs. Use this for the times shown in the message rather than the optimization estimate, because directions reflects live traffic.

6. Render a Mapbox Get Static Map Image with the route overlaid (encoded polyline from the directions response) and numbered markers for each stop in optimized order. PNG, reasonable size for Slack (e.g. 800x500).

7. Send one direct message to me on Slack using Slack Bot Send a Message. The DM should include: the events in optimized order with start time and address, suggested departure time (first event start minus drive time from start), per-leg drive time, total time on the road for the day, and the static map image embedded.

8. For every consecutive pair of stops, compare the calendar gap (next event start minus current event end) against the drive time between them. If the drive is longer than the gap, flag that pair in the message as a tight transfer so I can reshuffle, push a meeting, or call ahead before the day starts.

If there are no in-person events today after filtering, send a short DM confirming there are no field visits scheduled rather than going silent.

Related prompts

Explore more prompts
A brand asset library your marketing team actually searchesTurn Mailjet email clicks into ranked HubSpot follow-upsClean out the Looker dashboards and Looks nobody opensLiveKit live operations console for room moderationWake up dormant Keap leads with a researched reasonLiveChat coverage board for planning next week's shiftsPhone routing control panel for LiveKit voice agentsLinkedIn Ads budget pacing dashboard for every client accountFront desk appointment confirmation board for the next 3 daysGive your team Looker numbers without buying more seats