Skip to content
IT Canvass
Administration · Lesson

Inbound email actions

Quick answer

Turn incoming mail into records: action types, matching, watermark handling and safe scripting patterns.

Key takeaways

  • Order matters, the first matching action wins
  • Keep conditions tight so a Reply action never runs on a new message
  • Never trust the body, strip signatures before writing to comments
  • Test with a real mail client, previews do not reproduce header quirks

Three action types

New creates a record when the message has no watermark. Reply updates the record identified by the watermark or by the In-Reply-To header. Forward handles messages that were forwarded into the instance and is often used to create a record from a chain.

How a reply finds its record

ServiceNow adds a watermark to outbound notifications. When a user replies, that watermark tells the platform which record to update. If watermarking is disabled or the mail client strips the body, replies create duplicates instead of updating.

Writing the script

The action script has email, email_action and event available, plus current pointing at the target record.

// Reply action on incident
current.comments = 'Reply from ' + email.origemail + ':\n\n' + email.body_text;
if (current.state == 6 && email.body_text.length > 0) {
  current.state = 2; // reopen on customer reply
}
current.update();

Want to learn this properly?

Our live, instructor-led ServiceNow Training covers this hands-on, with real projects and a certification path.

Check your understanding

  1. What identifies the record a reply belongs to?

    • A. The subject line
    • B. The watermark or In-Reply-To header
    • C. The sender address
    • D. The mailbox folder
    Show answer

    B. The watermark or In-Reply-To header

    ServiceNow matches on the watermark first, then on standard mail threading headers.

  2. Which variable holds the parsed message in an inbound action?

    • A. current
    • B. email
    • C. g_form
    • D. gs
    Show answer

    B. email

    The email object exposes subject, body_text, headers and the sender.

Frequently asked questions

Why do replies create new incidents?

The watermark is missing or was stripped. Check that outbound notifications include it and that the mail client is not sending a clean body without the original message.

Can one action handle several tables?

No. An inbound action targets one table. Use separate actions and use conditions to keep them from overlapping.
CallWhatsAppEnquire