Parsing email body with Inbound Email Flows

Mark Roethof
Tera Patron
Tera Patron

Hi all,

Just playing around a bit with Inbound Email Flows. To get a feeling for moving from Inbound Actions to Inbound Email Flows. Setting up an Inbound Email Flow works pretty quick, Incoming mail is processed, no worries.

Though…
What about parsing the email body? With Inbound Actions you could use something like "current.body.number", "current.body.something", to get the value on a line in your email body after for example "Number: ", "Something: ", etc..

How to achieve this with Inbound Email Flows?
I tried using for example:
fd_data.trigger.body.number;
fd_data.trigger.body_text.number;

Only this just returns null.

Any ideas? Or is it just like this does not work for Inbound Email Flows and you would need to parse the whole body_text or body?

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

1 ACCEPTED SOLUTION

Mark Roethof
Tera Patron
Tera Patron

Also with Paris no proper solution for this. Or solution... stick with old school Inbound Actions.

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

View solution in original post

18 REPLIES 18

Thanks Jonah! Worked perfectly!

Uncle Rob
Kilo Patron

Hopefully Mark doesn't mind me hijacking the post!   But hopefully we can shortcut folks reading through the whole thread and catching up on YEARS of R&D and rabbit holes.

We're now at Tokyo version and there's still no PURELY OOB way of doing this.

Luckily via Flow Actions we have the ability to build the capability.

TLDR;  Ben Scherer put up a custom flow action on share that parses email bodies.  Its on SHARE called "parse email bodies"
I made a video for how to put it all together.

Adam43
Tera Contributor

having loads of problems trying to get this flow action working with a different parsing situation.  my format is:  <br>&lt;firstlast@domain.com&gt;: host mx2.domain.iphmx.com[68.232.135.188] said: 550<br> #5.1.0 Address rejected. (in reply to RCPT TO command)<br>

and that's repeated multiple times for multiple reject messages.  we're trying to automate looking up the user accounts of these rejected emails to more efficiently disable notifications due to lags in our user provisioning process.  any help getting the parsing script working would be much appreciated!  I think maybe I need to switch the output variable from name/value pair to something else as well?

How to set reference fields with this? I have assignment group as (Assignment Team: On-Premises Infra)