Skip to main content

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

  1. Sign up at Resend.com
  2. Verify your sending domain (or use the test domain [email protected])
  3. 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.

Example Tool Call

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>"
}

Real Response Format

Resend returns the email ID for tracking:
{
  "id": "re_123456789",
  "from": "Acme <[email protected]>",
  "to": "[email protected]",
  "created_at": "2026-03-03T15:30:00.000Z"
}

Real-World Example

From the HandsAI documentation: HandsAI dispatching email successfully with Resend in real-time

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

1

Add Your Domain

Go to the Resend dashboard and add your domain
2

Add DNS Records

Add the provided DNS records to your domain registrar
3

Verify

Wait for verification (usually a few minutes)
4

Use Your Domain

Use [email protected] as the from address

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

Build docs developers (and LLMs) love