
Give Grok Bot its own inbox.
A real address on your domain. New mail starts a Grok Bot routine with the email in the call, and the Bot answers from its own cloud computer.
Connect Grok Bot in three steps.
xAI's always-on teammates, each with its own cloud computer, apps and routines.
Paste one sentence
Send this to your agent. It asks Drin for an address and shows you a link.
PasteConnect Drin to your email: call POST https://api.drin.run/v1/connect, then show me the link.
Approve the code
Open the link, check the code matches, and choose which inbox it gets. No keys to paste.
Wake a routine
Ask your Bot to add a webhook trigger to a routine, then open the routine on desktop and copy the POST URL and key from its Webhook section. In Drin, open the inbox, go to Wake the agent → Grok Bot routine, and paste both.
These steps follow xAI's own docs for Grok Bot (docs.x.ai). If Grok Bot changes how it works, tell us and we'll fix this page.
Mail starts a routine.
A routine with a webhook trigger starts a run the moment mail arrives. The call carries the sender, subject, thread id and clean text, so the run can read it without another call.
curl -X POST https://api.drin.run/v1/wake-targets \
-H "Authorization: Bearer $DRIN_KEY" \
-H 'content-type: application/json' \
-d '{ "kind": "grok_routine",
"url": "<the routine webhook URL>", "token": "<its key>" }'
# From an agent's key: 202. Nothing fires until a person approves.curl -X POST https://api.drin.run/v1/wake-targets/$ID/test \
-H "Authorization: Bearer $DRIN_KEY"
# → { "ok": true, "httpStatus": 200, "latencyMs": 142 }
# the sample is a message.received marked "test": true
# 409 approval_required while a person hasn't approved the targetWhat Grok Bot can and can't do.
What it can do
- Answer support@ overnight. Make the inbox an open desk, and the routine replies to verified senders in the thread and marks it read.
- Draft, don't send. Approve it with Drafts only. It writes each reply as a draft, and you send it from Drin.
- Keep the thread. Replies go out from the inbox's own address with the right threading headers and a Re: subject.
What it can't do
- It can't be woken in an open chat. Mail starts a routine that has a webhook trigger, so you need one.
- You can't finish this on a phone. The routine's POST URL and key are copied from desktop.
- It can't see inboxes you didn't pick. To its key, they answer 404 on reads and 403 on writes.
- It can't mail a new address by itself. The first mail waits for a person, unless it's a reply to a verified sender in the same thread on an open desk.
Before you connect it.
What if the routine URL or key changes?
PATCH /v1/wake-targets/:id. From a key, a new URL needs its token again and waits for a person's approval. A target that was switched off after failed deliveries switches back on.Can I test it before real mail arrives?
POST /v1/wake-targets/:id/test) sends a sample now and shows the HTTP status and how long the routine took to answer. A target waiting for a person can't be tested until they approve it.How do I stop Grok Bot?
POST /v1/agents/:id/pause). Every key it holds answers 403 agent_paused until you resume it. Revoke is for good.