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)
Please Guide, Thanks in advance
Mohit
Solved! Go to Solution.
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
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
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
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 🙂
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
Stay up tp date on the latest blogs and activities in the community News & Announcements.
Mark your calendars and join us for the next Power Apps Community Call on January 20th, 8a PST
Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.
User | Count |
---|---|
206 | |
187 | |
70 | |
37 | |
34 |
User | Count |
---|---|
350 | |
277 | |
122 | |
78 | |
59 |