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

Attachment saved from shared mailbox to OneDrive/Sharepoint is incorrect

Hello All,


I have build simple flow that should download attachments from Shared Mailbox and save on OneDrive.

Trigger used: When a new email arrives in a shared mailbox (V2)

Flow is valid and works, but unfortunately as a result, file created on OneDrive is incorrect.

Saved file is empty (independently on the file format) - contains only metadata of file..

It looks like a bug..

I already tested different options:

- same flow with different trigger (On new email - my mailbox) - works correctly (so flow is correct)
- same trigger but saving whole email to .eml - works correctly (so all accesses are ok)

- same trigger and flow but saving attachment to Sharepoint online - file created incorrectly (like to OneDrive)

Do You think there is something incorrect?
Any idea for workaround?

My flow:
FLOW.jpg

File (pdf in this example but opened with notepad):

FIle.jpg

1 ACCEPTED SOLUTION

Accepted Solutions
tom_riha
Super User II
Super User II

Did you try also to add 'Get attachments' action to get the attachment data before you create the file?

image.png

Also I see you're using the email subject as the 'File Name'? Isn't the file missing the file extension?



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

3 REPLIES 3
tom_riha
Super User II
Super User II

Did you try also to add 'Get attachments' action to get the attachment data before you create the file?

image.png

Also I see you're using the email subject as the 'File Name'? Isn't the file missing the file extension?



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

Hi @tom_riha 

 

Many thanks! That actually works! 🙂

and yes for subject it requires file extension - I used Subject with one of my tests. now I just use attachment name which does not require extension.

but a bit confusing that this additional step is required for shared mailbox and not for personal..

 

cheers!

 

I needed this step also for my personal mailbox, when I tried to 'Test run' run the flow, it always broke the uploaded file without it. So I had to either add this additional step, or sent a fresh email with each test run. 🙂



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

Helpful resources

Announcements
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

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

Top Solution Authors
Users online (59,274)