Email Routing Rules

Email Routing Rules are the heart of Postmaster. They define the destination record and content to be created from an inbound email. Rules can be created on any table in your ServiceNow instance, including global, custom, and scoped tables.

Email Routing Rule

The Email Routing Rule form is organized into sections to simplify configuration:

  • Destination table: Table where the resulting record will be created

  • Order: Order in which rules are processed. Execution will stop after first match.

  • Error event: If an error occurs during email receipt & processing, an event can be generated to trigger a notification or other activity in ServiceNow so that administrators are made aware of the issue. Event parameters:

    • record/current: Email GlideRecord

    • parm1: Postmaster rule name

    • parm2: Error generated

  • Email condition: Email conditions under which to trigger this rule

In email conditions, the Recipient, Subject, and Body fields of the email will always be compared using all lowercase. All other fields are case-sensitive.

Email Content

  • Email subject to: Field on the destination table where the email subject should be placed

  • Email body to: Field on the destination table where the email body should be placed

AI Content

  • Summarize email body: Enable summarization of incoming email

  • Summary to: Field on the destination table where the email summary should be placed

  • Summary prompt: Instructions to send to AI for email summarization

  • Draft email reply: Enable drafting of an email reply to the incoming message

  • Draft to: Field on the destination table where the draft reply should be placed

  • Draft persona: Persona that should be emulated when drafting the email reply

  • Draft prompt: Instructions to send to AI for email reply drafting

AI generated content is also available in the Record Script for more advanced manipulation or placement of content.

Enriched Content

  • Template to apply: Optional record template to apply to the created record

  • Auto-map fields from email: When enabled, Postmaster will attempt to map fields in the body of the email to fields on the created record

Field auto-mapping requires formatting of field_name:Field Value in the body of the email, where field_name is the internal value of the field name and Field Value is the display value for the field value. For catalog variables, the field name should be prefixed with 'variables.' One field_name:Field Value pair can exist per line in the email.

When necessary, Postmaster will attempt a rigorous search of both internal and display values for both field names and field values, as well as searching for catalog variables without the appropriate prefix.

Examples include:

  • assignment_group:Database San Diego

  • variables.disk_capacity:64GB

  • Apply record script: When enabled, you may use server-script to manipulate the target record, adding or updating field values as-needed.

AI content is available in the record script:

  • aiSummary: AI summary of the email body

  • aiReply: AI draft of an email reply

  • Apply cart/item script: (Catalog only) When enabled, you may use the CartJS API to manipulate the catalog cart prior to order submission

Last updated