mail.route
mail.route automation events determine a destination group inbox given properties of an incoming message (e.g. sender, subject, recipients, headers, body).
Placeholders
The automation event dictionary starts with the following values:
Key | Type | Notes |
---|---|---|
email_sender_* |
record | The sender email record. Supports key expansion. |
email_subject |
text | The message subject. |
email_headers |
object | A set of header/value pairs. Keys are lowercase with dashes as underscores (e.g. content_type). |
email_body |
text | The email body as plaintext. |
email_body_html |
text | The email body as HTML (if provided). |
email_recipients |
array | An array of recipient email addresses in the To:/Cc:/Envelope-To:/Delivered-To: headers. |
parent_ticket_* |
record | The parent ticket record (if a reply). Supports key expansion. |
Outputs
Key | Type | Notes |
---|---|---|
group_id: |
number | The group ID to deliver the message to. Alternative to group_name . |
group_name: |
string | The group name to deliver the message to. Alternative to group_id . |
bucket_id: |
number | The optional bucket ID to deliver the message to. This can be provided instead of group_id . |
bucket_name: |
string | The optional bucket name to deliver the message to. A group_id or group_name must also be provided to disambiguate names like 'Inbox'. |
Examples
Route based on LLM classification:
-
start: function/classify: uri: cerb:automation:example.llm.classify inputs: text: {{email_body}} output: results return: group_name: {{results.group}} bucket_name: {{results.bucket}}
-
commands: function: deny/uri@bool: {{uri != 'cerb:automation:example.llm.classify'}} allow@bool: yes
-
automation/llm: uri: cerb:automation:example.llm.route disabled@bool: no
See Mail Routing for more information about routing and Routing KATA.