How to read body text in Inbound EMAIL Flow
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
https://www.servicenow.com/community/itsm-articles/how-to-read-body-text-in-inbound-email-flow/ta-p/2824794