- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
02-12-2024 08:46 PM - edited 05-24-2024 04:55 AM
The inbound email flow in ServiceNow streamlines the process of capturing, processing, and managing incoming emails within the platform, helping organizations to efficiently handle various tasks and requests.
Out of the box (OOB), ServiceNow's inbound email flow typically doesn't include the capability to directly read the email body for parsing or processing. Instead, the system primarily focuses on extracting key metadata such as the sender, subject, and attachments.
Yes, using a flow action like the one created by Ben Scherer from ServiceNow Share can indeed enable parsing of email bodies within ServiceNow. By leveraging this flow action, ServiceNow users can extract specific information from the email body and trigger subsequent actions or workflows based on that extracted data.
The flow action provided in the ServiceNow Share link allows users to incorporate custom parsing logic into their ServiceNow instance, enhancing the capabilities of the platform's inbound email processing. This can be particularly useful for organizations looking to automate the handling of incoming emails and extract relevant data to streamline their workflows.
By utilizing community-contributed solutions like the one provided by Ben Scherer, ServiceNow users can extend the functionality of their instances and tailor them to their unique business requirements without having to develop everything from scratch. This fosters collaboration and innovation within the ServiceNow community while empowering users to achieve their goals more efficiently.
Sharing one example how to use it.
Step 1 : Go to the provided link: Parse Email Flow Action on ServiceNow Share.
Step 2: Download the xml and commit the update set.
Step 3 : Once done you will be able to see the action in your instance :
Step 4: Add the action.
Step 5: Drag and drop email record from the data Inbound email.
Step 6 : To populate a text field, you can directly utilize the extracted value from the parsed email body by assigning it to the field's value attribute. However, when aiming to populate a reference field, you'll need to introduce a variable to store the value extracted from the email body. Subsequently, conduct a lookup operation in the respective table to find the corresponding record based on this variable.
Now, once you add the email variable, click on the function to add the key you want to extract from the email. In my case, I want to read the email as follows:
CI: [Server Name]
Alert Created Time: [Date and Time]
Alert description: [Description]
Be careful as it is case-sensitive. Next, you can do the lookup in the CMDB CI table with the name and then use the same while creating the incident.
Top of Form
Bottom of Form
Special thanks to @Ben Scherer for sharing the wealth.
Created a video for same. https://www.youtube.com/watch?v=wYnwEfcUNnU
- 8,841 Views
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Very useful article. Had a disappoint that inbound email flows does not suits for email body parsing. Now we can do that. No look back to inbound email actions 😝
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Great article for improving efficiency of Inbound email parsing with low code, very helpful @Pratiksha 👍
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Very helpful article
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks for sharing this @Pratiksha . It helps in my current project.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Pratiksha : Very helpful article. Thanks for sharing. Looking forward to use in upcoming client requirement.
Regards,
Priyanka Salunke
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Pratiksha : Thanks for sharing this article. I would like to use this in my client requirement. However I am trying in PDI, not working as expected for reference fields. Not sure, why. I am trying to fetch Opened by from email and in the key attribute passing opened_by. Could you please help me if it's wrong? Appreciated your help.
Regards,
Priyanka Salunke
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Priyanka_786 Please share the screenshot for step 6. Did you introduced a new variable? Are you getting the data in the variable? When you are doing lookup are you . walking to the email address correctly?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Sure @Pratiksha , Thanks for your response. Please find the details as follows.
Yes. I have introduced new variable "Requested by" . I am not getting data in the variable. Doing lookup for sys_user table with name. Please find attached screenshots for your reference. I am trying to get Opened by value from email body text.
1. Screenshot of email body.
2.
3. I am not sure why Key value is not getting saved.
4.
After testing showing error in lookup step. As not getting required user record because in previous step flow variable not getting opened by from email body text.
Hope it helps. Let me know if anything is not clear.
Regards,
Priyanka Salunke
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
If this is done on PDI then please share me user id and password in messages. I will check it tomorrow morning.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Pratiksha ,
Yes . I am trying on PDI.
Flow Name- test flow
PDI URL- https://dev79132.service-now.com/
Password- 8KvGQ^Nn/3im
Thank you.
Regards,
Priyanka Salunke

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Priyanka_786 - Hi Priyanka, were you able to resolve the issue to populate the reference field through Email variable (Name/Value), I am also facing the same issue.
Any help would be appreciated.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Sulabh Garg , No, this issue is yet not solved unfortunately. I have followed required steps but some how it is not working for reference fields. I am not sure why. Actually I am also looking for help here. If it works then it will be game changer.
Regards,
Priyanka
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @Priyanka_786 ,
The email should be in the key value format for example
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Pratiksha : Thanks for your response
I am trying to fetch value in same format email
Opened By: System Administrator
Quick question: here how should pass Opened By in Key?
Regards,
Priyanka Salunke
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @Priyanka_786, @Pratiksha I am facing issue to populate the reference field and Date/Time field through Email variable (Name/Value).
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Priyanka_786 @Sulabh Garg Please check this out. Like and Subscribe https://youtu.be/wYnwEfcUNnU
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Community Alums I just tried it works fine.
Created a field on incident form date/time.
variable name is date
The email body is : caller:abel.tuter@example.com
please mark appropriate response as correct & helpful so that the question will appear as resolved for others who may have a similar question in the future.
Regards,
Pratiksha
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
How could I change the application of the imported xml file(Parse Email Flow Action), from global application to a custom application?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Erlan its a flow action. You can download and create it in the custom scope.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Pratiksha I see, but how I could change the application of this custom action? Because I tried to do it manually in the xml file, changing the application tags, but it did not work. Is it possible to do it in the instance? if Yes. how could I could I do it?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Pratiksha I have ran into the issue on my PDI that the action is not returning any email variables I'm getting the following message in the logs *** Script: Cannot read property "1" from null am i missing some configuration on the action?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@aac31246 I have not seen that error before. I have attached a video to the article. Please go through it.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Pratiksha
It's not working for me as well, and my use case is the same: extracting the 'Requested by' email from the body text in the format below:
Requested by: Leigha Moyer (Leigha.Mottr@outlook.com).
What key value I should define in Set floe variable for this ? requested_by or anything
As of now I am not getting any return value
Could you please help me on this ?
@Priyanka_786 @Sulabh Garg you got any solution on this ?
Regards,
Wahid
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@AbdulNow it does work. I have added a video to the article. Please go through it. https://www.youtube.com/watch?v=wYnwEfcUNnU
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
I've followed your instructions and downloaded the Email Parse action.
I'm getting the same error as @AbdulNow is when I process the emails either from the Mailbox or as a Flow Test.
The strange thing is, the Test will create the RITM and Update the original email, while the email box reprocess will not.
Here is the email i get.
As you can see, when tested I do get values.
Any idea why the mailbox processing isn't working like the Flow Test?
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello together,
I'm facing some kind of weird issue.
I watched the video and documentation over and over again.
I get the same error on PDI as well as on our DEV Instance in my company.
It looks like the output variable of the parse action itself is empty, but I've no clue why.
This is my parse action with the "Email Record" data record.
Can anyone advice what to do ? Or someone faced the same issue ?
Thank you
Best Regards
Manu
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Great article and flow action.
However, is anyone able to help amend the regEx line to look for tags between []? The inbound email I'm trying to parse contains the following as an example:
[Service]SOP Application[/Service]