Reza, I've been using the Power Platform products for 2 years and have found that "hands down" you provide the most useful and COMPLETE solutions to the everyday problems that I encounter. I can't thank you enough for what I know is very hard work on your part. Thank you!
There are many times I have used the try catch block in a flow in the past but still this topic holds something new for me to learn.. Thanks Reza for updating all these scenarios in such a beautiful manner. Keep it up, you are doing an incredible job.
So I had this situation today. My flow failed trying to send a simple email. Something was going on with our power platform today. From what I can tell there is no way to catch an error with an email notification if notifications are the cause of the failure. PS: GREAT VIDEO!
@@RezaDorrani I was trying to send myself a notification. That was the test and the platform died a millisecond after the flow started. 😂 Apparently they only had problems with Flow3 and Flow2. Something about 503 errors.
Pretty much same as the previous error handling from another video from you. But this time it is very clever to add a termination with 'Fali' in the end so the status remains as it should be. Geniues Reza!
Following are the new aspects I showcased: - Handling errors in apply to each - Terminate - Handling both failures and time outs - Error Handling template - Flow run link URL has been updated. It would also work with flows within solutions
Thank you. I was on the right track with the Scope thing, but I was sticking it in a parallel within the apply to each loop so my flow was still failing. Basically, I know that my flow was going to fail on several and I didn't really care to know that it failed, so I just wanted the ones that failed to drop off and be ignored without failing the flow. I just added a scope that ran after apply to each failed and then terminated with a successful message. I know this isn't ideal, but I am dealing with a condition that isn't evaluting correctly which is supposed to drop the items that are failing anyway. Until I get that bit figured out, this is a good band aide to allow the flow to run as "normal".
Hey Reza, this some great work you are doing. I am playing with the try catch scope. I have nested conditions and if a nested condition fails, the error message reflects the top parent, not the nested action. How do I get the nested action error message?
Your videos are always informative and precise. How did you export the flow? I thought we couldn't export flows directly anymore and had to export the entire solution
@@oualidtube thanks for the suggestion. My rule for making videos is set - “I make videos when I receive multiple requests on a topic. Every 6 months I ask subscribers for topic suggestions on Community Tab of my channel. Most voted idea gets added to my backlog. Make sure to post this idea whenever I post the next topic suggestion post.”
Thanks a lot - as always. 😂👍🏻😎 Maybe I have missed it, but could you do also a video about error handling when using a cloud flow triggered by Power Apps?
Thanks Max. When I do a video on power app error handling, I would include that scenario. I have nothing in my backlog around this since very few have requested this topic.
Hi Reza, very informative video and clear instructions on handling errors. Unfortunately, one of my mailbox handling flows failed with a connection error, which rendered the options to send email or Teams message , or to add an entry to a SharePoint table all inoperable. What would you recommend for connection issue error trapping?
Thank you so much for this video. I have a quick question. I would like to get the error from a Parse JSON action. The flow is throwing the error, "Correct to include a valid reference to 'Parse JSON' for the input parameter(s) of action' when using the expression: actions('Parse JSON')?['error']?['message'].
I have not tried this with Parse JSON hence not sure. I will recommend checking on the forums at powerusers.microsoft.com/ in case someone has done something similar.
Thank you for this solution! As usual, explained clearly and professionally. I do have a question though: I am creating (or updating) an item in SharePoint Online via my flow. Occasionally it fails due to one of the item properties being incorrect (such as the user in a People field not being found). Is there a way to catch the error and return which propety exactly was the point of failure? (I'd like to report the property and possibly try updating again in the catch block with that property excluded.)
Error handling in loops is possible. Best option would be to add another try catch block within the loop. I do not have a specific video reference on this scenario though
@@RezaDorrani Ah, ok, so the SharePoint "Update Item" and "Create Item" actions in Flow function as loops? I notice that the error message is blank when I use the actions()?['error']?['message'] (or one of the variants), but the raw output shows the error message as being directly under ['outputs']?['body']?['message']. Is this because the SharePoint actions are http requests in the background?
I do not remember the specifics. I would recommend posting your query on forums at powerusers.microsoft.com/ in case someone has done something similar.
Hi Reza, great video, I finally got around to creating my own Error Handling Template for my department to use. One question, in the last segment, where you handle the Apply to each and the array created from an error in the Create item action. How can I incorporate that functionality into the previous segment's Try/Catch solution? Does every Apply to each scenario need its own check?
Hi Reza, The way you got the flow URL using workflow() function, is there any way to get it for the PowerApp as well? I want to deep link it to send an email notification with the link to the form in the app. For each environment, I have to change the link, which can be achieved using an Environment Variable, but I’m just curious if there’s something like this workflow() function for the App as well
Thank you for this great video! Sorry if I've missed this (Ive watched the whole video) but how do you handle errors if you have an Apply to Each loop but there are a lot of actions inside (multiple conditions/actions etc). How can I handle this?
Thanks Reza! Great as always sir. I have a quick question. Is there a way to throw an error message to the user in power apps if a flow doesn't run? I'm just thinking of a flow doesn't run then the user could just be sitting there waiting and not knowing there's an error and the error has been reported to the developer. Appreciate any help you can give on this idea!
Hi Reza, this tutorial was very helpful in making any Flow more robust. I'd like to know if a Flow is triggered from Power Apps, how can I import your template to start using it? For my Flow through the App, I recreated the steps you outlined but doing that each time isn't viable, so I was wondering how to go about using the template through Power Apps?
Excellent Video - sorry for this question but how do i import the linked template in Github into My Flows ? I tried to download the zip and then import as a Solution, and I tried the Legacy import, but both failed for me. Thanks for your help
Import zip as flow (legacy) not solutions. Many have imported this without issues. I recommend posting your issue with screenshots on the forums at powerusers.microsoft.com
Great video! Only change I made was change action('Action_Name)?['error']?['message'] to outputs(Action_Name')?['body']?['error']?['message']. Any reason why you used action() instead of output()? Action() returned null error for me
Hi Reza, thanks a lot for your video as always! May I know how to do the error handling if I have many steps in Apply to each? How can I catch the error message for each step? Thanks in advance.
Excelent video and easy to understand the explanations. Quick question though, we know that the "Result" expression only gets the top level actions. Do you know any ways to get the error details from the succeeding levels or from the actions like (If Statement, Switch or within a nested Scope)?
Is it possible to restart a flow at the point where there was a failure? In my case people had signed a document but afterwards there was a failure when updating the sharepoint data. I corrected the failure and want to start again with the update of sharepoint ...
Lets say I have an excel with a 300 fields. Lets also say that I have a lot of expressions manipulating the data before creating new items in SP list. An expression fails for one of the records in excel. Is there a way to know exaclty which field the error is in. It seems like It can only tell me which expression failed but does not tell me on which field the expression failed. With thousands of fields, it would be imposible to pin point where the error took place. Does this make sense?
Makes sense. We are limited to the error message which we are provided in flow. The loop pattern shown in video, will at-least hep provide details of which item failed and which expression which would help to some extent.
@@RezaDorrani Okay thank you! I have been trying to impliment something for a while and just wanted to get your opinion. I have a customer with large excel files that fail often and its hard to pin point errors. Maybe this will be something addressed in the future.
@@thechristianinitiative1445 In the video, I show an example of data being loaded from excel to SharePoint and how to notify errors for loop scenarios, but we are limited to what error messages are provided.
When flow runs, check output of result(‘try’) You will get information about all actions in try and if any action was skipped, you will get its code/value. I don’t remember on top of my head.
@@RezaDorrani Sorry, my question might not be clear. If I want to include "Is skipped", what should I replace 'XXXXXX' with? @or(equals(item()?['Status'], 'Failed'),equals(item()?['Status'], 'TimedOut'),equals(item()?['Status'], 'XXXXXX') )
Hello Reza, thanks for sharing. Will it be possible to get the remaining flow duration before it gets cancelled? Example: we are all aware of 30 days flow running limitations. Assuming that, you are sending daily reminders to the approvals it would be great to show that the flow will be canceled after X days, please take your decision". Any idea how we would achieve it?
Video does not show approvals :) I am not aware of a way to track number of days left for a flow. You would probably need another flow to keep a track of it.
Hey thank you for the video, it helps me a lot!!! But i have one question. I do the same exact thing, but in my Try-block i have the action "Run a flow built with Power Automate for desktop 2". And when i add in the Filter Array the expression "result('Run_a_flow_built_with_Power_Automate_for_desktop_2')" it gives me an it gives me an error message . I don't know why.
I loved your video. I have implemented the flow with this solution, and I am getting an error saying "Item not found" however the table is showing and empty message. The Filter Output shows "error": { "message": "Item not found"}. However, the on the Table, under message or error, it is empty. If I force an error div(1,0) the message shows on the table.
Hi Reza. Great video. Is there any way of getting this to work with a Dataverse changeset inside a scope? If a step inside the changeset fails then the message in the filtered array is similar to, "Changeset scope child actions 'Add_a_new_row_-_Agreement' failed". When reviewing the Flow run the actual error is present in the output of the changeset action but not in the result('Try').
You are great as always.😊 Any videos that you have done or you have with you or you are planning to do in improving the performance of a Canvas app with respect to patch, data retrieval and other operations for very large data sets.
Hi, first, thank you for all your great videos. Regarding this video, depending on the error, I am finding that the error message is in different levels. So far I have found the error message at these levels. item()?['error']?['message'] item()?['outputs']?['error']?['message'] item()?['outputs']?['body']?['error']?['message'] I put 3 error messages in my table. Am I wrong? Is there a way get the message more generically?
Thats right. It depends upon the actions utilized. Also depends on wether its running a loop scenario. No way to generalize. You could read from all 3 and run a coalesce to grab the one that returns the result.
Awesome Video Thanks Reza!. Do you recommend retry policy for any specific error types. Also i believe result function goes only one level deep. Thank you
Video shows a pattern apart from result function for loop scenarios. Retry policy default is 4 exponential retires which is good but there could be scenarios where you would want to set a fixed interval and have more tries like when calling an API.
I have not come across this issue and hence not sure what is the cause for your issue. I recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com
Hi Reza, I have a question I hope is an I have the action "Add user to group" (the Azure AD one) When I try to create the expression actions('Add user to group') I'm getting error: Correct to include a valid reference to 'Add user to group' for the input parameter(s) of action 'Send_an_email_(V2)'. Is there something wrong with the syntax because my action has spaces in the name (I notice yours just has a single word)? If so how do you handle those?
Hi Raza great video. However, need your kind expertise here. I followed your steps and in the Scope (Try) I have a set stored procedure actions to be executed from a sql server. my first action timedout (Status: GatewayTimeout) and my timing on the Try block is already 10m .However, the catch block doesn't seems to be working? so as you know the Gateway timeout is only 120 second and this particular action is currently on 12 mins and keep trying. Could you please help? looking forward to hearing back from you
ok I found that if I change the Retry Policy to None from each action setting that will solve it! Now I'm trying to build the part where I rollback the executed Stored procedure incase of Timeout or failed. As my Try block involve a sequence of stored procedure and the rule is if any of these failed then I need to rollback all. any thoughts or logic how to do that controlled?
Not sure what options one has for this. I recommend checking or posting your query on forums in case someone has done something similar powerusers.microsoft.com
Nice Explanation 👍 I am working on a flow where after terminate with error action I want to rethrow from this flow and catch that exception in Parent flow which is calling this flow, How that can be achieved?
Most welcome! I would have to try that scenario to know the steps. I will recommend checking or posting your query on forums in case someone has done something similar powerusers.microsoft.com
The link generation for the workflow run does not work if the flow is shared with other accounts. Then the link has to include a "shared" in its url. Is there a way to find out if a workflow is shared or not during runtime?
Can I use this flow for logic apps as well because I have a similar flow as the third approach since, I have a foreach I had to go with the append to array approach, but it seems to error out saying inputs in action are not defined in the template?
@@RezaDorrani thanks for the in detail video content it worked for my logic app situation, there was not a single video on youtube that showed how to use scopes with a loop inside it except yours.
Good evening Reza, This video was great. One issue I came across and not sure if this is an admin issue. But the link to the workflow gave me an authorization error message. "Error: Authentication failed." Do you know why this may happen? I used the same try-and-catch components.
Yesterday I got an error on a flow sending info from a form to a SharePoint list, a column was originally set to 50 character text, I updated this over a month ago, it still seemed to fail with 65 characters saying column was set to 50 characters, I checked SharePoint, nope it was still 100. I ended up creating another column and copying over the data from the first. But is there a way to refresh it so it gets the new column settings once changed?
Hi! Is there a way to capture also the errors inside conditions? I'd implemented this solution and its fantastic but seems it doesn't work when an action inside a condition fails. I mean, it sends the information but its not very helpfull, like "An action failed. No dependent actions succeeded.". Thanks in advance!
Hello, I am trying to make an automatically reminder email generated through power automate. But I am constantly receiving this particular error. The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@triggerBody()?['entity']?['Power BI values']' is of type 'Null'. The result must be a valid array. Can you kindly guide me in this.
I have not experienced the mentioned issue and hence not sure what the cause for it could be. I will recommend posting your issue on forums in case someone has experienced something similar powerusers.microsoft.com
Great video Reza! Any idea why #%2F%2F%2F%2F%2F%2F%....... is added to the flow run URL? I tired different browsers and I tried to copy and paste the URL, no success, it always adds #%2F%2F%2F%2F%2F%2F%....... and then the session times out. Any response much appreciated.
Thanks Durani after mpp conference I have started similar patterns in my flows and was facing issue getting error message if there is an action inside try block fails. Scope just give generic info of failure is there a way to get exact error message which action in scope failed and why it fail?
I have added the catch scope to 20 flows. By copy & paste the scope it is easy to implement. However the problem is that when I need to update the catch scope (e.g. change the email format or add a column to html table) I need to update 20 times. The 20 flows are not in same solution therefore I cannot use "call child flow" action. Is there any way to centralize it?
@@RezaDorrani Is there any other way as we have multi level approval flow and it might fail at any step and the user still sees the status as "Pending Approval" even though the flow is failed. Appreciate your help!
More useful for citizen developers. Thanks for the video. Excellent explanations!!!
My pleasure!
Reza, I've been using the Power Platform products for 2 years and have found that "hands down" you provide the most useful and COMPLETE solutions to the everyday problems that I encounter. I can't thank you enough for what I know is very hard work on your part. Thank you!
I am so so happy to hear this!
There are many times I have used the try catch block in a flow in the past but still this topic holds something new for me to learn.. Thanks Reza for updating all these scenarios in such a beautiful manner. Keep it up, you are doing an incredible job.
Glad it was helpful! Thanks for the feedback Ankush.
So I had this situation today. My flow failed trying to send a simple email. Something was going on with our power platform today. From what I can tell there is no way to catch an error with an email notification if notifications are the cause of the failure. PS: GREAT VIDEO!
You could add same try catch technique and notify user via "Send me an email notification" action
@@RezaDorrani I was trying to send myself a notification. That was the test and the platform died a millisecond after the flow started. 😂 Apparently they only had problems with Flow3 and Flow2. Something about 503 errors.
@@antoniobranderas not sure about this as I have not faced it
could also send notification via teams.
I am a regular visitor of Reza's videos and as usual his signature top class is visible. Great work Reza!
Glad to hear that!
As a beginner , You helped me lot to learn Power Platforms . Thanks for such detailed videos .🤗
It's my pleasure. Thanks so much for watching and learning from the videos.
Thank you, again, Reza! You have so many useful videos, with lots of tips and tricks. I find them so useful for my work! Many Thanks!!!
Great to hear! Thanks so much for watching and liking the videos
So Awesome. that I had to watch 5 times and take Screenshots to begin to understand. I will definitely have to incorporate this.
Glad it was helpful!
Great job!
Very good explanation, organization and also dividing the video by chapters, was a great help, thank you very much!
It's wonderful to receive positive feedback on the video - thank you for sharing your thoughts!
Pretty much same as the previous error handling from another video from you. But this time it is very clever to add a termination with 'Fali' in the end so the status remains as it should be. Geniues Reza!
Following are the new aspects I showcased:
- Handling errors in apply to each
- Terminate
- Handling both failures and time outs
- Error Handling template
- Flow run link URL has been updated. It would also work with flows within solutions
Thank you so much, a well needed explanation. Happy Monday!
You are so welcome!
Very good video. Answered my questions around error handling in PA precisely and resolved my current issue. Thank you!
Glad it helped!
many thanks for your advanced power automate skills
You are most welcome
Another awesome video Reza !!! You're the best.
Thanks so much
Thank you! This is something my flows desperately need..
Most welcome
Thanks Reza for all your extremely helpful and informative videos. Have learned a lot about Canvas App and Power Automate from them 🙏.
Most welcome
Perfectly explained, thank you so much for this video.
You're very welcome!
Man this is such a very informative and useful video - thank you for doing this and sharing it
Most welcome!
Learned a lot of new things in this video. Thanks for uploading 😀
Thanks Elfy
Man Reza, this is just brilliant! Thanks so much
Most welcome
Excellent video, subscribed because of it. Great work please continue!
Welcome aboard!
This is FANTASTIC. And so well explained. Many thanks!
Most welcome!
Thank you for the detailed and thorough explanation on this one. I found it very helpful
Glad to hear it!
brilliant lecture, really cleared my concepts as a beginner
Awesome
Thank you. I was on the right track with the Scope thing, but I was sticking it in a parallel within the apply to each loop so my flow was still failing. Basically, I know that my flow was going to fail on several and I didn't really care to know that it failed, so I just wanted the ones that failed to drop off and be ignored without failing the flow. I just added a scope that ran after apply to each failed and then terminated with a successful message. I know this isn't ideal, but I am dealing with a condition that isn't evaluting correctly which is supposed to drop the items that are failing anyway. Until I get that bit figured out, this is a good band aide to allow the flow to run as "normal".
Interesting scenario
And its really amazing!!!!!!! Worth watching this to handle the errors in flow!
Thanks
As always, brilliant materials to learn from. Thank you for sharing Reza.
My pleasure!
Brilliant - thanks again for your great work!
My pleasure!
Very good tutorial. Thank you for your explanation. Very useful!
You’re most welcome
Thank you Reza. This came in really handy
Happy to heat that
Thank you @Raza 🙌
Your videos are always useful ✨
Glad to hear that! Thanks for watching
Hey Reza, this some great work you are doing. I am playing with the try catch scope. I have nested conditions and if a nested condition fails, the error message reflects the top parent, not the nested action. How do I get the nested action error message?
I have not tried this for nested actions. It would require more complex data parsing.
Was looking for this, thanks!
Welcome
One another great video Reza 👏🎉
Thanks Vignesh
Great tutorial, thank you!!!
Most welcome
I’ve always wanted to know about this. Thanks 🎉
Most welcome
Merci merci et encore merci pour cette vidéo qui m'a énormément aidé
Great informative video as always. Very good job!
Glad you liked it!
Your videos are always informative and precise. How did you export the flow? I thought we couldn't export flows directly anymore and had to export the entire solution
My flow was probably not in a solution. I did this video long back and hence do not remember the specifics
GREAT VIDEO! Very useful
Glad it was helpful!
Thank you Reza. Helped me a lot.
Most welcome
Hi, @@RezaDorrani I hope you are doing well, please make a video on error handling in child and parent flows, thank you very much in advance
@@oualidtube thanks for the suggestion. My rule for making videos is set - “I make videos when I receive multiple requests on a topic. Every 6 months I ask subscribers for topic suggestions on Community Tab of my channel. Most voted idea gets added to my backlog. Make sure to post this idea whenever I post the next topic suggestion post.”
Thanks a lot - as always. 😂👍🏻😎
Maybe I have missed it, but could you do also a video about error handling when using a cloud flow triggered by Power Apps?
Thanks Max.
When I do a video on power app error handling, I would include that scenario.
I have nothing in my backlog around this since very few have requested this topic.
Exactly what I was looking for. Thanks!!!!
Welcome
Amazing video ! Thanks so much !!
Most welcome
Very informative and helpful video. thanks Reza
Most welcome
Great work!
Thanks!
Great tutorial again!!
Thank you! Cheers!
You rock, as always Reza!
Amazing concept ☺️
Glad you liked it
You are the master! Thank you.
Wow! Thanks
Great video. Thanks.
Glad you liked it!
Great explanation
Thanks
Hi Reza, very informative video and clear instructions on handling errors. Unfortunately, one of my mailbox handling flows failed with a connection error, which rendered the options to send email or Teams message , or to add an entry to a SharePoint table all inoperable.
What would you recommend for connection issue error trapping?
Not sure if there is an option for connection issue tracking.
Excellent video. Thanks
Most welcome
Thank you so much for this video. I have a quick question. I would like to get the error from a Parse JSON action. The flow is throwing the error, "Correct to include a valid reference to 'Parse JSON' for the input parameter(s) of action' when using the expression: actions('Parse JSON')?['error']?['message'].
I have not tried this with Parse JSON hence not sure. I will recommend checking on the forums at powerusers.microsoft.com/ in case someone has done something similar.
I have always learned a lot watching these videos. One question... is the formula length() or lenght() or are both spellings accepted?
I spelled it wrong in the flow hence highlighted it in video :)
Its Length!
Good job! Very informative!
Thanks Denis
Thank you for this solution! As usual, explained clearly and professionally.
I do have a question though:
I am creating (or updating) an item in SharePoint Online via my flow. Occasionally it fails due to one of the item properties being incorrect (such as the user in a People field not being found).
Is there a way to catch the error and return which propety exactly was the point of failure?
(I'd like to report the property and possibly try updating again in the catch block with that property excluded.)
Error handling in loops is possible. Best option would be to add another try catch block within the loop. I do not have a specific video reference on this scenario though
@@RezaDorrani Ah, ok, so the SharePoint "Update Item" and "Create Item" actions in Flow function as loops?
I notice that the error message is blank when I use the actions()?['error']?['message'] (or one of the variants), but the raw output shows the error message as being directly under ['outputs']?['body']?['message']. Is this because the SharePoint actions are http requests in the background?
I do not remember the specifics. I would recommend posting your query on forums at powerusers.microsoft.com/ in case someone has done something similar.
Awesome, your helping me alot.
Glad to help
Hi Reza, great video, I finally got around to creating my own Error Handling Template for my department to use. One question, in the last segment, where you handle the Apply to each and the array created from an error in the Create item action. How can I incorporate that functionality into the previous segment's Try/Catch solution? Does every Apply to each scenario need its own check?
Apply to each is the challenge. You would need its own check if you need detailed information and error handling within the loop.
Gold! Thank you! Is there a way to view logs across flows or hook it up to Insights etc.?
You can connect to insights using connector but you would need to log data into insights. Flow will not automatically add it.
Hi Reza,
The way you got the flow URL using workflow() function, is there any way to get it for the PowerApp as well? I want to deep link it to send an email notification with the link to the form in the app. For each environment, I have to change the link, which can be achieved using an Environment Variable, but I’m just curious if there’s something like this workflow() function for the App as well
I believe env variable is the easy option for now. I'm not aware of other ways.
Thank you for this great video! Sorry if I've missed this (Ive watched the whole video) but how do you handle errors if you have an Apply to Each loop but there are a lot of actions inside (multiple conditions/actions etc). How can I handle this?
You could create scope inside apply to each as well.
Thanks Reza! Great as always sir. I have a quick question. Is there a way to throw an error message to the user in power apps if a flow doesn't run?
I'm just thinking of a flow doesn't run then the user could just be sitting there waiting and not knowing there's an error and the error has been reported to the developer.
Appreciate any help you can give on this idea!
Not sure about this one to be honest. I will recommend checking on the forums at powerusers.microsoft.com/ in case someone has done something similar.
Hi Reza, this tutorial was very helpful in making any Flow more robust. I'd like to know if a Flow is triggered from Power Apps, how can I import your template to start using it? For my Flow through the App, I recreated the steps you outlined but doing that each time isn't viable, so I was wondering how to go about using the template through Power Apps?
Create flow from template and change the trigger to power apps. Then go to your power app and connect to that flow.
Really nice stuff 👍
Thank You
Excellent Video - sorry for this question but how do i import the linked template in Github into My Flows ? I tried to download the zip and then import as a Solution, and I tried the Legacy import, but both failed for me. Thanks for your help
Import zip as flow (legacy) not solutions.
Many have imported this without issues. I recommend posting your issue with screenshots on the forums at powerusers.microsoft.com
Great video! Only change I made was change action('Action_Name)?['error']?['message'] to outputs(Action_Name')?['body']?['error']?['message']. Any reason why you used action() instead of output()? Action() returned null error for me
Honestly its been a while and I do not specifically remember the reason why
Hi Reza, thanks a lot for your video as always! May I know how to do the error handling if I have many steps in Apply to each? How can I catch the error message for each step? Thanks in advance.
I believe I did show how to catch error within apply to each in video. Its later in the video.
Excelent video and easy to understand the explanations. Quick question though, we know that the "Result" expression only gets the top level actions. Do you know any ways to get the error details from the succeeding levels or from the actions like (If Statement, Switch or within a nested Scope)?
That is not an option with results. You would need to add error handling inside the levels like loops etc.
Is it possible to restart a flow at the point where there was a failure? In my case people had signed a document but afterwards there was a failure when updating the sharepoint data. I corrected the failure and want to start again with the update of sharepoint ...
Flow does not have an option inbuilt to restart from point of failure
Lets say I have an excel with a 300 fields. Lets also say that I have a lot of expressions manipulating the data before creating new items in SP list. An expression fails for one of the records in excel. Is there a way to know exaclty which field the error is in. It seems like It can only tell me which expression failed but does not tell me on which field the expression failed. With thousands of fields, it would be imposible to pin point where the error took place. Does this make sense?
Makes sense. We are limited to the error message which we are provided in flow. The loop pattern shown in video, will at-least hep provide details of which item failed and which expression which would help to some extent.
@@RezaDorrani Okay thank you! I have been trying to impliment something for a while and just wanted to get your opinion. I have a customer with large excel files that fail often and its hard to pin point errors. Maybe this will be something addressed in the future.
@@thechristianinitiative1445 In the video, I show an example of data being loaded from excel to SharePoint and how to notify errors for loop scenarios, but we are limited to what error messages are provided.
Hi Reza! This is great stuff. Keep it up.
I got a quick question. What expression should I use in the 'Filter Query Expression' for 'Is skipped'?
When flow runs, check output of result(‘try’)
You will get information about all actions in try and if any action was skipped, you will get its code/value. I don’t remember on top of my head.
@@RezaDorrani Sorry, my question might not be clear.
If I want to include "Is skipped", what should I replace 'XXXXXX' with?
@or(equals(item()?['Status'], 'Failed'),equals(item()?['Status'], 'TimedOut'),equals(item()?['Status'], 'XXXXXX') )
@@simmyjer My answer is same. I dont know the exact string. You would need to check.
@@RezaDorrani ah i see. Thanks!
Hello Reza, thanks for sharing. Will it be possible to get the remaining flow duration before it gets cancelled? Example: we are all aware of 30 days flow running limitations. Assuming that, you are sending daily reminders to the approvals it would be great to show that the flow will be canceled after X days, please take your decision". Any idea how we would achieve it?
Video does not show approvals :)
I am not aware of a way to track number of days left for a flow. You would probably need another flow to keep a track of it.
thank you so much for this video.
Hey thank you for the video, it helps me a lot!!!
But i have one question. I do the same exact thing, but in my Try-block i have the action "Run a flow built with Power Automate for desktop 2". And when i add in the Filter Array the expression "result('Run_a_flow_built_with_Power_Automate_for_desktop_2')" it gives me an it gives me an error message .
I don't know why.
I have not tried this with power automate desktop. You would need to use result action on a scope. Try adding your PAD flow action in a scope.
I loved your video. I have implemented the flow with this solution, and I am getting an error saying "Item not found" however the table is showing and empty message. The Filter Output shows "error": { "message": "Item not found"}. However, the on the Table, under message or error, it is empty. If I force an error div(1,0) the message shows on the table.
Not sure about this one.
I will recommend posting your issue with screenshots on the forums at powerusers.microsoft.com
Hi Reza. Great video. Is there any way of getting this to work with a Dataverse changeset inside a scope? If a step inside the changeset fails then the message in the filtered array is similar to, "Changeset scope child actions 'Add_a_new_row_-_Agreement' failed". When reviewing the Flow run the actual error is present in the output of the changeset action but not in the result('Try').
Having now watched the rest of the video I guess we can use similar approach to the apply to each 😀
😊
You are great as always.😊
Any videos that you have done or you have with you or you are planning to do in improving the performance of a Canvas app with respect to patch, data retrieval and other operations for very large data sets.
Thanks!
Check ua-cam.com/video/_2jDGqtqqi8/v-deo.html & ua-cam.com/play/PLTyFh-qDKAiE6ia-D94Qk5-AzpN4dqOmD.html
@@RezaDorrani thanks a lot for such an spontaneous response
Hi, first, thank you for all your great videos. Regarding this video, depending on the error, I am finding that the error message is in different levels. So far I have found the error message at these levels.
item()?['error']?['message']
item()?['outputs']?['error']?['message']
item()?['outputs']?['body']?['error']?['message']
I put 3 error messages in my table. Am I wrong? Is there a way get the message more generically?
Thats right. It depends upon the actions utilized. Also depends on wether its running a loop scenario.
No way to generalize.
You could read from all 3 and run a coalesce to grab the one that returns the result.
Awesome Video Thanks Reza!. Do you recommend retry policy for any specific error types. Also i believe result function goes only one level deep. Thank you
Video shows a pattern apart from result function for loop scenarios.
Retry policy default is 4 exponential retires which is good but there could be scenarios where you would want to set a fixed interval and have more tries like when calling an API.
Thanks for this Reza! I am running into a 404 error when pasting the link to the workflow though. Any thoughts? Thanks!
I have not come across this issue and hence not sure what is the cause for your issue. I recommend posting your issue/query with screenshots on the forums at powerusers.microsoft.com
Thanks Reza, this is great. Is there a technique for getting errors from actions inside nested scopes?
I showed one way in video. You would have to handle it within the loop.
Fantastic Video
Thank you very much!
Hi Reza, I have a question I hope is an
I have the action "Add user to group" (the Azure AD one)
When I try to create the expression actions('Add user to group') I'm getting error: Correct to include a valid reference to 'Add user to group' for the input parameter(s) of action 'Send_an_email_(V2)'.
Is there something wrong with the syntax because my action has spaces in the name (I notice yours just has a single word)?
If so how do you handle those?
Spaces are to be replaced with _ during expressions
Thanks Reza!
Most welcome Mike!
Hi Raza great video. However, need your kind expertise here. I followed your steps and in the Scope (Try) I have a set stored procedure actions to be executed from a sql server. my first action timedout (Status: GatewayTimeout) and my timing on the Try block is already 10m .However, the catch block doesn't seems to be working? so as you know the Gateway timeout is only 120 second and this particular action is currently on 12 mins and keep trying. Could you please help? looking forward to hearing back from you
ok I found that if I change the Retry Policy to None from each action setting that will solve it! Now I'm trying to build the part where I rollback the executed Stored procedure incase of Timeout or failed. As my Try block involve a sequence of stored procedure and the rule is if any of these failed then I need to rollback all. any thoughts or logic how to do that controlled?
Not sure what options one has for this.
I recommend checking or posting your query on forums in case someone has done something similar powerusers.microsoft.com
Nice Explanation 👍
I am working on a flow where after terminate with error action I want to rethrow from this flow and catch that exception in Parent flow which is calling this flow, How that can be achieved?
Most welcome!
I would have to try that scenario to know the steps. I will recommend checking or posting your query on forums in case someone has done something similar powerusers.microsoft.com
The link generation for the workflow run does not work if the flow is shared with other accounts. Then the link has to include a "shared" in its url. Is there a way to find out if a workflow is shared or not during runtime?
Not sure the steps to find out if workflow is shared at runtime
Can I use this flow for logic apps as well because I have a similar flow as the third approach since, I have a foreach I had to go with the append to array approach, but it seems to error out saying inputs in action are not defined in the template?
I have done little work with logic apps so not sure but my guess is Yes
@@RezaDorrani thanks for the in detail video content it worked for my logic app situation, there was not a single video on youtube that showed how to use scopes with a loop inside it except yours.
@@aravindranganathan5516 Awesome
Good evening Reza, This video was great. One issue I came across and not sure if this is an admin issue. But the link to the workflow gave me an authorization error message. "Error: Authentication failed." Do you know why this may happen? I used the same try-and-catch components.
I have not faced this issue. I would recommend posting the issue with screenshots on the forums at powerusers.microsoft.com
Yesterday I got an error on a flow sending info from a form to a SharePoint list, a column was originally set to 50 character text, I updated this over a month ago, it still seemed to fail with 65 characters saying column was set to 50 characters, I checked SharePoint, nope it was still 100. I ended up creating another column and copying over the data from the first. But is there a way to refresh it so it gets the new column settings once changed?
That seems weird. It should pick up the new column settings automatically. There is no concept of refresh.
@@RezaDorrani yeah I thought so too, ah well I found a workaround just weird hey :)
Hi! Is there a way to capture also the errors inside conditions? I'd implemented this solution and its fantastic but seems it doesn't work when an action inside a condition fails. I mean, it sends the information but its not very helpfull, like "An action failed. No dependent actions succeeded.". Thanks in advance!
You would probably need a separate try catch inside that condition to get the error
Hello,
I am trying to make an automatically reminder email generated through power automate. But I am constantly receiving this particular error.
The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@triggerBody()?['entity']?['Power BI values']' is of type 'Null'. The result must be a valid array.
Can you kindly guide me in this.
I have not experienced the mentioned issue and hence not sure what the cause for it could be.
I will recommend posting your issue on forums in case someone has experienced something similar powerusers.microsoft.com
Great video Reza! Any idea why #%2F%2F%2F%2F%2F%2F%....... is added to the flow run URL? I tired different browsers and I tried to copy and paste the URL, no success, it always adds #%2F%2F%2F%2F%2F%2F%....... and then the session times out. Any response much appreciated.
I have not experienced this so not sure
Thank you Reza
Welcome
Thanks Durani after mpp conference I have started similar patterns in my flows and was facing issue getting error message if there is an action inside try block fails. Scope just give generic info of failure is there a way to get exact error message which action in scope failed and why it fail?
Please watch the entire video :)
Thank Reza! I have added error handling in loop hope I will get some good results from it.
@@mohandar Video shows a demo of how it works!
I have added the catch scope to 20 flows. By copy & paste the scope it is easy to implement. However the problem is that when I need to update the catch scope (e.g. change the email format or add a column to html table) I need to update 20 times. The 20 flows are not in same solution therefore I cannot use "call child flow" action. Is there any way to centralize it?
I am not aware of a way to generalize it.
Wondering, if there is also any way to update the "Approval Status" column in sharepoint as "Failed" once the flow fails?
Im not sure if that is possible
@@RezaDorrani Is there any other way as we have multi level approval flow and it might fail at any step and the user still sees the status as "Pending Approval" even though the flow is failed. Appreciate your help!
@@GeekClub-j1b I will have to try it out to know its feasibility. I recommend posting your query on forums at powerusers.microsoft.com
@@RezaDorrani Thank you :)
Which app do you use for your video recording and narration?
Camtasia