The Email adapter sends notifications as emails with both plain text and HTML content. It supports three providers: Resend, SendGrid, and SMTP.
Configuration
{
"type": "email",
"provider": "resend",
"apiKey": "${RESEND_API_KEY}",
"from": "polpo@yourdomain.com",
"to": ["ops@example.com", "team@example.com"]
}
{
"type": "email",
"provider": "sendgrid",
"apiKey": "${SENDGRID_API_KEY}",
"from": "polpo@yourdomain.com",
"to": ["ops@example.com"]
}
{
"type": "email",
"provider": "smtp",
"host": "smtp.example.com",
"port": 587,
"from": "polpo@example.com",
"to": ["ops@example.com"]
}
| Field | Type | Required | Description |
|---|
type | "email" | Yes | Channel type |
provider | "resend" | "sendgrid" | "smtp" | No | Email provider (default: resend) |
apiKey | string | Yes (Resend/SendGrid) | API key for the provider |
to | string[] | Yes | Recipient email addresses |
from | string | No | Sender address (default: polpo@notifications.local) |
host | string | Yes (SMTP) | SMTP server hostname |
port | number | Yes (SMTP) | SMTP server port |
apiKey supports ${ENV_VAR} syntax.
Every email is sent in dual format — both text/plain and text/html. The HTML version converts basic markdown formatting: **bold** becomes <strong>, _italic_ becomes <em>, and line breaks become <br>.
The email subject is the notification title. The body contains the full notification text.
Attachments
When includeOutcomes: true is set on a notification rule:
- Resend: binary attachments are base64-encoded and included in the API payload as
{ filename, content, content_type }
- SendGrid: binary attachments are base64-encoded as
{ content, type, filename, disposition: "attachment" }
- SMTP: binary attachments are not supported — text-only outcomes are appended to the email body
Text-only outcomes (logs, JSON) are always appended to the email body as labeled sections.
Connectivity Test
| Provider | Test Method |
|---|
| Resend | GET /domains — validates the API key |
| SendGrid | GET /scopes — validates the API key |
| SMTP | Checks that host and port are configured (no network call) |
Providers
Resend
Resend is the default provider. Simple API, generous free tier (100 emails/day), good deliverability.
- Create an account at resend.com
- Verify your domain or use the sandbox
- Create an API key
- Set
RESEND_API_KEY in your environment
SendGrid
SendGrid is a well-established email platform with a free tier (100 emails/day).
- Create an account at sendgrid.com
- Create a Sender Identity
- Create an API key with Mail Send permission
- Set
SENDGRID_API_KEY in your environment
SMTP
Direct SMTP delivery for self-hosted or enterprise mail servers. Requires host and port configuration.
SMTP support requires the nodemailer package. If not installed, the adapter will throw an error with setup instructions.