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
Dual Super User
Dual Super User

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

View solution in original post

5 REPLIES 5
Dual Super User
Dual Super User

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

View solution in original post

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

 

Dual Super User
Dual Super User

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 🙂

 

 

 

 

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
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors
Users online (4,689)