cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
beniwal
Level: Powered On

problem saving Word Document to sharePoint

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

1 ACCEPTED SOLUTION

Accepted Solutions
RezaDorrani
Level 10

Re: problem saving Word Document to sharePoint

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

5 REPLIES 5
RezaDorrani
Level 10

Re: problem saving Word Document to sharePoint

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
Level: Powered On

Re: problem saving Word Document to sharePoint

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
Level 10

Re: problem saving Word Document to sharePoint

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 Smiley Happy

 

 

 

 

beniwal
Level: Powered On

Re: problem saving Word Document to sharePoint

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

Helpful resources

Announcements
firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

SecondImage

PowerApps Monthly Community Call

Next Wednesday, September 18th at 8am PDT

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

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