Hello Experts,
I m working on flow. where I need to save attachment in Sharepoint Libary.
It is working for all type of files (pdf, word, xls).. But It doesnt work if email attachment comes with (.msg) or eml
A user send email with another email as attachment. So I m wanting to save that attachment into SharePoint.
It seems .MSG is not being recogized as attachment.
Anybody else faced issue like this ?
Any help will be much appericaited.
Regards
T
The user who wants to save or extract email attachments from MSG files then you can try the Gaintools MSG Extractor tool for the safe extraction of attachments from MSG files and make the data easily save in a few clicks.
At the risk of muddying the water......
If you are trying to get at the attachments inside of an email message, if the attachment is an Outlook item (e.g. calendar event, mail message) or it's an attached email for other mail clients (e.g. GMail), the Get Email (v2) action and the Export Email (v2) action will NOT contain the contents of those attachments in the output of those actions. But there are two ways to workaround this.
1) Use @Jay-Encodian 's guidance above to pipe the Export Email (v2) action's output into an .EML file (e.g. SharePoint Create File action) and then users can open that .EML file and get at the attachments (emails, images, DOCX, etc.).
2) Use the Microsoft Graph API's Get Message and Get Attachment endpoints which return those "item attachments" in the output so you can directly manipulate them in your Flow. The Known Issues section of the Office 365 Outlook connector docs gives some instructions on how to get at the appropriate API endpoints. https://docs.microsoft.com/en-us/connectors/office365/
Here is the relevant info, but see that page for the current info:
There are two types of email attachments:
If you decide to go straight at the Graph API (e.g. using an Azure Function that gets invoked by your Flow), make sure you consider usage of the ?$expand=attachments parameter to get the nested message's properties included in your root call.
e.g. GET https://graph.microsoft.com/beta/users/{id | userPrincipalName}/mailFolders/{id}/messages/{id}/attachments?$expand=attachments
P.S. Big shout out to Encodian (and Jay) for their product Flowr. At my work we use Flowr for generating PDFs from complex and dynamic templates that were far too painful to do with Word templates. We also use some of its other handy features (e.g. image resizing, QRCode generation). If you're doing anything with email messages, their attachments, images, PDFs, PDF text extraction, you owe it to yourself and your sanity to use Encodian Flowr. It's paid for itself many times over at my workplace. Now back to our regularly schedule program (i.e. PowerAutomate and its MIA features).
Hi all,
I've a very similar issue - I need to export only the attached email (email is an attachment of the email similarly as @kmw1130 )
All attachments except of outlook item file (msg or eml) work. Could you kindly advise what you have done differently at export? I only need to store the attached email (actual email as an attachment) in sharepoint library. Thanks !
@Jay-Encodian - thanks for the example, how do you "check you're passing the body value from the 'Export Email' action" ?
Here is my flow, the SP list item is created and the attachment with the .eml extension is created but when I open the attachment there is no content in the email and the subject is blank.
thanks,
Nick
HI,
I am new to sharepoint and while using the "create item" connector I am unable to see anything in the list name option. I have navigated to the site and created a new list manually , but still its not getting populated in the connector
Any help?
@Jay-Encodian I have success!! I have forgotten to add the .eml after the Subject
Thanks again for all your help!!
@Jay-Encodian Somewhat success. I got it to add both the attachment and the email to the list item, but the email is coded and not in a format that can be easily read.
@Jay-Encodian Yes, that was my entire flow. I will move the export and retest.
Thanks again!
@kmw1130no probs 🙂
Is that your full Flow? you need to export the email from the mailbox not from a forwarded mail action... you also need to check you're passing the body value from the 'Export Email' action
Michael E. Gernaey
179
Super User 2025 Season 1
David_MA
161
Super User 2025 Season 1
stampcoin
149