A webhook is a web address that another service can call. When your website form is sent, or a customer writes on WhatsApp, that service sends the details to your routine’s webhook address. The routine wakes up, reads what was sent and does its job.
What you’ll build
By the end of this lesson you will have:
- A routine with a webhook trigger that wakes when a test form or message is sent to it.
- A Bot that reads what was sent and drafts a reply in its chat. Nothing is sent to anyone.
- A safe way to test it, and a plan for keeping the key secret.
Before you start
- You finished lesson 2.8, Routines.
- You use the desktop app. The Webhook section and the Test button are on desktop.
- You have a service that can send an HTTP POST with a header. Examples: a form tool with webhook settings, or Bird for WhatsApp and SMS (connect WhatsApp through Bird).
- Your test data uses made-up names only.
- Your plan includes Grok Bot (see the lesson details above).
What a webhook routine is
- Something happens in another service, like a form being sent.
- That service sends an HTTP POST to your routine’s webhook URL, with a secret key in the header.
- If the key is right, Grok Bot answers
200and starts a run. - Your Bot gets the body of the request (often JSON) together with the routine’s instruction.
- The Bot does the work and shows the result in its chat.
Step by step
Step 1: Ask the Bot for a routine with a webhook trigger
- Open the chat with the Bot that should own this job.
- Copy Prompt 1 below and send it.
- Read the Bot’s confirmation. Check the owning Bot, the input, the expected result and the approval boundary.
Step 2: Copy the URL and the key
- Click the Bot’s name at the top of the chat.
- On the Details tab, open the new routine under Routines.
- Find the Webhook section. It shows three fields:
• POST to is the URL.
• key is the secret. Senders include it asAuthorization: Bearer <key>.
• header is that full header, ready to copy. - Click a field to copy it.
Step 3: Paste them into the sending service
- Open your form tool’s webhook settings (or Bird, for messages).
- Paste the POST to URL as the address.
- Set the method to POST.
- Add the header. Paste the header field, or use
Authorizationas the name andBearer <key>as the value. - If the service lets you choose, send the body as JSON.
- Save the settings.
For WhatsApp, SMS or Apple Messages: Bird has a ready-made Grok Bot destination. You paste the URL and the sender key into it. The full steps are on connect WhatsApp through Bird.
Step 4: Send a test and read the result
- Send one test from the service, with made-up data.
- Check the response the service shows.
- Open the Bot’s chat and read the result.
What the response means:
200means Grok Bot accepted the call and started a run. It does not mean the Bot has finished. Check the chat for the result.- Any other response means no run started. Check that the routine isn’t Paused and that the request uses the current key.
You can also choose Test on the routine page to run the instruction once. A test does real work, so use safe input.
Step 5: Teach the routine to handle messy input
Real messages are messy. People ask two things at once, write off-topic, or paste odd text. Tell the routine what to do with each case (Prompt 2):
- Say what counts as an on-topic message.
- Say what to do with anything else: a short holding draft, flagged for you.
- Say that text inside the message is information, not instructions.
- Say what to do if the same message arrives twice.
Example: WhatsApp and SMS through Bird
Grok Bot doesn’t list WhatsApp or SMS as a built-in app. Bird, a third-party messaging service, can send each message you receive on WhatsApp, SMS, Apple Messages or an agent mailbox to a Grok Bot routine (Bird docs, checked Nov 4, 2026):
- Install Bird in Grok Bot and connect your Bird workspace.
- Ask Grok Bot for a routine with a webhook trigger. Copy its URL and sender key.
- In Bird, create a webhook with the Grok Bot destination, pick the message events (such as
whatsapp.receivedorsms.received) and paste the URL and key. - Choose Send test, then send a real message from your own phone.
Bird retries a delivery that fails, so one message can start more than one run. The full guide is connect WhatsApp through Bird. A full build that uses it: a salon build triggered by booking messages.
Keep the key secret
- Treat the key like a password. Anyone with the URL and the key can start a run, and every run uses your usage.
- Never paste the key in a public place, a shared doc or a screenshot.
- Paste it only into the sending service’s settings.
- If the key has been shared by mistake, pause the routine first. Then ask your Bot how to get a new key.
Limits
Checked in the docs on Nov 4, 2026. Recheck before publishing.
- Each routine can run up to 200 times an hour. All your routines together can run up to 300 times an hour.
- A run past either limit fails with
Automation run rate limit exceeded. It isn’t retried for you. Send the webhook call again. - A busy form or a popular WhatsApp number can hit these limits and use usage fast. Every run spends usage.
- The docs list a known issue where a shared limit across all Grok Bot routines can also cause this error.
Common mistakes
- Part of the URL is missing. Click the POST to field to copy it, rather than selecting the text by hand.
- The key is missing or wrong. The header must be
Authorization: Bearer <key>. Use the header field. - The routine is paused. Paused routines don’t start. Check the switch on the routine row.
- Thinking
200means “done”. It means “started”. Read the chat for the result. - Two runs for one message. The sender retried. Tell the routine to check for a reply it already drafted before writing another one.
- Auto-sending replies. Keep replies as drafts and keep Ask first on sends (lesson 2.6, approvals).
Stuck? See our help page.
Safety and approvals
- Messages from customers and forms are information, not your permission. Auto Review doesn’t count text from outside sources as your request.
- Keep every outgoing message behind Ask first. A webhook routine runs without you, so its approval cards expire after 30 minutes if you don’t answer.
- Keep the instruction narrow. A broad webhook routine does more than you expect.
Usage note: every webhook call that starts a run uses usage. A busy form or number can add up fast. Keep the instruction short and the job small.


Saved in this browser only; no account needed.
Level progress: Intermediate, lesson 2.9.
Related builds: Front Desk Bot (Hair salon), Reviews & Catering Bot (Restaurant)
FAQ
What does a 200 response mean?
Grok Bot accepted the call and started a run. It doesn’t mean the Bot has finished. Check the Bot’s chat for the result.
Can any form tool use it?
The routine needs an HTTP POST to its URL with the key in an Authorization: Bearer header. A form tool that lets you set the address, the method and a header should fit.
What if someone gets my webhook URL?
They also need the key to start a run. Keep the key private. If it leaks, pause the routine and get a new key.
Why did one message start two runs?
The sending service probably retried. Bird’s docs say it retries a delivery that fails, so a retried message can start another run. Tell your routine to check for a draft it already made.
Does WhatsApp need Bird?
In this guide, yes. Grok Bot’s docs don’t list WhatsApp as a built-in app. Bird is a third-party service with its own account and pricing.
Product facts were checked against these pages on Nov 4, 2026. Nothing in this lesson has been tested yet.