Power Automate Part 11 - Error Handling

Power Automate Part 11 - Error Handling Welcome to this wisel tutorial on error handling in power automate here's what you'll learn during the tutorial so we'll Begin by actually creating an error so we can trap it that's a fun bit.

Power Automate Part 11 - Error Handling

Then we'll show the try catch and find the scope actions you'll need to create to handle Eris we'll look at configuring runoff directions to make sure that they're.

Running the right sequence and then we'll take a dive into reporting errors so I'll show how you can report an error simply by just showing there's a problem and then how.

You can use the result function to pick up more information about it what we're trying to achieve with this error reporting and then the complicated expressions and they are complicated but.

You'll need to create in order to pick up on error messages and actions which have caused them to run and finally I'll show you how to link to your flow so that when you send an email.

To yourself saying there's a problem you'll be able to click on a link and actually show the flow but that's enough of listening to me or at least watching me I'm afraid you.

Still have to listen I'm going to vanish now and let's get started so the first thing we need to do is create an error bit self-indulgent.

Really this normally you try to avoid them so I've got an Excel spreadsheet called top 10 films you can either use in a previous one you've used in other.

Tutorials but you can actually download this you'll see from the program notes attached to this video in YouTube where you'll find the file but for any Excel workbook which contains a table would do.

Offer that matter any SharePoint list or any other source of data so what I'm going to do is create a new flow I'll make it an instant cloudflow and I'll call it example of flow.

Containing error and then we'll create it create a new step working with Excel our list row is present in a table.

We'll quickly choose where the table is so we'll choose one tribe OneDrive business excuse me one drive we'll choose a file which is stored in my case in the films folder and it's called top.

Posts Related:

    10 films and we will choose the table

    And at the moment everything's going to work perfectly so let's put an error in what I'm going to do is show Advanced options and I add an error that the film.

    Name fields should be equal to Titanic and I need to put Titanic in inverter commas what's wrong with that the field isn't called film name it's called title so this.

    Isn't going to work and what I'll do is add a step at the bottom to display the information as an HTML table just in case it does work or some.

    Miracle and what we'll do is display the output from the previous step we're all good to go so that's my non-working flow I think what we ought to do is just.

    Check it doesn't work or we continue it would be disappointing to implementing Implement error checking and then find it wasn't needed so I'm running my flow and sure enough.

    It's failed as I expected it to and you can see it doesn't actually display the name of the field so it would be up to me to guess what the problem is.

    So the basic principle of air trapping is fairly easy to understand you take the series of statements which you think might go wrong and you stick them into a separate scope and then check whether.

    That scope crushes so typically what you would do is insert three new actions each one will be a scope and to make it clearer you should rename.

    Them so I'll call this first one try and this is the things I'm going to try to do what I can do is drag my actions because I can't be sure which of them if.

    Any is going to crash into my try block

    What I can then do underneath that is add another scope this one I will call catch these are standard.

    Programming terms try and catch as is the final term which will be finally so I'll add another scope and this one I will call this will stick to my Convention of.

    Using capital letters finally that is what error trapping should look like in power automate what we now need to do is work out when the different blocks are going to run by specifying a.

    Run after condition so what I want to do now is work out the sequence of actions the idea behind this is the try Clause will always run the catch Clause will run only if the.

    Try one fails and the finely one will run under all possible circumstances to mop up all other conditions to be honest I tend to miss out the.

    Finely clause and would delete it and the reason is you can just run additional statements at the bottom of your flow and they will have pretty much the same effect there is a subtle.

    Difference but for most people I don't think you need to narrow it so what we're going to do is configure the try Clause to say what happens after it and you can't do that it's grayed out.

    And it tells you why you can't configure run after an action directly following a trigger this will happen under all circumstances it's the catch Clause where you need to.

    Configure what happens so if you click on the three dots next to the catch and choose configure run after and what we're going to do is say that it will run if the try Clause fails.

    We'll probably also run if the try Clause is skipped for some reason or if it times out it's up to you really whether you can tick all these three boxes.

    And finally if you're a excuse a pun for the finely Clause we can click on the three dots and configure this and this should probably run under all possible circumstances.

    So what you'll see is there's no direct link between the names you've chosen to give the blocks try catch and finally and what they actually do it's up to you to give them sensible names which.

    Correlate with what their run after actions actually do what I'd now like to do is to say if something goes wrong what's happened so I'm going to send.

    Myself an email in the cat Clause remember this will only run if there's an error and you can see the power automators considerably colored this Arrow red to show this is an error.

    Condition so I'll add an action I'll send myself an email to Notify myself I've created a problem and the email will go to me delegate51.

    And it will have a subject saying uh uh I need to spell that correctly and in an Ideal World the body of the email will say what the problem is we'll come to that in a bit.

    At the moment I'll just put a problem let's see if I now try running this I'm going to run it twice the first time I'll run it with an error the second time without.

    My first time and what you should see from the flow of tasks in the the try Clause failed and the cataclys succeeded one important consequence of adding.

    Error handling is your flows will always succeed so that could be a bit of a worrying so as promised what I'm now going to do is change it I'm going to go to my odata.

    Filter and I'm going to actually delete that for the moment and save this and then try running it so I reckon this will work perfectly.

    And it won't send me an email and you can see around the dry Clause missed out the catch clause and ran the finding clause I'm not expecting you to believe me.

    About the email so let's go and have a look at that if I go to my Outlook account and there's my email saying ah so it really did work what I now need to do is send myself.

    Some useful information so I can see not just that there's a problem but a bit more information about what it was so just before we proceed with detecting and showing area information I just need.

    To go back in and I've replaced my filter query so my query flow will crash again what I suggest doing is going away and making a coffee before you watch this in.

    The next tutorial because you'll need a clear head for this I would say so what I would like to do is display the results of the error now let me show you why this is going to be slightly.

    Harder to do than you might expect if I run my query what you're used to be able to do turn my sound off so that doesn't happen again what we used to be able to do is.

    To look at the results of stages and you can still do that you can click on any individual action and see the results of it but what you can do is see the result of.

    The scope in which it crashed what I'm now going to do is show you how to get around this you can see the scope is called try and contains two actions one is called list.

    Rows present in a table and the other is called create HTML table and although we can see on screen which one's crashed don't forget that when we run the flow it could be either of them.

    DISCLAIMER: In this description contains affiliate links, which means that if you click on one of the product links, I'll receive a small commission. This helps support the channel and allows us to continuetomake videos like this. All Content Responsibility lies with the Channel Producer. For Download, see The Author's channel. The content of this Post was transcribed from the Channel: https://www.youtube.com/watch?v=nzZjdO8qd0k
Postagem Anterior Próxima Postagem