Use casesWorkflow
Email for OpenClaw AI Agents
Give OpenClaw its own email address. Connect with MCP, read a project request and send a threaded reply, then add incoming events when your agent is ready to work unattended.
An inbox for project requests and follow-ups
Give an OpenClaw research agent a project address. A collaborator emails a brief, the agent checks it for missing details and drafts a reply asking about the deadline. When the collaborator answers, the agent reads the earlier conversation and continues its work.
Robotomail stores the messages and threads. OpenClaw supplies the reasoning and your project instructions. The address can stay the same when you change the model or move the agent to a different host.
Connect OpenClaw with MCP
Use a current OpenClaw installation. Create a Robotomail account and verify your email, then run the following in the terminal where your agent runs. Sign in and approve access when the browser opens.
openclaw mcp set robotomail '{"url":"https://robotomail.com/mcp","transport":"streamable-http","auth":"oauth","oauth":{"scope":"mail:read mail:send offline_access","redirectUrl":"http://127.0.0.1:8989/oauth/callback","clientMetadataUrl":"https://robotomail.com/api/mcp/clients/openclaw"}}'
openclaw mcp login robotomail
If you already added Robotomail, use the login command instead of creating another connection. Use the same runtime profile for configuration and login.
Ask the agent to list your Robotomail mailboxes. A successful connection returns your mailbox address and ID. If the tools do not appear, reload the client's MCP connection or start a new session.
OpenClaw MCP reference · Robotomail's MCP guide
Test your first conversation
Start with your own email address so the complete test works on Free.
- Ask the agent to list your Robotomail mailboxes and select the address you want to use.
- From your verified account email, send that mailbox a message with the subject Project check-in and the question What do you need from me next?
- Give the agent the instruction below. Review its proposed reply, then tell it to send.
- Check your personal inbox. Reply to the agent's email with a new detail, then ask the agent to read the conversation again.
Find my latest received email with the subject Project check-in.
Show me the sender, subject and a short summary.
Draft a reply asking for the project deadline.
Wait for my approval before sending it as a reply to that message.
You have a working connection when the agent can read the incoming message, send the approved reply and read your follow-up. Sending tools act immediately when called; the request to wait is an instruction to your agent.
1 mailbox, 10 sends and 10 receives per month. Exchange mail only between your agent and your verified email address. Upgrade to email anyone. No credit card, no expiry. Allowances reset on the first of each month (UTC). Upgrade for higher limits or a custom domain.
Give the agent a repeatable job
Start with one instruction: read new requests in this mailbox, identify the goal and deadline, and draft a reply for approval when anything is missing. Give it access to the project information it should use. Have it load the earlier messages before it answers a follow-up.
Once that works, choose how the running agent checks for mail. A scheduled task can call the MCP tools, or your application can consume a webhook or SSE event and pass the incoming message to OpenClaw. MCP alone does not start a background worker or wake a stopped agent.
For an API workflow, create a mailbox-scoped key and keep it in the runtime's secret store. Use the API quickstart for mailbox and message operations. The receive-and-reply example below shows the correct retrieval and reply headers.
What does an OpenClaw inbox cost?
1 mailbox, 10 sends and 10 receives per month. Exchange mail only between your agent and your verified email address. Upgrade to email anyone. No credit card, no expiry. Allowances reset on the first of each month (UTC). Upgrade for higher limits or a custom domain.
For a single agent that needs to email other people, Solo is $5/month and includes 1 mailbox; 500 sends / month; 50 sends / day; 500 inbound / month; 1 custom domain; 1 GB storage. Compare all plans.
If the setup gets stuck
If the tools are missing, finish browser approval and reload the MCP connection or start a new session. If sending fails on Free, use your verified account email for the test. If a send times out, check sent messages before retrying.
The OpenClaw setup guide walks through signup and the first conversation. The MCP reference lists the connection settings and tool capabilities.
Connect the workflow to a real reply
The webhook's data.message_id is a database ID used to retrieve or deduplicate a message. Fetch it with the GET message endpoint, then use the response's message.messageId (the RFC Message-ID) as inReplyTo. Keep data.thread_id for your application's conversation state. Do not use a database ID or thread ID as a reply header. Stop and investigate if the fetched message has no Message-ID.
Examples use illustrative IDs. Replace them with IDs from your account; never construct an email Message-ID from a database ID. Exchange mail only between your agent and your verified email address. Upgrade to email anyone. See plans for higher limits.
Verify the webhook signature over the raw body, persist the event and deduplicate on the database message ID before acknowledging it. Run your application logic from a durable queue. The database, calendar, CRM and model functions shown above belong to your application.
This shell example fetches an incoming email and builds all required send fields. Set ROBOTOMAIL_API_KEY, ROBOTOMAIL_MAILBOX_ID and ROBOTOMAIL_MESSAGE_ID in your environment. Apply your recipient and approval rules before sending.
# Requires jq. Use mailbox_id and message_id from the verified webhook.
original=$(curl --fail --silent --show-error \
"https://api.robotomail.com/v1/mailboxes/$ROBOTOMAIL_MAILBOX_ID/messages/$ROBOTOMAIL_MESSAGE_ID" \
-H "Authorization: Bearer $ROBOTOMAIL_API_KEY") || exit 1
payload=$(printf '%s' "$original" | jq -e --arg body "Thanks, I received your message." '
.message | if (.messageId | type == "string" and length > 0) then
{to: [.fromAddress], subject: ("Re: " + .subject), bodyText: $body, inReplyTo: .messageId}
else error("Original email has no Message-ID") end
') || exit 1
curl --fail --silent --show-error \
"https://api.robotomail.com/v1/mailboxes/$ROBOTOMAIL_MAILBOX_ID/messages" \
-H "Authorization: Bearer $ROBOTOMAIL_API_KEY" \
-H "Content-Type: application/json" \
--data-binary "$payload"
Read receive and reply and webhook verification for the full setup.