From sundial-org-awesome-openclaw-skills-4
Creates and manages programmatic email inboxes for AI agents: send/receive emails, handle workflows with webhooks and real-time events. Use for agent email identity, incoming processing, or replacing Gmail.
npx claudepluginhub joshuarweaver/cascade-ai-ml-agents-misc-2 --plugin sundial-org-awesome-openclaw-skills-4This skill uses the workspace's default tool permissions.
AgentMail is an API-first email platform designed specifically for AI agents. Unlike traditional email providers (Gmail, Outlook), AgentMail provides programmatic inboxes, usage-based pricing, high-volume sending, and real-time webhooks.
Guides Next.js Cache Components and Partial Prerendering (PPR) with cacheComponents enabled. Implements 'use cache', cacheLife(), cacheTag(), revalidateTag(), static/dynamic optimization, and cache debugging.
Guides building MCP servers enabling LLMs to interact with external services via tools. Covers best practices, TypeScript/Node (MCP SDK), Python (FastMCP).
Generates original PNG/PDF visual art via design philosophy manifestos for posters, graphics, and static designs on user request.
AgentMail is an API-first email platform designed specifically for AI agents. Unlike traditional email providers (Gmail, Outlook), AgentMail provides programmatic inboxes, usage-based pricing, high-volume sending, and real-time webhooks.
pip install agentmail python-dotenvAGENTMAIL_API_KEY=your_key_herefrom agentmail import AgentMail
client = AgentMail(api_key=os.getenv("AGENTMAIL_API_KEY"))
# Create inbox with custom username
inbox = client.inboxes.create(
username="spike-assistant", # Creates spike-assistant@agentmail.to
client_id="unique-identifier" # Ensures idempotency
)
print(f"Created: {inbox.inbox_id}")
client.inboxes.messages.send(
inbox_id="spike-assistant@agentmail.to",
to="adam@example.com",
subject="Task completed",
text="The PDF rotation is finished. See attachment.",
html="<p>The PDF rotation is finished. <strong>See attachment.</strong></p>",
attachments=[{
"filename": "rotated.pdf",
"content": base64.b64encode(file_data).decode()
}]
)
inboxes = client.inboxes.list(limit=10)
for inbox in inboxes.inboxes:
print(f"{inbox.inbox_id} - {inbox.display_name}")
Set up webhooks to respond to incoming emails immediately:
# Register webhook endpoint
webhook = client.webhooks.create(
url="https://your-domain.com/webhook",
client_id="email-processor"
)
See WEBHOOKS.md for complete webhook setup guide including ngrok for local development.
For branded email addresses (e.g., spike@yourdomain.com), upgrade to a paid plan and configure custom domains in the console.
⚠️ Risk: Incoming email webhooks expose a prompt injection vector. Anyone can email your agent inbox with instructions like:
Solution: Use a Clawdbot webhook transform to allowlist trusted senders.
~/.clawdbot/hooks/email-allowlist.ts:const ALLOWLIST = [
'adam@example.com', // Your personal email
'trusted-service@domain.com', // Any trusted services
];
export default function(payload: any) {
const from = payload.message?.from?.[0]?.email;
// Block if no sender or not in allowlist
if (!from || !ALLOWLIST.includes(from.toLowerCase())) {
console.log(`[email-filter] ❌ Blocked email from: ${from || 'unknown'}`);
return null; // Drop the webhook
}
console.log(`[email-filter] ✅ Allowed email from: ${from}`);
// Pass through to configured action
return {
action: 'wake',
text: `📬 Email from ${from}:\n\n${payload.message.subject}\n\n${payload.message.text}`,
deliver: true,
channel: 'slack', // or 'telegram', 'discord', etc.
to: 'channel:YOUR_CHANNEL_ID'
};
}
~/.clawdbot/clawdbot.json):{
"hooks": {
"transformsDir": "~/.clawdbot/hooks",
"mappings": [
{
"id": "agentmail",
"match": { "path": "/agentmail" },
"transform": { "module": "email-allowlist.ts" }
}
]
}
}
clawdbot gateway restartIf you want to review untrusted emails before acting:
{
"hooks": {
"mappings": [{
"id": "agentmail",
"sessionKey": "hook:email-review",
"deliver": false // Don't auto-deliver to main chat
}]
}
}
Then manually review via /sessions or a dedicated command.
scripts/send_email.py - Send emails with rich content and attachmentsscripts/check_inbox.py - Poll inbox for new messagesscripts/setup_webhook.py - Configure webhook endpoints for real-time processing