cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
nanoterremoto
Regular Visitor

Save email and attachments to a file system

Hi,

 

I´m trying to create a flow to save all the emails received in a email account including the attachments, if exist, in a single file or a folder in my local server using the file system option.

 

Following a templante I have got a flow which save in a file the attachment, but if there are more than one it saves only the first attachment. When I try to save the body and the attachment in a single file, the flow creates a file without extension and I can´t read it.

 

How could I create this flow?

 

I have this right now:

 

http://subefotos.com/ver/?74eb6cddff9d26f59c09a92d0cba7c01o.png

 

Thanks in advance.

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-bacao-msft
Community Support
Community Support

Hi @nanoterremoto,

 

Do you want to save email and attachments?

If you want to save the contents of the body and the attachment in the same file, I think there is no way to do it. The file type of the attachment is undefined, so the combined file type does not exist and cannot be read.

You could consider using the Export email action to export the email and then store it in the same folder with attachments.

Use the Body exported by Export email to save the file with the file extension ".eml".

Image reference:

34.PNG

It work, created a folder, saved the email and all attachments, as below:

33.PNG35.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi @nanoterremoto,

 

Yes, just change .eml to .msg

 

36.PNG

37.PNG

Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

10 REPLIES 10
sandro_asp
Frequent Visitor

Hi,

 

Yes, you can create this type of Flow. I have similar flows created and working perfectly.

I'm not able to verify on your picture but on the Create File Action, on the property Archive Name you need to select "Attachments Name" token from the list of tokens from the “When a new email arrives” trigger.Untitled.png

 

Actually, there are several ways for you to accomplish this, you can use the File connector and for that, you need to connect to File Systems on your local or network machines to read from and write to files using the On-Premises Data Gateway. Or you can simply use the DropBox and use the Dropbox client to sync with your local system like this sample that I published: https://blog.sandro-pereira.com/2018/06/18/flows-to-the-help-how-to-extend-smartdocumentor-ocr-recei...

 

Sandro Pereira

MVP | Microsoft Azure (Integration)

v-bacao-msft
Community Support
Community Support

Hi @nanoterremoto,

 

Do you want to save email and attachments?

If you want to save the contents of the body and the attachment in the same file, I think there is no way to do it. The file type of the attachment is undefined, so the combined file type does not exist and cannot be read.

You could consider using the Export email action to export the email and then store it in the same folder with attachments.

Use the Body exported by Export email to save the file with the file extension ".eml".

Image reference:

34.PNG

It work, created a folder, saved the email and all attachments, as below:

33.PNG35.PNG

Please take a try.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

I would like to do something like that but instead of save an eml file, could it be possible to save a .msg file using the export option to save the complete email (body, attachments, etc)?

 

Thanks

Hi @nanoterremoto,

 

Yes, just change .eml to .msg

 

36.PNG

37.PNG

Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thanks a lot, at last I have done what I want to do.

 

I only use one step less because saving the .eml file I have body and attachments in a single file so I don´t need to save attachments separately.

 

 

Hello, forgive automatically create the folder for example with the name of the subject and in the email and attachments? You can share the flow screen. Thanks in advance.

This dosen't work for me, I can save the files as .msg, but when i try to open it in Outlook it gives me a permission error.

2019-04-05 08_00_41-Window.png

When .msg there are problems, I use .eml and it works fine.

Same for me, but we have another system that works best with .msg so it would be alot better if I could save in that format.

am345357
Frequent Visitor

Hello Everyone,

 

I followed the steps and can store attachments to my local system. However, if email is attached within received email, that is not getting saved to location. Is there any trick that I am missing?

 

Help is appreciated in advance.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (24,767)