cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
BjarkiThor
New Member

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
v-bacao-msft
Community Support
Community Support

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.

View solution in original post

4 REPLIES 4
AlanPs1
Resident Rockstar
Resident Rockstar

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!


v-bacao-msft
Community Support
Community Support

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.

View solution in original post

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

 

- Bjarki 

Kamacete
Helper III
Helper III

Hi,

I'm trying to save an email attachment with a different name, and when I run the flow the (.xlsx) file has saved. However, when I tried to open the file, I received the message that the file it's corrupt or not supported.

 

When I save the file without change the name, the flow works fine.

 

could someone help me, please?

 

01.png1.png2021-03-24 11_04_47-test.xlsx   .png

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,406)