I am looking for a way to get structured email headers from Outlook and process them in Power Automate Desktop.
Assumptions
You can retrieve email headers in Outlook by using the following URL https://support.microsoft.com/en-us/office/view-internet-message-headers-in-outlook-cd039382-dc6e-4264-ac74-c048563d212c
The Challenge
The mail headers obtained from the client application Outlook are in text format and very difficult to handle.
Constraints
We assume that we are parsing mail headers from an attached .msg file. It is not possible to retrieve mail headers in json format using the Graph API.
Fortunately, Power Automate Desktop supports execution of VB script, JavaScript, Powershell, and DOS commands. It may be possible to take advantage of these to turn text into Json format, etc.