#### Reference

# Routine triggers

A trigger decides when a [routine](/grok-bot/skills-routines-and-automations)
runs: at a set time, or when something happens in an app you use. You
don't pick one from a list. Tell the Bot what should start the routine, and it
chooses the trigger; open the routine and check **When to run** (**Schedule**
on the phone) to see it in words. To set one up, see
[Trigger work from an event](/grok-bot/skills-routines-and-automations#trigger-work-from-an-event).

## Triggers

| Trigger | Starts a run when | You can narrow it by |
| --- | --- | --- |
| [Schedule](/grok-bot/skills-routines-and-automations#schedules-and-time-zones) | The time you set comes | None |
| [Slack](https://x.ai/bot/plugin/674) | The Bot is mentioned, a word or phrase is posted, someone (or only you) reacts with any emoji or ones you choose, or any message is posted | Channel, sender, text, and emoji |
| [GitHub](https://x.ai/bot/plugin/48677658) | A pull request is opened, updated, merged, or closed; a review is requested, approved, or asks for changes; a comment is posted; a review thread is resolved or reopened; an issue is assigned; or CI passes or fails | Repository, one pull request, or selected users. Updates and comments need one pull request or selected users, and CI needs one pull request or one branch |
| [Teams](https://x.ai/bot/plugin/63354504) | A message is posted | Team, channel, and text |
| [Linear](https://x.ai/bot/plugin/512) | An issue is created or changes status, or a cycle ends | Team, project, title, status, cycle, and assignee |
| [Sentry](https://x.ai/bot/plugin/579) | An issue is created, resolved, assigned, archived, unresolved, or changed | Project, title, and status |
| [PagerDuty](https://x.ai/bot/plugin/1089) | An incident is triggered, acknowledged, resolved, escalated, or changed | Service, title, and status |
| [Bot email](#your-bots-email-address) | Mail arrives from senders you allow | Sender, subject, replies, authentication, and attachments |
| [Gmail](https://x.ai/bot/plugin/45893410) | New mail reaches any Gmail account you connected | Sender, subject, and account |
| [Webhook](#webhooks) | Another service sends a request to the routine's URL | The request's body and headers |
| [Watch an app](#watch-an-app-or-web-page) | A check finds the change you asked about, such as a new item, a changed value, or a new status | The fields of each item |

To narrow a trigger, tell the Bot, such as “only Linear issues in the Payments
team” or “only email whose subject includes invoice.” Events that don't match
don't start a run. For a judgment a field can't capture, such as “a customer
complaint,” the Bot can describe which events count, and each event is checked
against that description first. Schedules and GitHub triggers can't be narrowed
this way.

## Before you add a trigger

* Slack, GitHub, Microsoft Teams, Linear, Sentry, and PagerDuty triggers use
  apps connected to your Cursor account, which are separate from the apps a Bot
  uses to read and post. When Slack or GitHub isn't connected, the Bot shows a
  card to connect it. Gmail triggers and watched apps use the Bot's apps.
* For Slack, invite the Cursor app to the channel, or the Bot itself if it has
  its own Slack app; without it, the trigger never runs. Slack triggers can't
  hear direct messages, so for those the Bot checks your Slack on an interval
  instead.
* Triggers start runs only for new activity, not for anything from before they
  existed.
* A routine runs whenever any of its triggers fires. A Gmail trigger, or one
  that watches an app, must be the routine's only trigger.
* Keep triggers narrow. One that fires on every message in a busy channel runs
  often and spends usage on messages that don't need the Bot.

## Your Bot's email address

A routine can run when mail reaches
[your Bot's address](/grok-bot/computer-and-apps#give-your-bots-an-email-address)
from senders you list, as addresses or whole domains such as `*@example.com`, or
from anyone. By default it skips senders that fail standard email
authentication; if you ask the Bot to include them, **When to run** adds
“including unauthenticated senders.” Use this for mail sent to the Bot on
purpose, and a Gmail trigger for mail that lands in your own inbox.

## Webhooks

Ask the Bot for a webhook trigger, then open the routine. Its **Webhook**
section has the URL (**POST to** on desktop, **URL** on the phone), the key, and
the full `Authorization: Bearer <key>` header, each one click or tap to copy.

Send an HTTP POST with that header and, optionally, a JSON body, which the Bot
receives with the routine's instruction. A `200` response means the routine
accepted the request: a run started, unless the routine narrows its webhook and
the request didn't match. It doesn't mean the run finished; check the Bot's chat
for the result. Any other response means no run started, so check that the
routine isn't paused, that the request uses the current key, and that the
routine is under its hourly limits.

## Watch an app or web page

For an app with no trigger of its own, the Bot can check it on an interval
instead, such as for “new rows in our pipeline tracker” or “a price change on
this page.” Before it saves the routine, the Bot runs one check to make sure it
works, and whatever is there then counts as already seen. It checks every 10
minutes unless you ask for another interval, so a run starts at the first check
after a change. It checks a web page no more often than every 15 minutes, and
you can watch up to 5 web pages across all your routines.

You can set this up only in your own chat with a personal Bot, and it reads only
apps you connected yourself, because each check reads them as you.

## Limits

| Limit | Value |
| --- | --- |
| Routines per Bot | 50 |
| Run records kept per routine | 20 |
| Time between scheduled runs | At least 5 minutes |
| Triggers per routine | 8 |
| Apps or web pages one routine watches | 3 |
| Runs per hour, all your routines together | 300 |
| Runs per hour, one routine | 200 |
| Senders on an email trigger | 50 |
| Users on a GitHub trigger | 50 |
| Emoji on a Slack reaction trigger | 8 |

A run past either hourly limit fails with `Automation run rate limit exceeded`
and isn't retried; rerun it yourself, or resend the webhook call. If a routine
keeps hitting the limit, ask the Bot to narrow its trigger. When Grok Bot as a
whole is busy, a scheduled run waits and tries again, so it can start a little
late.
