Reputation: 1
I am looking for a way to get structured email headers from Outlook and process them in Power Automate Desktop.
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 mail headers obtained from the client application Outlook are in text format and very difficult to handle.
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.
Upvotes: 0
Views: 1538
Reputation: 66286
If you can use Outlook Object Model in VBS, you can retrieve MIME headers from a received message by reading the PR_TRANSPORT_MESSAGE_HEADERS
MAPI property using MailItem.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x007D001F")
Upvotes: 0