Skip to content

Webhook Format: Custom

When format is set to custom, you define your own JSON template with placeholders. echoValue fills the values from the incoming email and sends the result to your webhook URL.

Terminal window
curl 'https://api.echovalue.dev/webhook' \
-H 'x-token: mytoken' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://yourdomain.com/webhook",
"format": "custom",
"template": {
"subject": "{{subject}}",
"from": "{{from.name}} <{{from.email}}>",
"body": "{{text|html}}",
"attachments": "{{attachments[0].filename}}"
}
}'

Placeholders use {{dot.notation}} syntax and are resolved against the webhook payload.

{{subject}}
{{from.name}}
{{from.email}}
{{attachments[0].filename}}
{{attachments[0].filename}}
{{attachments[-1].filename}}
{{text|html}}
{{from.name|from.email}}
{{from.name|"unknown"}}
{{text|"No body"}}
{
"template": {
"text": "*{{subject}}*\nFrom: {{from.name}} <{{from.email}}>\n\n{{text|html}}"
}
}
ConstraintValue
Max template size2048 bytes
Max nesting depth5 levels