Thank you for your feedback.
Form temporarily unavailable. Please try again or contact docfeedback@servicenow.com to submit your comments.
Versions
  • London
  • Kingston
  • Jakarta
  • Istanbul
  • Helsinki
  • Geneva
  • Store
Close

Setting field values from the email body

Log in to subscribe to topics and get notified when content changes.

Setting field values from the email body

Values in an inbound email can set field values in a task record.

Any name:value pair in an inbound email body gets parsed into a variable/value pair in the inbound email script. The name:value pair must be on its own line. Note that most email clients limit the number of characters allowed per line and may truncate excessively long name:value pairs.

To populate a reference field, use setDisplayValue() instead. See Redirecting Emails for an example of using setDisplayValue() in an inbound email action.

Note: The action always generates a lowercase variable name. Also, this functionality does not work on reference fields.
For example, if an email body contains this line:
Foo:bar
The inbound email script creates the variable email.body.foo with the value of bar. You can use these variables to create conditions such as:
if(email.body.foo!=undefined){
   current.[field]=email.body.foo;}
In this example, the script sets the value of [field] to the value bar.
Feedback