OBLYTECH Logo
OBLYTECH Logo

ServiceNow Inbound Email Actions: Setup, Types and Order

ServiceNow inbound email actions decide what the platform does when an incoming email matches a rule you define. Each action names a target table, can carry conditions about the sender or recipient, and is set to one of three types: New, Reply or Forward. Get those settings right and the action creates or updates the correct record. Get them wrong and you see duplicate records, or emails that do not turn into anything.

Setting the target table, active flag and conditions

The target table is the table the action writes to. An action aimed at the wrong table can still run and write to the wrong place, and a Reply action will not match a message whose record sits in another table, so it is the first thing to check. The active flag is the on-off switch, and an inactive action is ignored completely. A common first problem is an action built correctly that was never switched on. Give each action a name that says what it does, because a list of unnamed actions is hard to debug later.

Conditions decide whether an action runs for a given message. Sender and recipient are useful checks, since they let you separate mail from customers from mail generated by your own systems. Keep conditions as narrow as the job allows. A broad condition can catch automatic replies, bounce notices and out-of-office messages, and those can create records nobody asked for. For more on avoiding these problems, see our guide to common notification and email handling mistakes.

How a sender’s address is matched to a user record

The platform matches the sender’s address to a user in the User [sys_user] table, and only an active user counts. An inactive account with that address is skipped, so the sender is not matched to that person. Once a match is found, the action can reference that person as the current user.

Each user needs a unique address for this to work reliably. If several users share one, the platform looks for an active user first, so assign a shared address to only one active user.

Choosing between the New, Reply and Forward types

The type tells the platform how an incoming email relates to existing records. A New action treats the message as a fresh request and creates a record from it. A Reply action expects the message to continue an existing thread, so it should find the record that thread belongs to and add the message there. A Forward action handles a message someone has passed on, which means the original sender and content usually sit inside the body. How each type matches and extracts depends on your release and on any script attached, so run every type against a real email in your own instance before relying on it.

How the platform sorts a message before any action runs

Each incoming email is sorted into forward, reply or new before an action is considered. A forward needs a recognized forward prefix in the subject line and a recognized forward string in the body, such as From:. A reply is recognized from a reference to an existing record. Anything that fits neither is treated as new, and an action only runs on messages of its own type.

The reply check runs in a fixed order. A valid watermark that points to an existing record comes first, then a reply prefix with a valid record number, then the In-Reply-To header. The thread index is the last check and needs the system property glide.inbound.email.classify.by.thread_index set to true.

Prefix spelling is a common trap. The default reply prefixes are re:, aw:, r:, Accepted:, Tentative: and Declined:, and they are case sensitive, so RE: will not match a list holding only Re:. Forward prefixes default to fw: and fwd: and ignore case.

Ordering several actions and stopping processing

More than one action can match the same email, so order matters. When several actions write to the same target table, the order field sets the sequence, with lower numbers running first. Place narrow, specific actions near the top and any broad catch-all at the bottom. The stop processing option is there to help prevent later actions from also running on that email once the action has handled it. Use it on specific actions that fully handle a message. Setting it on a broad action placed early can keep the actions below it from running for any email that action matches, which is hard to spot without testing.

What happens to mail that no action handles

An email that matches no active action has its state set to Processed, and no action creates or updates a record from it. Overly strict conditions usually show up this way, as silence rather than an error, so check the email record’s state before assuming the platform failed.

Inbound email flows with an email trigger run before inbound actions, so a flow can handle a message before any action sees it. Plan both together.

Script or flow: picking the right approach

Some inbound work fits inside a script on the action, which gives fine control over parsing and branching. Simpler routing, such as sending a message to one table with a fixed set of values, is easier for a colleague to read as a flow where your release supports an email trigger. A sensible rule is to keep routing simple and reserve scripts for logic that needs it, such as pulling a reference number out of a subject line. Check which email-triggered options your release and license include before you commit a design to either route.

If you are still deciding how much of this work belongs in automation at all, the broader case is covered in our guide to how ServiceNow enhances enterprise workflow automation. For the wider set of notification and email topics, start at the ServiceNow notifications and email handling guides.

Testing inbound actions with sample emails

Test on a non-production instance or a dedicated test mailbox before you enable anything that touches live records. Work through these checks for each action:

  • Send a message that should match and confirm the target record is created or updated.
  • Send a message that should not match and confirm nothing is written.
  • Reply to a notification from an existing record and check the reply lands on that record.
  • Forward a message from a second address and check the sender and body are read correctly.
  • Send two messages that match the same rule and count the records created.
  • Turn on stop processing only after the earlier checks pass.

Use the email logs in your instance to see which messages arrived and which action handled each one. Testing against the same set of messages after every change is the habit that catches surprises early. For the planning side of a rollout, see our guide to navigating ServiceNow implementation pitfalls.

Inbound email action questions

How do I create an inbound email action?

Open the Inbound email actions list under Notifications and Inbound email in the Configure core features area of your instance, then create a new action. Give it a name, choose the target table, set the type, add any conditions and confirm the active flag is on. Save it, then send a test message that should match. Menu names differ between releases, so follow the layout you see in your own instance.

What do the New, Reply and Forward types do?

New creates a record from a message that starts something new, such as a request sent to a support address. Reply connects a message to a record that already exists, which is how a customer’s answer to a notification should end up on the correct ticket. Forward handles a message someone has passed on. By default, a Forward email creates a new incident even when it carries a watermark. Confirm each behavior with a real test, because details depend on your release and on any scripts you add.

How do I order several actions and stop processing?

Set the order field so narrow actions have lower numbers and the broad catch-all has the highest. Turn on stop processing only for actions that fully handle their messages. Then send one message that matches two rules and confirm that only the intended action runs. Re-check the order whenever you add a new action, because a new value in the wrong place can change which action handles a message.

Why does my inbound action create duplicate records?

The usual causes are two actions matching the same message and both creating records, a reply that cannot be matched back to its original record and so is treated as new, or one message being processed more than once. Check the email log for a single message, see which actions matched it, then tighten the conditions or the order so only one action creates the record. Duplicates in configuration data are a related problem, and our article on mastering the ServiceNow CMDB covers the data side of keeping records clean.