cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
BjarkiThor
Level: Power Up

Save email attachments from shared mailbox to SharePoint online (with different name)

Hello, 

 

I am having trouble saving pdf attachments from a shared email mailbox to sharepoint. 

 

I want to save them under the subjects name. 

 

It runs and creates a file under in the sharepoint folder but its not the attachment, its a 1 KB file that i am unable to open. 

 

Is it not possible to change the attcments name or am i doing something wrong here?

 FLOW.jpg

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Save email attachments from shared mailbox to SharePoint online (with different name)

Hi @BjarkiThor,

 

In general, if you want to save the files contained in the attachment to the SP Library, the configuration in File Name and File Content should be Attachments Name and Attachment Content, as below:

1.PNG

If you directly populate the Subject directly in the File Name, the file will be missing type; it is also inappropriate to fill the Current item in the File content, because the Current item does not only contain File content.

If you want to use Subject as the file name, you need to add ".pdf" as the file type.

2.PNG

However, if there are multiple pdf files in the attachment, the file name seems to be repeated, which may overwrite the previously created file.

It is recommended to add a variable to prevent the file name from being duplicated.

3.PNG

4.PNG

Please take a try.

 

Best Regards,

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.
3 REPLIES 3
Super User
Super User

Re: Save email attachments from shared mailbox to SharePoint online (with different name)

Hi @BjarkiThor

The last time I did this I used:Capture-250.png

So I'd advise usinmg "Get Item" after your trigger.

 

If you find my posts helpful, please mark with thumbs up

If this solves your issue, please click "Accept as Solution"

Any questions, just ask.

Thanks, Alan


Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Community Support Team
Community Support Team

Re: Save email attachments from shared mailbox to SharePoint online (with different name)

Hi @BjarkiThor,

 

In general, if you want to save the files contained in the attachment to the SP Library, the configuration in File Name and File Content should be Attachments Name and Attachment Content, as below:

1.PNG

If you directly populate the Subject directly in the File Name, the file will be missing type; it is also inappropriate to fill the Current item in the File content, because the Current item does not only contain File content.

If you want to use Subject as the file name, you need to add ".pdf" as the file type.

2.PNG

However, if there are multiple pdf files in the attachment, the file name seems to be repeated, which may overwrite the previously created file.

It is recommended to add a variable to prevent the file name from being duplicated.

3.PNG

4.PNG

Please take a try.

 

Best Regards,

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.
BjarkiThor
Level: Power Up

Re: Save email attachments from shared mailbox to SharePoint online (with different name)

Thank you, the .pdf did the trick and changed the file content from current item to Attachments content. 

 

- Bjarki 

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020

thirdimage

Flow Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

thirdImage

New Flow Community Board!

Check out the new Microsoft Flow Community Blog Topic Suggestion board!

fourthImage

Australia Summit

Travel to Melbourne and network with thousands of peers!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 24 members 3,625 guests
Please welcome our newest community members: