Guide · Verified October 31, 2026
Grok Bot target guide
Short answer: A Hooks destination POSTs one JSON task to your Grok Bot routine URL with a Bearer key; a 2xx means the task was queued. Configure the routine URL and key once, then map event fields into the task template.
Grok Bot routines accept webhook triggers: copy the routine URL and key from the desktop app, store the key as a project secret, and write the task template that turns each event into an instruction. The Target tab's Send test task button verifies the wiring without creating an event.
1. Get the routine URL and key
Open Grok Bot, create or open a routine, choose the webhook/HTTP trigger, and copy the routine URL plus the key shown next to it. The key is shown in the desktop app, not in chat. Treat it like a password from this moment on.
2. Store the key as a project secret
Settings → Security → Project secrets → add a secret such as GROKBOT_KEY. Configs may only reference it as {{secret.GROKBOT_KEY}}; literal keys are rejected, the authorization header is stored as [redacted], and test responses are scrubbed for secret values.
Destination config
{
"routineUrl": "https://grok.example.com/routines/abc123",
"key": "{{secret.GROKBOT_KEY}}",
"task": "{{event.subject.title}}\n\n{{event.subject.body | truncate:2000}}\n{{event.subject.url}}",
"repo": "acme/app",
"extra": { "source": "{{event.type}}" }
}3. Write the task template
The task field renders against the normalized event: title, body truncated to 2000 chars, and URL by default. repo and extra are optional rendered fields for extra top-level JSON. An empty rendered task fails the delivery immediately with EMPTY_TARGET_TASK, so keep a fallback for events with thin subjects.
Request Hooks sends
POST <routineUrl>
Authorization: Bearer <resolved key>
Content-Type: application/json
{"task": "Login fails on Safari", "repo": "acme/app"}4. Test, then watch retries
Use Send test task once the destination is saved: it sends a fixed sample through the same adapter and shows status plus the capped response. In production, 408/425/429/5xx retry with backoff honoring Retry-After; other 4xx (including 401) fail permanently. Redirects are never followed.
Frequently asked questions
Where do I find the routine URL?
In the Grok Bot desktop app: open the routine, choose the webhook/HTTP trigger, and copy the routine URL and key. They are not available from chat.
Can I paste the key directly into the destination?
No — literal keys are rejected. Store it as a project secret and reference {{secret.NAME}} so it never lands in config JSON, logs, or the console.
What does a 200 response mean?
The task was queued, not finished. Check the agent run in Grok Bot; Hooks records the delivery as succeeded once the routine accepts it.
Why did my delivery fail with EMPTY_TARGET_TASK?
The rendered task was empty — usually an event whose subject has no title or body. Add literal fallback text to the template or tighten filters to event types that carry subjects.
Reference
- For AI agentshttps://hooks.events/docs/agents.md
- Payload templateshttps://hooks.events/docs/templates.md
- Secrets & rotationhttps://hooks.events/docs/secrets.md
- Retries & idempotencyhttps://hooks.events/docs/retries.md