Slack alerts for every new Shopify order with map and drive time

By General Input

Every 30 minutes, send your fulfillment team a Slack message for each new order with the customer's address, drive distance from your warehouse, and a route map.

Integrations

  • Shopify
  • Mapbox
  • Slack Bot

Type

Agentic Task

Categories

  • Operations
  • Sales

Build an agent workflow on a cron schedule that runs every 30 minutes and sends my fulfillment team a Slack brief for each new Shopify order, including a route map from our warehouse to the customer.

On each run:

1) Pull recently created Shopify orders with the List Orders action, filtered to status=open and created since the previous successful run. Persist the latest processed order timestamp between runs so we don't re-process the same orders.

2) For each order, skip it if any fulfillment on the order already has a tracking number set. We only want to notify on orders the team has not started handling yet.

3) For each remaining order, read the shipping address and forward-geocode it with the Mapbox Forward Geocode (v6) action. If geocoding fails or returns no high-confidence match, still post the order to Slack with a note that the address could not be mapped, and skip the directions and map steps for that order.

4) Call the Mapbox Get Directions action with the driving-traffic profile, using the configured warehouse coordinates as the origin and the geocoded customer coordinates as the destination. Extract total driving distance and duration in traffic (ETA).

5) Render a Mapbox Get Static Map Image of the route. The agent should pick a zoom level that fits both the warehouse and the customer comfortably in the frame, place markers at both endpoints, and overlay the route geometry on top. The output is a PNG.

6) Post one fulfillment brief to Slack using the slackbot Send a Message action. The message should include: a one-line natural-language summary the agent writes (e.g. "Order #1234 going to Sarah in Austin, TX — about 245 miles, 4h 10m by truck"), the order number, customer name, full shipping address, drive distance (formatted in the configured unit), ETA in hours and minutes, and the static route map embedded inline as an image.

Inputs the workflow should ask for up front:

- Shopify store connection (read_orders scope is enough).

- Mapbox access token (a public pk. token is fine; needs geocoding, directions, and static images scopes, all on the default public scope set).

- Slack Bot connection and the channel ID to post fulfillment briefs to.

- Warehouse origin: either a street address (which we forward-geocode once at setup) or explicit latitude/longitude.

- Distance unit preference: miles or kilometers.

- Optional cap on max orders processed per run to keep Slack from getting flooded during big sale bursts.

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 accountGive your team Looker numbers without buying more seatsPause marketing emails to escalated customers, then restore them