Fetch variables from email body using Flow Designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2024 07:58 AM
Hi All,
I have email body like below from incoming mail to servicenow
Hi Team,
Please use below details to create an Hr case
Requester Name: Test11
Request ID: 12343
I want to get this requester Name and put it in a description.
I know this can be done like "email.body.requester_name" if we use inbound email action but i want this to be fetched using flow designer if we have some 40-50 such fields.
Can anyone help me on this.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-19-2024 10:11 AM
Actually , email.body.requester_name will not return your the value you expect. It is because the email body is just one giant string, not an object.
You need to use string operations like indexOf to find the relavant keyword to get the values you need.
I suggest lookup stackoverflow or chatgpt for the snippet to parse out the values.
Then use a Flow Action where you can write this script to get the values you need back into the flow.