Why should I give my agent an inbox?
Giving your agent an inbox enables it to:- Sign up for its own accounts to GitHub, hosting platforms, and more, so you don’t need to share your own credentials.
- Process attachments (like receipts, invoices, etc.) and act accordingly
- Receive newsletters, parse them, and send the most important information to you
- Send you daily reports and digests
- Send and receive emails
How to set up an inbox for OpenClaw
Step 1: Install the skill
We’ve prepared an Agent Skill to help your bot understand how to walk through the setup process. Ask your agent to install the skill:Step 2: Get an API key
Your agent will ask you to create an API key.Open the API Keys dialog
Navigate to the API Keys page in Resend and
click Create API Key.
Choose a name and permission scope
Choose a name for your API key and ensure Full access is selected as the
permission scope.
- SSH into your agent’s machine and store the API key in an
.envfile. - Store the API key in a password manager like 1Password, and give your agent access to its own vault. This can be done using a 1Password Service Account on team plans.
Step 3: Verify a domain
Next, your agent needs to know the email address it will use to send and receive emails. We strongly recommend using a subdomain (agent.example.com) instead of the root domain (example.com), especially if you want to receive emails.
You can also use the Resend CLI to verify a domain, although you will need to manually add the DNS records to your DNS provider.
Add a domain
Navigate to the Domains tab and click Add
Domain.
Select a subdomain and region
Add the subdomain you want to verify, and choose the region that’s closest
to your agent.You may see one of three options:
- Auto Configure: This will automatically configure the DNS records for you if your provider supports it.
- Go to (provider): This will take you to the provider’s website to add the DNS records manually if we can detect your provider.
- I’ve added the records: If we cannot detect your provider, you can manually add the DNS records by opening your DNS provider’s website.
Enable receiving
Receiving allows your agent to receive emails at your domain, rather
than simply sending. Scroll to the bottom of the page and toggle the switch
to On.
Add the DNS records to your domain
Add the DNS records to your domain’s DNS provider. For
more guidance, see our guides on adding DNS records to various
providers.
Step 4: Use webhooks to receive emails
At this point, your agent can send emails, but it can’t receive emails yet. To receive, you need to set up a webhook.Ask your agent to set up a webhook server
Your agent should be equipped to do this using the Resend skill. Prompt it to get started:
Set up a tunnel
Your agent should spin up a local server and suggest using a tunneling tool
to expose it to the internet. We recommend Tailscale
Funnel:This gives your agent a stable public URL at
https://hostname.tailnet-name.ts.net.Give your agent access to secrets securely
When your agent asks for webhook signing secrets, give it access securely using one of the methods described in Step 2: Get an API key. Don’t paste them directly into the chat.
For more help working with inbound emails, including how to see the full email
body, attachments, and more, see our guide on receiving emails with
Resend.
Step 5: Hook into OpenClaw’s APIs for instant notifications
One of the benefits of using Resend over other tools is that you don’t need to constantly ask your agent to check its inbox, or rely on cron jobs to check every so often. With Resend, you can use OpenClaw’s Gateway API to be notified instantly when your agent receives an email.Security considerations
Giving your agent an inbox is incredibly powerful, but it also comes with some security concerns. The risk of prompt injection via email is a real concern. The Resend Skill includes security guidelines. We’ve developed a leveled security approach to help you decide which security level is right for your use case.- Strict Allowlist: Only allow emails from specific senders. Recommended for most use cases.
- Domain Allowlist: Allow emails from any sender from a given domain (e.g. anyone from
example.com). - Content Filtering with Sanitization: Accept emails from anyone, but sanitize content to remove potential injection attempts.
- Sandboxed Processing: Process all emails but in a restricted context where the agent has limited capabilities.
- Human-in-the-Loop: Process all emails but require human approval for each email.