IT CanvassTalk to an advisor
Administration · LessonBy , ServiceNow Trainer, 9 yrs · Published · ServiceNow · all levels

Inbound email actions

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

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();

Practice challenge

+0 XPStreak ×0
Question 1 of 2
What identifies the record a reply belongs to?

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.
Already working on ServiceNow and stuck on a live ticket?Get an expert ServiceNow developer on screen-share to finish your daily tasks with you. Deliver on time, protect your reputation and your job. Monthly support only, no task-wise plans.Task assigned · no idea where to startStill stuck · your job on the lineExpert joins your screenDelivered on timeExplore On Job Support