web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - General Discussion
Suggested answer

Flow for email attachment - Error Message

(0) ShareShare
ReportReport
Posted on by 25
Hello, 
 
I'm trying to set up a flow for a specific attachment that is an Excel document to be uploaded to a SharePoint list.  The attachment is uploaded to the proper place, but when people try to open it, they receive a message.  However, when I drop the excel document in SharePoint directly, the flow runs fine and people who are alerted are able to open.  How do I correct this so I don't have to manually upload it? 
Categories:
I have the same question (0)
  • Suggested answer
    MMcCloud Profile Picture
    236 Super User 2025 Season 2 on at
    Flow for email attachment - Error Message
    Good Morning,
     
    I would like to start off by suggesting you block out your orgs information when posting screenshots.
     
    As for your problem I would try a few troubleshooting steps:
     
    Make sure you trigger has 'include attachments' turned on in the dropdown but, since you are referencing it I believe it does.
     
    When you are creating your file make sure the name is carrying the correct extension within it if the files is a .xlsx try to add the extension directly onto the naming convention of the file. You could also use a compose to check before adding it directly.
     
    I personally run into a lot of issues when using the file object directly with the action to send, store or upload it I usually have better luck when I create an array variable before then assign them into the array and swap the actions file mode the array will look something like this:
     
    Inside an apply to each for the attachments
    {
      "Name": Name,
      "ContentBytes": FileContent
    }
     
     
    Hopefully this helps if it solves your issue please select it as the solution if not feel free to follow up and I am sure myself or someone else will continue to assist. Have a good one!
  • Tomac Profile Picture
    2,625 Moderator on at
    Flow for email attachment - Error Message
     
    I recreated the flow from your screenshots and it worked fine in my testing. Have you gone into the mailbox where that message was received and verified the spreadsheet can be opened directly?
  • Suggested answer
    Pstork1 Profile Picture
    68,236 Most Valuable Professional on at
    Flow for email attachment - Error Message
    I would suggest adding a Get Attachment in the loop before you store it in SharePoint.  In my experience the trigger doesn't always contain the full contents of the attachments if they are too large.  Manually retrieving them will make sure that you get the whole attachment.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 699 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 542 Moderator

#3
chiaraalina Profile Picture

chiaraalina 321

Last 30 days Overall leaderboard