Email Triggers
Receive inbound emails and route them to agents for processing. Email triggers use Resend webhooks with Svix signature validation.
POST /api/triggers/inbound/email
Receive inbound emails via Resend webhook. Processes in background.
Email Config
{
"trigger_type": "email",
"trigger_config": {
"inbound_address": "inbound@example.com",
"allowed_senders": {
"mode": "domain",
"domains": ["company.com", "partner.com"]
},
"subject_filter": "Invoice|Fatura",
"query_template": "Email from {{from_name}}: {{subject}}\n\n{{body}}"
}
}
Config Fields
| Field | Type | Description |
|---|---|---|
inbound_address | string | Email address to receive messages |
allowed_senders.mode | string | domain or whitelist |
allowed_senders.domains | string[] | Allowed sender domains |
subject_filter | string | Regex to filter by subject |
query_template | string | Template for the agent query |
Template Placeholders
| Placeholder | Description |
|---|---|
{{from}} | Sender email address |
{{from_name}} | Sender display name |
{{subject}} | Email subject |
{{body}} | Email body text |
{{to}} | Recipient address |
Authentication
Email trigger execution is validated via Svix signature — no additional auth configuration needed. Unauthorized emails return sender_not_allowed (403).