Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Daily schedule bot

Post each crew's route for the day to Slack every morning with a short script and a read-only token.

After this guide, a message like this lands in your team's Slack channel every morning before the crews roll out:

Schedule for Friday, October 16 (14 visits)

North crew (8)
 1. Robin Alvarez, 412 Elm St, Bozeman, MT 59715 (Weekly mowing)
 2. Okafor Dental, 1180 N 19th Ave, Bozeman, MT 59718 (Weekly mowing)
 ...
South crew (5)
 ...
Unassigned (1)
 - Jamie Chen, 88 Willow Way, Bozeman, MT 59718 (Aeration)

It takes about 15 minutes: a read-only token, a Slack incoming webhook, and one script you run on a schedule. No AI is involved; the script calls the Shortcut MCP server's get_schedule tool directly over HTTPS, because that tool returns the day already grouped by crew in route order, with crew and customer names, in one call.

1. Create a read-only token

In Settings → API & integrations, select Create token:

  • Name: Schedule bot.

  • Scopes: Custom with Read visits, Read crews, and Read customers. Read crews adds crew names and Read customers adds customer names (the company name for businesses); the schedule itself needs only Read visits.

  • Expiry: 1 year.

2. Create a Slack incoming webhook

In Slack, create an app with Incoming Webhooks turned on for the channel the crews read, and copy the webhook URL. Slack's guide: Sending messages using incoming webhooks. Any chat tool that accepts a JSON POST works the same way.

3. Try the call

With no arguments, get_schedule returns today in your workspace's timezone. The answer's result.structuredContent holds the schedule (the same JSON is in result.content[0].text as a string, left out here):

Visits come in schedule order: by date, then crew (unassigned last, with teamId: null), then route position. A page holds at most 50 visits; on a bigger day meta.hasMore is true and you pass meta.nextCursor back as the cursor argument. totalVisits on each crew tells you when a crew's list continues on the next page.

4. The script

Run it once by hand and check the channel:

The heading uses today from the answer, the date in your workspace's timezone, so the bot is right wherever it runs.

5. Run it every morning

Any scheduler works. With cron on a server whose clock is on your business's time, every day at 6:00 AM:

On GitHub Actions, a scheduled workflow runs it with the token and webhook URL stored as repository secrets (cron there is in UTC: 6:00 AM in Denver is 0 12 * * * in summer and 0 13 * * * in winter).

Variations

  • One crew per channel. Pass { teamId: "…" } as the get_schedule arguments to get one crew's visits, and post each crew to its own channel.

  • Tomorrow, the evening before. Pass { from: "2026-10-17" }; compute tomorrow from today in the first answer.

  • The whole week. Pass from and to up to 31 days apart; the answer groups by date first.

  • Straight from the REST API. GET /v1/visits?from=2026-10-16&to=2026-10-16 returns the day's visits, including pending ones that are not on the schedule yet, newest first, each with effectiveTeamId and routePosition. Filter by status, sort by crew and route position, and take crew names from GET /v1/teams to build the same list.

Last updated