Inbound email action from a specific domain rather than user

Nabilah
Tera Contributor

 

I need some guidance on creating an inbound email action with the following criteria:

  • When an email is received from the domain: @Example.com

  • With an email subject starting with: SN-APP-INC

It should create an Incident with these values:

  • Assignment Group: Business Information

  • Requester: 1st line of the email body

  • Channel: Self-Service

  • Service: BI

  • Incident status: Assigned

  • Priority: P5 - 5 working days

  • System: 3rd line of the email body

  • Resolution Service: BI

  • Short Description: [the email subject]

  • Description: [the email body]

The emails will be generated by an application in the following format (examples below). These are forwarded to ServiceNow, and the inbound action should raise the incident accordingly.

Example 1

From: John Doe
Sent: 09 May 2025 12:43
To: John Doe <John.Doe@example.com>
Subject: SN-APP-INC: EMP-MSC-PBI-001 – Employee Account Changes - John.Doe@example.com

 

JDoe1
EMP-MSC-PBI-001 – Employee Account Changes
Power BI Non Live
BI-CUS-TMP - Temporary Report Store - PUBLISHED
Power BI

 

Example 2

 

From: John Doe
Sent: 09 May 2025 13:41
To: John Doe <John.Doe@example.com>
Subject: SN-APP-INC: Target Test H2PWYNI - John.Doe@example.com

 

JDoe1
Target Test H2PWYNI
Microsoft Power BI
BI-CUS-TMP - Temporary Report Store - PUBLISHED
Power BI

 

 

How would i go about doing this??

11 REPLIES 11

Your script logic is fine, but two small issues are preventing values from populating:

  1. Caller (Requestor): Use current.setValue('caller_id', u.sys_id); instead of current.caller_id = u.sys_id;.

  2. System: You’re assigning to category; it should be current.setValue('u_system', systemValue);.

That should resolve it.

SunilKumar_P
Giga Sage

Hi @Nabilah Can you try the conditions Headers contains @Example.com AND Subject starts with SN-APP-INC