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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / problem saving Word Do...
Power Apps
Unanswered

problem saving Word Document to sharePoint

(0) ShareShare
ReportReport
Posted on by 120

Hi,

 

I have created a flow to store email attachments to Sharepoint. It is working absolutely fine for all file types except Word Document.

 

It saves the file in SharePoint but I am not able to open it. 

Error: Unreadable Text

 

And I am using this formula on click of a download icon in a gallery(Item:  attachments of an incoming email) :

 

UploadafiletoSharePointfromPowerApps_1.Run(ThisItem.Name,ThisItem.ContentBytes)

image.png

Please Guide, Thanks in advance

Mohit

Categories:
I have the same question (0)
  • Verified answer
    RezaDorrani Profile Picture
    12,143 on at

    Hi @beniwal 

     

    Check this video

    https://www.youtube.com/watch?v=5XsWgVnR7SU&t=601s

     

    Try using the new JSON Include binary data feature in Flow to send data to Flow from PowerApps

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • beniwal Profile Picture
    120 on at

    hi @RezaDorrani 

     

    Thank it worked!

     

    I have a few more questions.

    1. how can we know the flow we triggered is successful? it just returns a boolean value if it is triggered.

        I am using the below formula 

        UpdateContext({attachmentSave: saveAllAttachments.Run(JSON(emailAttach,JSONFormat.IncludeBinaryData))});
        If(attachmentSave,Notify("Saved success",NotificationType.Success),Notify("Error while           saving",NotificationType.Error));

     

    A success message appears after a few seconds but my flow is taking more than 1 minute(Maybe because I am saving 6 files at once)

     

    Also, I have observed even if the flow has some error and it fails the flow function returns true.

     

    2. How I can get the link of the file that I just saved in SharePoint so that I can use Launch function?

     

    Thanks,

    Mohit

     

  • RezaDorrani Profile Picture
    12,143 on at

    Hi @beniwal 

     

    1- In flow you can send response back to PowerApps. Normally response type string is the most stable

    so you can actually send a string back like true or false

     

    PowerApps calling Flow and flow respondign back (has a 2 min timeline else it will timeout)

     

    if there is an error in Flow, you can use "configure run after" to handle errors

     

    2- When you create item in sharepoint using Flow, you will get the ID, file path etc. of the item from dynamic content

    You can pass that value also back to PowerApp from Flow ( make this also a string value to return)

     

    then in PowerApps use the launch function and to open it 🙂

     

     

     

     

  • beniwal Profile Picture
    120 on at

    Hi @RezaDorrani ,

     

    Thanks a lot for your help! 

     

    Can you please suggest any youtube video for error handling and getting data back from flow?

     

    Thanks,

    Mohit

  • RezaDorrani Profile Picture
    12,143 on at

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard