Routines and Triggers: Work While You're Away
A routine is one Bot's workflow that runs on its own, either on a schedule or after something happens. It runs in the cloud, so your laptop can be closed. Routines are what turn a Bot from a smart chat into a teammate that does work while you sleep.
This lesson covers schedules, triggers, the limits xAI sets, and how to keep routines from eating your weekly usage. All details are from xAI's Grok Bot docs as of November 2026.
What You'll Learn
- How to set up a routine on a schedule
- The events that can start a routine, from Slack to email
- How webhooks work, in plain words
- The limits on routines, and the usage warning in the docs
- How the shared cloud computer lets several Bots work together
Schedules in Plain Language
You set a schedule the same way you would tell a person. No special codes needed:
- "Every weekday at 8:00 AM"
- "Every Sunday at 6 PM"
- "On the 1st of every month at 9 AM"
- "Every 30 minutes"
The Bot uses the time zone you share across your Bots, so set that first.
Two things surprise new users:
- A new routine waits for its first time. If you create a "weekdays at 8:00 AM" routine at noon, nothing happens until 8:00 AM the next weekday.
- The Test button runs it now. Use it right after you create a routine, so you can check the result without waiting.
Also know that timing is not exact. In the Builder.io review, scheduled jobs ran 12 to 80 minutes late. Do not use a routine for anything that must happen at a precise minute.
Triggers: Start When Something Happens
A schedule runs at set times. A trigger starts a routine when an event happens. As of November 2026, Grok Bot supports these triggers:
| Trigger | What starts it | Example use |
|---|---|---|
| Slack | A mention, a phrase, a reaction, or any message, in one channel or all | Answer questions in a study group channel |
| GitHub | Repository events, like a new pull request | Review new pull requests |
| Linear | Issue tracker events | Sort new tickets |
| Sentry | App error events | Look into a new error |
| PagerDuty | Incident events | Gather facts when an alert fires |
| An email sent to the Bot's own email address | Forward a receipt, get it logged | |
| Webhook | Another app sends a message to a special web address | Connect a tool Grok Bot has no trigger for |
The Bot's Own Email Address
Each Bot has its own email address. This is one of the most useful triggers for beginners. You can forward something to your Bot, and the routine starts. For example:
- Forward every internship reply to your "Internship Tracker" Bot, and it updates your table.
- Forward receipts to a "Budget" Bot, and it adds them to a sheet.
Webhooks in Plain Words
A webhook is a way for one app to tap another on the shoulder. You give an app a special web address and a secret key. When something happens, that app sends a message (an HTTP POST, with the key as a "Bearer" key) to the address, and your routine starts.
One detail matters: when the webhook gets a "200" reply, that only means the routine started. It does not mean it finished. If you need to know the result, have the Bot report back.
Most students will not need webhooks at first. They are there when a tool you use has no built-in trigger.
Choosing the Right Trigger
A quick guide:
- The work should happen at a set time? Use a schedule.
- The work starts when someone asks? Use a Slack mention or phrase.
- The work starts when a message arrives? Forward it to the Bot's email address.
- The work starts in a tool with no trigger? Use a webhook.
Pick the narrowest trigger that does the job. "Any message in all channels" is almost never the right choice.
The Limits
xAI sets clear limits on routines:
| Limit | Value |
|---|---|
| Routines per Bot | 50 |
| Shortest gap between scheduled runs | 5 minutes |
| Runs per hour, across all your routines | 300 |
| Runs per hour, for one routine | 200 |
| Run history kept | Last 20 runs |
Because only the last 20 runs are kept, a routine that runs every 15 minutes only shows you about the last five hours. If you need a record, ask the Bot to write a short log to a doc.
Watch Your Usage
This is the most important part of the lesson. Every run uses your weekly usage pool, the same pool you share with Grok and Cursor. That is true even when the Bot finds nothing to do.
xAI's docs warn that an hourly schedule or a busy Slack channel "can use a week's usage in a day". The Builder.io review saw this in practice: 16 Bots spent about $100 in a weekend, mostly deciding they had nothing to report.
When the limit was hit, all their routines stopped. And spending caps do not stop a run in the middle of a task, so a long run can go past your cap before it ends.
Simple habits keep costs down:
- Start slow. Run a new routine once a day. Make it faster only if you need to.
- Use triggers instead of frequent checks. "When an email arrives" costs less than "check every 5 minutes".
- Narrow your Slack triggers. Pick one channel and a mention or phrase, not every message.
- Pause what you do not use. If you stop reading a report, turn the routine off.
- Check usage weekly in your first month.
The Shared Cloud Computer
All your Bots share one persistent cloud computer. It keeps your files, a command line and your browser logins between runs. Each Bot gets its own screen on that computer, and you can watch it work live.
This is what lets Bots work as a team:
- Your primary Bot coordinates the others and hands off work.
- Bots can message each other and work together in group chats.
- A file one Bot saves can be read by another.
For example, a "Bug Finder" Bot can reproduce a problem, file a ticket and hand it to a "Debugger" Bot. Or a "Research" Bot can collect notes that a "Writer" Bot turns into a draft.
Connections
Bots can use Gmail, Google Drive, plugins, custom MCP servers (a standard way to connect AI to other tools), Cursor Cloud Agents for coding, and 1Password. And because each Bot has a real browser, it can also use websites that have no API at all. Some sites block cloud computers, though, so test first.
Sharing one computer is convenient. It also has a safety cost, which is the topic of the next lesson.
Key Takeaways
- A routine is one Bot's workflow on a schedule or after an event. It runs in the cloud with your laptop closed.
- Schedules use plain language. A new routine waits for its first time, so use the Test button to run it now.
- Triggers include Slack, GitHub, Linear, Sentry, PagerDuty, emails to the Bot's own address, and webhooks.
- Limits: 50 routines per Bot, at least 5 minutes between scheduled runs, 300 runs an hour in total, and only the last 20 runs kept.
- Every run uses your weekly pool. Start slow, prefer triggers over frequent checks, and narrow Slack triggers.
- All your Bots share one cloud computer, so they can hand work to each other and you can watch them live.
Quiz
Up next · Lesson 4 of 5
Approvals and Safety: What Your Bots May Do Alone
6 min read
3 of 5 lessons done

Ask Byte about this lesson
A private chat about this lesson. Byte has read the whole lesson, answers in seconds, and shows the section each answer comes from. Ask follow-ups in any language.
Questions & Answers
Public questions about this lesson. The AI Tutor answers right away in your language, the FreeAcademy team checks answers, and every learner can read them.

