---
sourceDocument: Xanadu ServiceNow AI Platform Administration
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/platform-administration

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu ServiceNow AI Platform Administration

ft:clusterId :

    - platadm

bundleId :

    - platadm

workflow :

    - Platform


---

# Create an inbound email action

# Create an inbound email action {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read

Create inbound email actions to define the actions that the system takes when an email is received.

## Before you begin

Role required: admin

## Procedure

1. Navigate to AllSystem PolicyEmailInbound Actions.
2. Select New.
3. Fill in the fields as described in the table.  
   Note:  
   You might need to configure the form to see all fields.
   {#t_CreatingAnInboundEmailAction__table_kyc_qhz_lp__entry__2}

   | Field | Description |
   |-|-|
   | When to run ||
   | Name | Enter a descriptive name for this email action. |
   | Target table | Select the table where the action adds or updates records. |
   | Action type | Select the type of action the instance takes. Select Record Action to modify a record in the instance, or select Reply Email to have the instance send an email back to the source of the inbound email. |
   | Active | Select the check box to activate the inbound email action. Clear the check box to disable the action. |
   | Stop processing | Select this check box to help prevent the system from running additional inbound email actions after this action runs. |
   | Redact sensitive data | Select this to mask sensitive data such as personal details, SSN, credit card details. Note: Available only when Sensitive Data Redaction for Inbound Emails plugin is activated. |
   | Type | Select the message type required to run the action. The action runs only if the inbound email is of the selected type. Available types are: * New: An email that is not recognized as a reply or forward. * Reply: An email with a watermark with an In-Reply-To email header, or whose subject line begins with a recognized reply prefix. * Forward: An email whose subject line begins with a recognized forward prefix, even if the email also contains a watermark or In-Reply-To header. {#t_CreatingAnInboundEmailAction__ul_kjw_xhz_lp} Note: By default, inbound emails of the Forward type always generate new incidents regardless of the presence of a watermark. If this behavior doesn't match your business logic, you can change the recognized reply and forward prefixes to treat forwards like replies. |
   | Required roles | Specify required roles that the sender must have to trigger the inbound action. |
   | Order | Enter a number that specifies when this inbound action runs relative to other inbound actions that use the same target table. The instance processes the action with the lowest order number first. |
   | From | Select the user required to run the action. If a user is selected, the action runs only when the email sender matches the user name. Leave this field empty to perform the action for all users. Note: If the selected user is later archived or deleted, the restriction is removed and anyone can trigger the inbound email action. |
   | Condition | Specify the condition that must evaluate to true to trigger the inbound action. Build a condition with the choice lists or enter a statement that determines when the inbound email action runs. For example: email.subject. startsWith ( "chg:" ) |
   | Actions ||
   | Field actions | This field appears if the Action type is Record Action. Specify how information in the email is inserted into the record. For example, select \[Created by\] \[From email\] \[Sender\], so that when the request is inserted, you can see who it is for. |
   | Reply email | This field appears if the Action type is Reply Email. compose the email message to send to the source that triggered the inbound email action. |
   | Script | Enter the script that the action runs. Typically, this script uses the validators script include and email variables. A template is provided: (function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger) { // Implement email action here })(current, event, email, logger); The following objects are available: * current: access the record referred to by the inbound email. For example, `current.assigned_to` accesses the person assigned to the task. * event: access one of the parameters of the originating event. For example, `event.parm1` accesses the first parameter of the event or `event.parm2` for the second parameter. See [Events](https://www.servicenow.com/docs/access?context=events&version=xanadu&pubname=xanadu-build-workflows&ft:locale=en-US) for more information. * email: access the inbound current email record. For example, `email.subject` accesses the content in the subject line of the email. See [Accessing email object variables](https://servicenow-prod.fluidtopics.net/IxQMabS1e7hm7kYsSK1b1A "An inbound email action script contains the email object to access various pieces of an inbound email through variables. You can use the global variable sys_email with inbound email actions.") for more information. * logger: add a message to the log file with the source set to `email.<Sys ID of incoming email>`. For example: `logger.log ("Some information")` {#t_CreatingAnInboundEmailAction__ul_lpg_xtx_5t} |
   | Description ||
   | Description | Enter a detailed explanation of what this inbound email action does. |
   | Other fields ||
   | Order | Enter a number to define the order in which this email action should be processed. Actions with lower numbers are processed first. The Ordered Email Processing plugin does not activate this field. |
   [Table 1. Inbound Email Actions form fields]

   {#t_CreatingAnInboundEmailAction__table_kyc_qhz_lp}

*[\>]: and then


