- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 06:21 AM
we have a requirement is that when a user sends an email to the servicenow with subject contains incident
then there should be created an incident with the short description
copied from the subject and description copied from the body ? How to achieve this using script?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 06:32 AM - edited 05-11-2023 06:33 AM
Hi @Nayan Dhamane ,
Create an inbound action similar to below image
Add below code in Actions tab of inbound action
current.comments = "received from: " + email.origemail + "\n\n" + email.body_text;
current.short_description = email.subject;
current.short_description = email.body;
if (current.canCreate())
current.insert();
Mark this answer as helpful and correct if this helps resolves the issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 06:23 AM
Hello @hema sundar ,
Please use the below article as reference for step by step creation of incident using Inbound:
Incident creation via E-mail (Inbound Action)
Best Regards,
Nayan Dhamane
ServiceNow Community Rising Star 2023.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 09:56 PM
Hello @hema sundar ,
I am glad that my answer was helpful.Please mark it as solution accepted as it will close the thread.
Best Regards,
Nayan Dhamane
ServiceNow Community Rising Star 2023.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-11-2023 06:32 AM - edited 05-11-2023 06:33 AM
Hi @Nayan Dhamane ,
Create an inbound action similar to below image
Add below code in Actions tab of inbound action
current.comments = "received from: " + email.origemail + "\n\n" + email.body_text;
current.short_description = email.subject;
current.short_description = email.body;
if (current.canCreate())
current.insert();
Mark this answer as helpful and correct if this helps resolves the issue