Skip to main content

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

FieldTypeDescription
inbound_addressstringEmail address to receive messages
allowed_senders.modestringdomain or whitelist
allowed_senders.domainsstring[]Allowed sender domains
subject_filterstringRegex to filter by subject
query_templatestringTemplate for the agent query

Template Placeholders

PlaceholderDescription
{{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).