Recipe: Send email from Grok Bot

Have Grok Bot send transactional email via Notify — store NOTIFY_API_KEY as a secret and POST /api/email/send.

Use Grok Bot when an always-on agent should compose and send transactional email from your verified domain — digests you approve, ops alerts, onboarding notes. Still not newsletters.

This is different from claiming a mail.grokbot.com inbox. That address is Grok Bot’s own mailbox (receive / draft / approve-to-send). Notify is your product send pipe: custom from, logs, and webhooks.

No marketplace Notify plugin required. Grok Bot’s cloud computer can call HTTPS.

Prerequisites

  • API key (prefer a domain-locked sending_access key)
  • Verified domain for production custom from
  • A Grok Bot that can run shell / HTTP from its computer

Store the API key as a secret

Never paste the key into chat, Shell demos, or ordinary files.

  1. Ask the Bot for a secret, or open the Bot’s Secrets and choose Add secret.
  2. Name it exactly NOTIFY_API_KEY.
  3. Paste the key into the secure field and Save securely.

The Bot sees the name, not the value. Use $NOTIFY_API_KEY in commands.

Prompt the Bot to send

Paste something like:

Send a transactional email with Notify.

POST https://notify.cx/api/email/send
Header x-api-key: $NOTIFY_API_KEY (from my secret — do not print the value)
Content-Type: application/json

Body JSON:
{
  "to": "user@example.com",
  "from": "noreply@your-verified-domain.com",
  "subject": "Your weekly digest",
  "html": "<p>Here is this week’s summary.</p>"
}

Use curl (or fetch). Show me the HTTP status and response body. Do not echo the API key.

Equivalent curl the Bot should run:

curl -sS -X POST https://notify.cx/api/email/send \
  -H "Content-Type: application/json" \
  -H "x-api-key: $NOTIFY_API_KEY" \
  -d '{
    "to": "user@example.com",
    "from": "noreply@your-verified-domain.com",
    "subject": "Your weekly digest",
    "html": "<p>Here is this week’s summary.</p>"
  }'

html is preferred; message and text also work.

Approvals and routines

Keep send behind your normal Bot approval habits. Asking in chat or putting “always send” in a routine does not bypass Grok Bot’s own email-draft rules for mail.grokbot.com — and for Notify you should still review what leaves your domain.

For scheduled routines, have the routine call the same Notify POST (with $NOTIFY_API_KEY), not the built-in agent inbox tools, when you need a custom verified from.

Sandbox vs production

Until the domain is verified, production custom from stays locked. Use sandbox vs production (dashboard guided test or POST /api/email/send/test). Live inbox sends need a verified domain, then /api/email/send.

After you send

Check Email Logs or the logs API. Delivery events can go to a webhook on Pro+.

Where to next?