# Start a Grok Bot routine by webhook

> Researched. Small business · Intermediate · Operations. Updated 2026-11-06.

Canonical page: https://www.aisetupsthatwork.com/setups/start-a-grok-bot-routine-with-a-webhook/

## What it does
Start a Grok Bot routine the moment a form entry, store order or CRM event arrives, using the routine's webhook URL and key, with sends kept behind approval.

## Who it's for
Small-business owners whose form tool, store or CRM can send webhooks, and who want new leads or orders picked up right away instead of on the next scheduled run.

## Tools
- Grok Bot on desktop (the Webhook fields are on the desktop routine view) and, for Run history, the phone app
- A form tool, store or CRM with webhook settings that let you set the URL, the POST method and a custom header
- One sample entry, order or record to test with, with no real customer details

## Steps
1. Pick one event and one job, for example: a new quote form entry, logged and drafted as a reply. Then do the job once in a chat with the Bot, using a pasted sample entry, until the result is right. xAI's advice is to start with a one-time task, make it reliable, save it as a skill, and only then automate it.
2. Save the method as a skill. Run the first part of the prompt below. A useful skill says when to use it, what inputs it needs, the order of work, how to check the result, what to return, and what needs approval.
3. Ask the Bot to add a webhook trigger. Run the second part of the prompt below in the same chat. It asks for a routine that runs the skill on the JSON body the app sends, with a narrow rule for what to act on and what to do when fields are missing.
4. On desktop, click the Bot's name at the top of the chat, open the Details tab and open the new routine. Its Webhook section shows three fields: POST to (the URL), key (the secret), and header (Authorization: Bearer followed by the key, ready to copy). Click a field to copy it.
5. In the sending app, open its webhook settings (in a forms tool, a store or a CRM, it is usually under settings, integrations or notifications). Paste the POST to URL as the destination, choose POST, and add the header: the name Authorization with the value Bearer and the key, or the full header field if the app takes one line. Send a JSON body if the app offers it; the Bot receives the body with the routine instruction.
6. Send one test: submit a test form entry, place a test order, or create a test record with no real customer details. If the app shows the reply, a 200 means Grok Bot accepted the call and started a run, not that the Bot has finished. Any other reply means no run started: check that the routine is not paused and that the call uses the current key.
7. Check the result. Read the Bot's chat for the run's output. On the phone, open the Bot's profile, then Routines, tap the routine and read Run history: each recent run shows as Running, Succeeded or Failed, with the reason for a failed run. No runs yet means nothing has started it.
8. Keep the approval. In Settings, General, under Bot, keep Auto-review on and add an Ask first rule for each action that sends or spends, such as "Ask first before sending any external email." xAI says email from a routine waits as a draft until you press Send.

## Copy-paste prompt
Adapt bracketed fields to your situation.
```text
PART 1:
Save the process we just used as a skill called "[SKILL NAME, e.g. New quote request]". Include: when to use it; the inputs it needs (the fields a [form entry / store order / CRM record] sends, such as [FIELD NAMES]); the order of work; how to check the result; what to return in this chat; and the rule that anything that sends, posts, books or spends waits for my approval. Show me the skill before you save it.

PART 2:
Add a routine with a webhook trigger that runs the "[SKILL NAME]" skill on the JSON body each call sends. Only act when the body is a [new form entry / new order / new deal] with [REQUIRED FIELD]; otherwise, report what arrived and stop. If a required field is missing, say which one and do not guess. Post the result in this chat. Do not send, post, book or spend anything without my approval. Never repeat the webhook key in chat. Then tell me where to find the routine's Webhook section.
```

## Guardrails
- What it touches: Connected mail, calendar, sheets, or chat. Scoped to this job (Grok Bot on desktop (the Webhook fields are on the desktop routine view) and, for Run history, the phone app; A form tool, store or CRM with webhook settings that let you set the URL, the POST method and a custom header).
- Needs your OK: Send, pay, publish, and account changes stay with you. Treat agent output as drafts first.
- Safety level: Drafts for you
- The key is a password: Anyone with the URL and the key can start runs, and each run spends usage. Paste the key only into the sending app's webhook settings, never into a chat, an email, a shared doc or a page. xAI says not to send an API key in ordinary chat. How to replace a leaked key: Not stated in sources. If it leaks, pause the routine with the switch on its row, then ask the Bot how to change the trigger.
- Limits and usage: xAI says all of your routines together can run up to 300 times an hour, and each routine up to 200 times an hour. A run past either limit fails with Automation run rate limit exceeded and is not retried on its own, so send the call again. Only new events count: entries from before the trigger existed do not start a run.
- Approval stays on: A webhook only starts the routine. What the Bot may do next is set by the routine's instruction and your Auto-review rules. Keep sending, purchasing, deleting and publishing behind approval. xAI says an approval card raised by a routine expires after 30 minutes if nobody answers.
- The app replies with something other than 200. Check that the routine is not paused and that the header uses the current key.
- The app got a 200 but nothing shows up yet. A 200 means the run started, not that it finished; check the Bot's chat after a minute.
- Testing with an entry made before the trigger existed. Only new events start a run.
- A busy form or store hits the hourly limit. Narrow what the routine acts on, or move it to a schedule.

## Tips
- Keep the trigger narrow. One form or one order type per routine is easier to check than a routine that reacts to everything.
- Name the routine after the event, like New quote form, so its row in Details says what starts it.
- Use Test on the routine after each edit, with a safe sample, before you rely on real events.
- Write down which app holds the key, so you know where to change it later.

## Estimates (labeled, not measured)
- Time saved: Not stated in sources.
- Money saved: Not stated in sources.
- Tool cost: Grok Bot: every routine run spends usage, and a Test run spends usage too, because it does the work (xAI). Plan prices: Not stated in sources. Webhooks in your form, store or CRM: depends on that app and its plan; Not stated in sources.

## Sources
Summaries use the public sources below, not independent verification.
- xAI: https://docs.x.ai/grok-bot/skills-routines-and-automations (Skills and routines (read 2026-11-06): start with a one-time task, make it reliable, save it as a skill, then automate; what a useful skill states; routines can start from a webhook call; Webhooks section: ask the Bot to add a webhook trigger, open the routine on desktop, POST to is the URL, key is the secret sent as Authorization: Bearer <key>, header is the full header to copy; optional JSON body is passed with the routine instruction; 200 means a run started, not finished; any other reply means no run started; only new activity counts; Run history on the phone; Test spends usage; rate limits of 300 runs an hour for all routines and 200 an hour per routine; Automation run rate limit exceeded is not retried automatically; require approval for sending, purchasing, deleting or publishing.)
- xAI: https://docs.x.ai/grok-bot/approvals-security-and-privacy (Approvals, security, and privacy (read 2026-11-06): Auto-review and Ask first rules in Settings, General, under Bot; email from a routine waits as a draft until you press Send; approval cards raised by a routine expire after 30 minutes; do not send an API key in ordinary chat.)
- Cursor (Grok Bot help): https://cursor.com/help/grok-bot/routines (Routines help article (read 2026-11-06): the Webhook section shows the URL and key for a routine that a webhook call starts; for a webhook, the call must return 200 and use the current key; for a rate limit failure, send the webhook call again.)

## Get the free starter pack
Five beginner copy-paste AI setups, free by email: https://www.aisetupsthatwork.com/starter-pack/?utm_source=ai-agent&utm_medium=markdown&utm_campaign=setup-start-a-grok-bot-routine-with-a-webhook

Related:
- [Morning inbox briefing and multi-inbox triage](https://www.aisetupsthatwork.com/setups/inbox-morning-triage/index.md)
- [Connect your bot to a CRM the safe way](https://www.aisetupsthatwork.com/setups/connect-your-bot-to-a-crm-the-safe-way/index.md)
- [Turn a good bot run into a saved routine](https://www.aisetupsthatwork.com/setups/turn-a-good-bot-run-into-a-saved-routine/index.md)
