Email Integration with Resend
Send transactional emails directly from your LLM using Resend - a modern email API built for developers.
What It Does
The Resend integration allows your LLM to:
- Send transactional emails
- Support HTML content
- Use verified domains
- Track delivery status
Setup
1. Get Your Resend API Key
- Sign up at Resend.com
- Verify your sending domain (or use the test domain
[email protected])
- Create an API key in the dashboard
2. Import the Configuration
The Resend configuration is included in NUEVOS_HITOS.json:
{
"name": "Resend API",
"code": "resend",
"baseUrl": "https://api.resend.com",
"authenticationType": "BEARER_TOKEN",
"apiKeyLocation": "HEADER",
"apiKeyName": "Authorization",
"apiKeyValue": "<YOUR_API_KEY>",
"customHeaders": {
"Content-Type": "application/json",
"User-Agent": "HandsAI/1.0"
},
"tools": [
{
"name": "Enviar Email (Resend)",
"code": "resend-send-email",
"description": "Envía un correo electrónico usando la API de Resend.",
"endpointPath": "/emails",
"httpMethod": "POST",
"enabled": true,
"isExportable": true,
"parameters": [
{
"name": "from",
"type": "STRING",
"description": "Dirección de envío (ej. Acme <[email protected]>). Debe ser un dominio verificado.",
"required": true
},
{
"name": "to",
"type": "STRING",
"description": "Dirección del destinatario.",
"required": true
},
{
"name": "subject",
"type": "STRING",
"description": "Asunto del correo electrónico.",
"required": true
},
{
"name": "html",
"type": "STRING",
"description": "Cuerpo del correo en formato HTML.",
"required": true
}
]
}
]
}
Import via API:
curl -X POST http://localhost:8080/api/import/providers \
-H "Content-Type: application/json" \
-d @NUEVOS_HITOS.json
After importing, update the apiKeyValue with your actual Resend API key.
User request:
“Send a welcome email to [email protected]”
LLM tool call:
{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "Enviar Email (Resend)",
"arguments": {
"from": "Acme <[email protected]>",
"to": "[email protected]",
"subject": "Welcome to Acme!",
"html": "<h1>Welcome!</h1><p>Thanks for joining us.</p>"
}
},
"id": "msg_789"
}
HandsAI executes:
POST https://api.resend.com/emails
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json
{
"from": "Acme <[email protected]>",
"to": "[email protected]",
"subject": "Welcome to Acme!",
"html": "<h1>Welcome!</h1><p>Thanks for joining us.</p>"
}
Resend returns the email ID for tracking:
Real-World Example
From the HandsAI documentation:
Advanced Features
HTML Templates
You can use rich HTML content:
<html>
<head>
<style>
body { font-family: Arial, sans-serif; }
.header { background: #4F46E5; color: white; padding: 20px; }
.content { padding: 20px; }
</style>
</head>
<body>
<div class="header">
<h1>Welcome to Our Platform</h1>
</div>
<div class="content">
<p>We're excited to have you on board!</p>
</div>
</body>
</html>
Multiple Recipients
To send to multiple recipients, you can extend the parameter to accept comma-separated values or use ARRAY type.
Verified Domains
Add Your Domain
Go to the Resend dashboard and add your domain
Add DNS Records
Add the provided DNS records to your domain registrar
Verify
Wait for verification (usually a few minutes)
Use Cases
Welcome Emails
Onboarding new users automatically
Notifications
Send alerts and status updates
Receipts
Transaction confirmations
Reports
Automated report delivery
Next Steps
Search
AI-powered search with Tavily
GitHub
Automate GitHub workflows