- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-31-2022 11:54 PM
can anyone please help me on how to create an automatic incident in snow incident table, when an email received into a random shared mail box.(example: mailbox_shared@gmail.com).
please help me on how to define this in inboundemail action/template
Solved! Go to Solution.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2022 12:02 AM
Hi Pravallika,
There is an OOB Email Inbound Action, 'Create Incident', which will do this work. But there are a couple of things that you would need to do:
1. Create a new user or edit an existing user with email address same as the one, from which you are going to send the email. So, you should have a user with same email address as of yours to send the email to ServiceNow.
2. The ServiceNow email address to which email needs to be sent can be found in the 'User name' field on Email Accounts. To locate that, navigate to System Mailboxes -> Administration -> Email Accounts -> ServiceNow SMTP record. Open it and locate the User name field.
3. Navigate to System Mailboxes -> Email properties. Under the Inbound Email Configuration heading, enable Email receiving by selecting the checkbox and then saving it.
4. Now, send an email from the configured email address (your email address) to the ServiceNow email address and refresh the Incident list. You may check the Email Logs (System Logs -> Emails) and locate the email that you sent and the new corresponding incident that opened up in response to that email.
Also,
This section provides a very simple example of how to create a domain-specific inbound email action.
-
Make sure Domain Separation is active in your instance and the global domain is selected on the domain picker.
-
Navigate to System Policy > Email > Inbound Actions and click New.
-
Provide the following values:
- Name: Create Incident – Oceanic
- Target Table: Incident [incident]
- Active: Check
- Script:
(function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) { if(gs.getUser().getDomainID() != 'c9434fce4a3623120181f955f4a3d6e9'){ current.caller_id = gs.getUserID(); current.comments = "received from: " + email.origemail + "\n\n" + email.body_text; current.short_description = "For Oceanic Domain : " + email.subject; current.category = "inquiry"; current.incident_state = IncidentState.NEW; current.notify = 2; current.contact_type = "email"; if (email.body.assign != undefined) current.assigned_to = email.body.assign; if (email.importance != undefined) { if (email.importance.toLowerCase() == "high") current.priority = 1; } if (email.body.priority != undefined) current.priority = email.body.priority; current.insert(); } })(current, event, email, logger, classifier);
-
Deactivate the Create Incident Inbound Action.
-
Go to https://<instance>.service-now.com/nav_to.do?uri=sysevent_in_email_action.do?sys_id=3ccfeff5c611227a0180144333c87af9.
-
Uncheck Active.
-
Save the record.
-
-
Navigate to User Administration > Users, then select the demo user Abel Tuter.
-
Change Email to an email ID that you can also use, and change its domain to Oceanic Airlines.
-
Send an email message to your ServiceNow instance's email ID from the email ID value you set.
These steps create an Incident on the Oceanic Airlines domain. To check whether this inbound action works only on the Oceanic Airlines domain, send an email message from any other email ID that is associated with a user who does not belong to the Oceanic Airlines domain.
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2022 12:02 AM
Hi Pravallika,
There is an OOB Email Inbound Action, 'Create Incident', which will do this work. But there are a couple of things that you would need to do:
1. Create a new user or edit an existing user with email address same as the one, from which you are going to send the email. So, you should have a user with same email address as of yours to send the email to ServiceNow.
2. The ServiceNow email address to which email needs to be sent can be found in the 'User name' field on Email Accounts. To locate that, navigate to System Mailboxes -> Administration -> Email Accounts -> ServiceNow SMTP record. Open it and locate the User name field.
3. Navigate to System Mailboxes -> Email properties. Under the Inbound Email Configuration heading, enable Email receiving by selecting the checkbox and then saving it.
4. Now, send an email from the configured email address (your email address) to the ServiceNow email address and refresh the Incident list. You may check the Email Logs (System Logs -> Emails) and locate the email that you sent and the new corresponding incident that opened up in response to that email.
Also,
This section provides a very simple example of how to create a domain-specific inbound email action.
-
Make sure Domain Separation is active in your instance and the global domain is selected on the domain picker.
-
Navigate to System Policy > Email > Inbound Actions and click New.
-
Provide the following values:
- Name: Create Incident – Oceanic
- Target Table: Incident [incident]
- Active: Check
- Script:
(function runAction(/*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) { if(gs.getUser().getDomainID() != 'c9434fce4a3623120181f955f4a3d6e9'){ current.caller_id = gs.getUserID(); current.comments = "received from: " + email.origemail + "\n\n" + email.body_text; current.short_description = "For Oceanic Domain : " + email.subject; current.category = "inquiry"; current.incident_state = IncidentState.NEW; current.notify = 2; current.contact_type = "email"; if (email.body.assign != undefined) current.assigned_to = email.body.assign; if (email.importance != undefined) { if (email.importance.toLowerCase() == "high") current.priority = 1; } if (email.body.priority != undefined) current.priority = email.body.priority; current.insert(); } })(current, event, email, logger, classifier);
-
Deactivate the Create Incident Inbound Action.
-
Go to https://<instance>.service-now.com/nav_to.do?uri=sysevent_in_email_action.do?sys_id=3ccfeff5c611227a0180144333c87af9.
-
Uncheck Active.
-
Save the record.
-
-
Navigate to User Administration > Users, then select the demo user Abel Tuter.
-
Change Email to an email ID that you can also use, and change its domain to Oceanic Airlines.
-
Send an email message to your ServiceNow instance's email ID from the email ID value you set.
These steps create an Incident on the Oceanic Airlines domain. To check whether this inbound action works only on the Oceanic Airlines domain, send an email message from any other email ID that is associated with a user who does not belong to the Oceanic Airlines domain.
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-01-2022 06:28 AM
Hi Pravallika,
Glad to see my answer helped You.
Kindly mark the applicable answer as Correct & Helpful both such that others can get help.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2022 07:05 AM
Is there a way to create an incident when an outside email address receives an email? My client wants their support group email address to create incidents whenever they receive an email.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-12-2023 12:32 AM
I have similar requirements, can you please let me know if got any solution.