10-09-2020 07:00 AM
Title: Data extraction and parsing from an email
Description: This Flow triggers on an email received to check its body on a dynamic number of keys to find its corresponding value. The trick is in an Apply to each loop based on an array you can manage from within the flow. The flow will find the keys and values you want to extract and parse.
Detailed Instructions: It’s as easy as importing the zipped flow attached, add your connection for Outlook Office 365 and it will trigger on your own inbox emails. I recommend additional filters (like a specific unique phrase in the subject or only a specific mailbox folder) so the flow will only trigger on emails that it should trigger on. Keep in mind that the flow expects a specific key to find and you can change the key in the array step of the flow. You can even change the key-value separator as explained in the video.
Questions: Please feel free to ask anything right here as a reply in this post.
Wow that is special indeed!
So when you use the trigger from a Shared Mailbox the From property returns an array that could have multiple items in it??
As if a single email received, can be sent from multiple email addresses... 🤔
Anyway: in my template flow, I just use this compose action to show who sent the email --> if you do not need it, just remove the step. If you are using the From Email address (or you just want to know how to get it) --> you can use the first() expression to get the first email sender in the output of the triggering action.
However: I tested it myself and when the Power Automate Experimental feature was enabled:
I experienced this strange behavior.
When I turned Experimental feature off --> the From Property of the Trigger Action would not be put in an Apply to each-loop.
Could you doublecheck the same behavior?
Thank you so much for the reply. Haha advanced flow stuff is always fun!
I was looking through your recommendation, and it was feasible, but I needed to come up with a faster solution since time was of the essence for this one. I was able to make it work by using html to text, indexOf variables, and substring expressions. It's not as pretty, but it gets the job done! I will keep the HTML table idea in my back pocket for a potential solution down the road. Thanks again!