Error Handling and Creating a Detailed Log in Power Automate - Beginners Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
let's create a process where we can do error handling and advanced logging click create and our flow will be an instant Cloud flow error handling and advanced logging will of course work across all these flow types we will give it a name I will call this calculation and then I'll choose to manually trigger my flow I'll click create this is the single most important power automate lesson so I really hope that you will do this entire thing with me open map flow and do all these actions and operations you will learn 10 times faster than just passively watching anyway let's design our process the process today is not the important part that is how we can handle errors in the process and how we do the logging so we'll make a simple process where we will initialize two variable and then add them together we will find an initialize variable in it tlis Parable we will call this one a of the type integer and we will give it the value 5. let's also rename the active it's always best practice to rename the activities so we can easily see what especially when we have two similar activities because now I'll choose to add another initialized variable and instead of having them named one initialized variable and then two then it's much much nicer to do this because then when I come back to this flow all my colleague does he or she can easily see what's going on because now we can see that this is the initialized variable a and this is the B but we also want to have a integer here and 9. now let's add them together first it will be a success and then we will produce the arrow that we can handle so we will have a compose I'll rename this so I'll call this compose calculation I'll go into inputs now we will create an expression a very simple one so I'll use the add function parentheses starting and then we want to have the first number that will be our variable a and we can call that variable just start start writing b a r and you can see the intelligence says do you want to write variables yes we will I'll click the tab it will automatically write the variables parentheses start single quotation mark and the variable name which will be a remember this is the variable name itself and not this title on the ACT and I'll have a comma and similarly I'll have the variables parentheses start single quotation mark B here we are done with the expression I always recommend you to control a control C that is because sometimes it will disappear these and now you can see it even says that the expression is invalid it is not this is a bug in power to made but when I click it the second time it will add it sometimes it will disappear and then it's nice to have it in our clipboard now let's try to save it let's try to test run it yes so so we can see that we can actually perform this calculation and I'll click here you can see down here that the output is 14 that is because 9 plus 5 is indeed but what happens when I click edit here I go into the variable B and then we will have a string so this is the arrow that we will look at today but this could be any error SharePoint error database error an API error everything then our flow will fail and it will stop right here and this in this way we cannot create a lock because the flow will simply just stop at the arrow and then it will not start again until a trigger will start it so we miss out on creating a lock or a send a warning to a user that this flow failed let's try to solve for that and let me just also go back here where you can see the 28 day run history here we have a seceded and failed and of course you can go in here in your my flows and inspect them but it could be nicer if you had a dynamic lock either sent to you or in a centralized place we will create both today an email and a centralized block let me click edit again the first thing we will do is to get a new Step because we want actions to be performed after our possible error which were in the compose calculation so here I will have another compose I'll have a compose I'll call this compose status and why I will get back to in one minute so simply just to rename it here I want to grab what comes from here and I'll go into an expression again and right here I can do an actions this one will give us what what we get what we get out from the composed calculation if I specify the name so in single quotation marks I'll say compose and an underscore calculation again control a control C it will say that there's an error does none and now we then we want to so now we have it but if we ran this it would stop here we would not perform this and get whatever output is up here so what we will do to continue after an error is to click these three dots configure run after here we can see that the compose status should run after compose calculation is successful but we also run it whenever it's failed and let's take time out is skipped is when it's skipped because of a condition we will choose not to do it here so I'll just click done now let's try to run it the variable B is still a string so this will be an arrow and we can test that we're actually able to get the status out let's see here you can see that this version error but here we have a check mark and that is because we configured the run after the end the output you can see that the status is now failed and we even have a message but let me control a control C this and what I will do is to go to application beautifier I like Json crack it's a very visible appealing but you can use code beautify just Google Json beautifier if you want another one than this and go over here to the left Ctrl a and Ctrl V this is the output of our flow so this is the Json that power automate produces in their action adjacent is simply just you can see it that there's a curly bracket in the start and in the end and then we have a lot of key value pairs or maybe you we have a name compose calculation this is the actual name of the action and down here we have a status called failed and we have a error message so and the status that is the key and the fail is the message so we can actually wrap these things and let me open up a notepad I'll do this so here I want to say get this status of the compose calculation and then I will write the expression so I knew that to get this here to the left I wrote actions parentheses start single quotation marks compose and then underscore calculation like this and to move further down the tree because I want to get the status first then I'll have a question marked and I'll have hard brackets and then I'll simply just write the name the key that I want to get the value out for so this one would be and the status I can also show you the error message while we're here because it's pretty much similar so get the error message of the compose calculation and this is of course only when there is an error because I will show you what happens when we succeed but for now keep that in mind so here I will say it's not the status that I want to look at anymore I want to look at the arrow and I want to look at the message so I'll make another question mark at these heart brackets and then I want to say message and a hard bracket I'll use the status at first but we have now created it for the error message as well I go back here and I'll click edit so um I could get the status out of this go to expression click OK and it's not narrow I'll also try just to see what happens when this succeed if I can get a status out for that hint we can so now we click run we click done and if I go down to status you can see that this succeeded so it works both on the succeeded ones and messages so what I want to do here is that what we have done here was to configure the run after this was the important part of the error handling so this compose status is just to get some status out of the current transaction and an error message and what I also want to do is that I also want an error message but actually when we run this and just succeed this error message will not be present and I can actually try to show you that so if I click new Step here impose and here um let us rename it we can see what's going on and here I will say error message and let's first just write every output from up here again like we did before and then we could narrow it down and we will even practice our Json skills this is a very key skill in power automate development so what we wanted here was to write actions and then we will have the compose calculation again again you cannot write a space in these ones here so you'll have the underscore you can but it will produce an error so this is just to get the entire thing out and just show you that when it succeeds we will not have message so right now we write everything out but if I go down here I can see the statuses succeed and we have no error message so we'll need to think about of course we will make this expression narrow so we'll get the error message we even have it down here it looks like this but so I go into the compose error message I delete this take the expression now we just need to think about one thing we will only have an error message if this state is up here is failed so we want to do a condition and a condition always asks a question and here I can say that can be entered the true or false and here I can say if the status failed if yes then I want to compose an error message otherwise I will not do it very simple I'll click this plus here and here I can actually see the condition first if you don't see it just search for condition I'll just pick it here but then I want to say I want to look at the output from the compose status so I find that in the content that is why we rename this so instead of calling these compose one or two and so forth we gave them names so we can easily identify me in the Pega and I want to say if this one is equal to failed then if this is true we're moving over here and over here this is when it's not true that is when it succeeds or have another status message just move this error message in here and now let us just talk about what will happen if I run it now since this will succeed we should not get an error message this will mean that this condition is false because it's not failed and then we'll go over here and nothing further will happen so I'm moving here and here we can see the expression is false and here it is next that means that this will was not performed similarly I'll click edit let us just try to produce the arrow and see that we can actually get the error message over there then we have created out usually when you create these locks or you want to send an email to the user first before we create an entire log then you only want to do it when something errorness happens that is because when things go well the user don't really want to know and indeed we get the error message over here now let's create a more detailed lock small lock at first we will expand it further during the video so what I will do is try not to get it let me just collect some of these things so what do I want to include in the log message we'll send an email to the user at first we will just have the low name so we will create an expression that looks at this name up here whether that is and that is because we don't want to say there was an error in calculation because this name can change so we want our flow to grab it automatically let's do that first so up here we can start by grabbing the actual flow name I click the Plus again I'll find a compose click the three dots and then click green and here I will say compose flow name first we will grab the entire the entire information Json about this flow and then we will narrow it down just as we did before with the actual statuses so I go here and to look at the workflow properties at the runtime we can just write workflow and then it will write parentheses starting in this is fine just click OK OK click save now let's try to run it and here we will look at the output from this and we will try to see if we can narrow it down to just the flow name we can use it if I go in here we can see that we have the output scroll a little bit down we have X the flow display name again I really like to control a control C up it over here so Ctrl a control V let's create the expression for the flow name so like this and here I wanted to say workflow this was to get everything remember and then I want to say just as before a question mark a hard bracket and you can even try to pause the video and do this yourself if not just right after me so then I'll have another question mark and here I will have this below this display name I'll do this let's see if this works if I control a control C and I'll click edit I'll delete it up here go to the expression Ctrl V and let's try to see if we can get the flow but this is clever because if some other developer or ourself rename this we should be able to grab it dynamically and we are we can create a block click it as we talked about we only want to send an email to the user if we have an error we're here I'll click that here I'll find send an email yeah so who do I want to send it to let's just send it to myself there's no reason to send it to another person right now because this is just in the I choose myself you can do this then I want to have a subject I want to say your flow and then I want to get the status right now we of course know it's failed that is whenever we're over here in the yes Branch but if we choose to move this say to the button so to send an email whether or not this flow has failed or not then we can just grab this status dynamically so I can say your flow and then can I have succeeded or failed this is this variable that we produced right up here then we will have the actual log and here I can have a low name and this is just hard-coded in I go to the dynamic content and here we have it compose flow name the output from there similarly I can have the status I just find it over here and now you can see it would have been a mess if we haven't renamed all these composers we have several composers so then I can have an error message it's here we could do all sorts of making this more beautiful but keep it simple and just just like this now um let me save it and let us produce an error because otherwise we will not end here so let us be sure that this is indeed a string it is let's try to send it and I will run it now it will run in a few seconds this has ran and we have sent our email if I go to my mailbox and here I can open it you can see that the flow name is calculation that is fine the status is indeed failed and we have she is saying that it's supposed to be a string it's supposed to be an indica and not a string so far so good but you can see that my flow range successfully and let me go back to the log again you might want to here we have a test fail that was our second one where we failed but now it actually succeeds and that is because we handle the error we don't stop the flow you might want to say now I send the email I then want to terminate the flow and set it to fail what you'll do here is to go to condition go down here terminate like this and set the status to fail then you can save it listed and this is only in our automate that you set it to the fail and it will stop right here and then if I go back here of course it will send me another email now now it says the status has failed but since what we're doing now is to create a log and error handling and the lock should be independent of this so we don't have to go in here and watch this usually in my entire power automate setup I will not have to go in here both because it's quite complicated to log into power to make go to my flows inspect the log and it disappears after 28 days so what I want is to have a centralized log and it really doesn't matter if it says fail or succeeded here I will have to fail and succeed that will be the status and the error message in my actual lock but this is the way to do it we will go more advanced we will try to introduce a try catch finally if you know programming it comes from here a try catch finally let me just open up a notepad and explain it to you so we have a try catch finally this is just a header and what a track hatch finally is is that it is a try it is a catch and it's final here so these are three containers in the try container you can call it the scope as well here we put our actions that we think can fail in our case that will be our calculation then we'll say if this fails we want to move into the catch if it succeeds we want to jump over the catch so it's only when the try block fails we want to move into the catch and then in the finally we will whether or not the try has failed or whether or not it it has succeeded we want to go to the final so the catch will only be performed if some things in the try block fails this is somewhat integrated in a lot of programming languages in power automate is not but we can create it very easily our self so I'll go down here now I will handle this compose status I will this configure run after I will let my try catch finally handle this I'll just go here configure run after and only has the is successful from before so but we will create it like we did here and take a new step find a compose and we have it here so we want a um sorry we want a scope I just slept for a few seconds uh sorry about that that will that happens sometimes when you look at the composion I really hope you enjoy these videos with live coding because I think you'll get all my thoughts in them and the knowledge that I have gathered so try cats finally we rename to this the scope is ignored at runtime and that is because we um here we categorize things this was our outer scope then we want let me just again so this was the outer scope and then we want three Scopes in it these will all be Charles these will be nested under this but they will not be nested under each other so what I want to do first is inside here addition here I'll find a scope and I will rename this to scope track now we want to add the cat here it's important that we do not Nest it inside here but we do it in the scope uh try catch finally and again these are just containers where we can sort our actions in and we can do several actions to in the scope so here I'll have scope catch will have a scope finally so again we rename these to see to make it very easy to see where we actually is so now we have the try catch finally the catch this is much like before where we perform the status only when the previous action failed actually we did it whether or not it failed but now we will set this to redot okay right so scope catch should run after the scope try as failed but not when it's successful and then when it's so only when something fails there we want to run the cat that could be send our email now I click done similarly to finally that that will run because the try it when this succeeds it will just jump over the catch and go down here but we will run the finally weather happens up here we'll run the file take the treat art and figure run after take everything and click done so now we have made our track hatch we will save here we will try to talk about what should go in here and what will go out so first of all we can start to move things but because things are independent on each other for example this status is dependent on this up here we can get a few errors when we move these things it's easiest the easiest thing would be to start from the button but we will still have some errors here that is because let me just try to to talk about what we want so in the scope try we will move in the calculation and here we can see that the status is actually dependent on that so let me just um let us just try to move in the calculation we can do this we also want to say where do I want to place my status I want to have that one in the catch it's very it's very small now but that's because I want to move the status into the catch and show you everything and you can see that we cannot do this this is because we have actions that is dependent on it and this is here in the error message so we will have to move the error message first and then the send an email probably also delete this condition so we also want to and let me just zoom a little bit out and here we just move things around and this can again this is a little bit complicated because sometimes things are dependent on each other so moving things is not allowed in power automate I can see both good and bad things about this because right now if you know what you do you you want to be able to but if you don't know what to do this is a nice safety rail anyway so if this goes wrong we go into the cat then we want to get the status and the error message and again we cannot even drag the error message so and this is sometimes just a trial and error just see whenever it's dependent on each other we could drag in the email to terminate let's just delete this because we will create a float that will handle everything I also want the error messaging but here um when I drag this one in here I cannot drag it in with in front I can drag it in here but then it says this will fail and that is because the email is dependent on it but what I can do is to click these three dots here I'll be to my clipboard and then I can actually delete it up here now I have it in my clipboard that is allowed then I go down to the catch you can of course you could have created this from the scratch but I think it's it's quite nice to see what you actually do when these things are dependent on each other and here I will just go to my clipboard I have the composed error message then I go into this catch again and yeah let me just zoom in and here you can see that first just send an email and then the composure message I want to move the compose error message up here that you cannot do so you have to do it reverse just by moving down here to change the order of this so now we have these two things we also have the condition up here it's completely empty now we have the outputs from the compose status this and I'll do this now we just need to move the status down here if that is allowed otherwise we will have to do a workaround we could do it and I think I will move the error message just below here so we get the status first and then the error message I think that's the right order to do it but this is just organizing the final thing that we also want to do um because we also have the flow name here is to go into the email and see that we have the flow name status that one works well but the error message disappeared when we covered it to the clipboard we just need to add it again and then we can click save so let's talk about what will happen here this will this catch will only be performed whenever we have an error in calculation let's try both runs and here we can see that we actually get an arrow here on the variable B for some reason but it will not fail whenever we run so we can I yep we will run and now we go into this try catch finally then you can see that this fails and this we we knew that that is because this variable B is a string but it still went into the tricads and sent an email and if I go over here you can see that we now have it so and this is the exact same thing as before now let's try to just to make sure that we have everything right on this bus here and uh for some reason you can see that and this is also a power automate bug what you can do about this is sometimes just to refresh it and again you will get used to to these things here and then you can open it it's just the way it is but it's nice to see you see all these workarounds with the tool because otherwise and then you know what to expect this is not an error this is not something that you have done anyway I want to see that I'm able to jump over the catch because then I have designed my try catch finally well so now we did the try but we jumped over the catch and we did the final we have nothing in the finally so that's it so um that is really nice we have now produced a somewhat Advanced logging feature but we can do even better we can also get the the actual date area of the flow and we can get the URL I think we will write it in a notepad and we will write those two things and then we will grab it here and use it in lock so again we will build on the steps on this one yeah so we can actually also have low date that will be here and we can have the flow URL this is when we send the email to the user it could be nice because then this one will not be open it could be nice if the user could just click a link and be taken directly to this flow so to get the flow name we can um we can get the current time by just writing UTC now do like this but we want to convert this from the UTC to another time zone which in my case would be the Roman Standard Time that is the Copenhagen time since I'm in combing you should choose your time zone but what you can do here is that you'll have a convert and then you'll say from UTC and then you have a parentheses start so convert from UTC in here it's important that we write it well sometimes because this will be a rather long expression I prefer to have it here instead of the expression editor but this has the disadvantage that we do not have correction control of it but we will crush that bridge when we get there then we want to say what time zone do I want to convert this UTC to that will be the romance and you can Google these time zone names Standard time like this and I think you should get your head around this because handling dates is an important part of logging as well so and then I want to have the format let's just have it a readable format for our email these are net custom date time format we went to them a couple of times you can just google.net custom date time format and take the first link it's a Microsoft link and then these these they stand for something the force multis that will be the the day in a small format like Wednesday then we will have the EMS that will be the month and then we will have days and we'll have the year like this finally we will have a parentheses end because our expression ends here so we'll take the current time convert it to our own time and we'll output it into format then we want the URL I created the expression for the URL for you and this is on the course page the link to this is in the description below and here I want to scroll a little bit down and the hints so to get the link URL to a power automate flow I have created this one here this is just for you to copy in so I can go up in the right corner and click copy or I can go in here and copy everything out let's first have it here so we can see it's it's rather long but it's basically just replicating what we have so make Power automate environments then we get the environments from the workflow you saw that we got that before and we get a lot of other let's start by the date Ctrl a control C forget it I'll be in the flow name I'll add so here I'll have a now to compose and I'll call this compose date go in here go to expression simply just Ctrl V in what we have just written we have it we also want to get the URL to this flow so we can use it in no log compose and um yep UIL URL someone told me that whenever I say URL you can only hear me say UL so URL sorry English is only my second language anyway I hope that this works for you so now I have it in here and I will yeah so this is the concat function simply just takes a lot of elements and grab them together ring now and while I just click save here just so I have everything we can expand our lock let's go down to the try catch and again we only want to so right now we only do logging when the flow fails but um in a little bit later in this video we will make sure that we create a log whenever a flow went successfully fails and will handle multiple transactions so but I go in here now we can add we wanted the date and the URL so maybe we want the date in the beginning I simply just go in here say date and then probably need to untick the bolt and here we will find the initial date and one is here and we will also have a URL and I think we will just have you can have the UL wherever you want maybe we actually want it just below the flow name so here I can say URL and find it over here see you again and we'll click save now we expanded our lock we provided more information I really hope you try to just understand this expressions and again you can write like we did up with the flow name you can simply just write workflow and then the parentheses start and in the end and then you can see what properties we have and simply just to grab the things from there like we did with the display name now let us see that send a nice lock whenever this low fails well I will like this um so now it will take a second when our flow ran our flow range successfully let me get to my email and it's here so here we can see see that we have the date we have the name we have the URL status is failed and we have the error message and here you can see I have to work a little bit with the formatting I accidentally made the error message poll and the date as well but it's literally just minor things and we also have the UL when I click it here you can see that I'm tagging to the actual run of this flow so here we can see that something went wrong and with this uh with with this one here this URL this makes it very easy for the user to inspect and see what went wrong then we can even make it even prettier if we want it but and if you want to remove these bold things we will just have to go in here and some reason this one bold and this error message let's just not drill into that um I really hope you get the point of visual luck because now we will get really advanced we will talk about and let me just save it again we will talk about how we can because we got all this for this the flow name the date the URL get the status and the error message we will talk about how we can make a really really Advanced lock when it comes to multiple transactions so I prepared some data go over here in the advanced click the download the Excel data for the lesson here I have to calculate I'll first let me just click download yes let's move it to our desktop I'll open to inspect it opens on the other screen I can see I would just move it in here so here I have data and you can see it's a table first of all the data from Power automate needs to be formatted as a table so we can work with the Excel activities in part you can always Mark a range of data so let's say that this was not formed at the table I could just mark this and if I'm in the desktop Excel I can just press Ctrl T that will format as a table it is now so you don't have to do or you can go over here to form the table I also gave this table a name so move inside anywhere in this table go to table design and up here you can see the table name is named calculation table feel free to rename it the data itself is on the data sheet here we have some columns we have the ID that is a unique identifier that is a great thing to have in your data if we want to write things back we can easily see that this is a unique number this could be a record number in your product database it could be an employee number Social Security number whatever you need to get into then we have two numbers that we want to add to each other so for here and this could be transactions that we wanted to perform again we made it simple we want to add a plus nine we want to write the result here and we want the date status message we could also add a URL if we wanted but since it will be a little bit Overkill because this URL will be all the same then we might just want to update the URL in one of these fields if we wanted those let's leave that one out but it will be straightforward to do I also produce some errors because we want to test our flow because we we can of course we can add a plus 9 but we cannot add a plus 4 or C plus d or 0 plus F so we want to create log messages we want to say succeed and succeeded failed and for the failed ones we want to have the messages all of them we want to have the date of the actual operation and we want the result for when it goes right now let me close this we need to place this datum inside for example one drive so power automate can grab what I will do here that I go to I have a folder called live here I will simply just drag in my Excel book you can place it wherever you want in OneDrive it doesn't have to be in OneDrive live just anywhere there then we can grab it from Power automate so now we will not use the variables from our flow remember we have made the A and B but we will use the actual Excel values so I go back here so what I want to do is that I already in the edit so now we will read the Excel book and we will we will delete some of the things that we used here for example I will delete the initialize variable a yep I'll delete B here and I will delete actual email I will not uh send an email this time as we will log directly to our Excel book this is the beauty of it so um now let's talk about what we want I want to read all the Excel data first so if I go here click the Plus and here I will find a list Roche prison and let me just delete this bar down here so we have a little bit more space so list rows present in a table so what do I want to do here I want to find a OneDrive for business that is where I have my OneDrive document library that is OneDrive the file that one I placed that on the live remember and you can do all these things with me and I really hope you're still here otherwise just rewind the video and do these things I promise you after this video if you've done these things with me you have then I find a table which will be calculation table so far so good so now we have read it then we can have and apply to each because we want to iterate to each one of these values and here we get an arrow that is because we are using the variable a we use that one down here in the calculation first half add an action so apply to each and here we will choose the value from up here like this and now we're iterating through each row one by one we can start to to actually just instead of just having the variable before like we had one transactions now we have multiple ones just dragging this so now I want to for each one of these vet these rows I want to run the tri-cats finally so here we want to fix a few things I want to go in here and I want to fix the calculation first because now I don't I can add two variables A and B I will just add whatever is in the current Row in the column A B delete this that will be the easiest thing and here you can see that I can choose it dynamically a and this one will be the items and then the apply to each that is the current row and then the column A and similar to B I show you this because we can sometimes we can we can use a combination of expression and dynamic content I you will learn the most if you can write out these actual um Expressions so again let us just open up the notepad so you will have it and I'll go down if you want these Expressions that we created here if you haven't created simply just send me a an email or a com a message on LinkedIn I'll gladly send them to you anyway so to add a and b in the multiple transaction exercise we will need to actually to actually I think I will do this so to get the a the a will be the items and then we will have um parentheses and then we will have the apply to each like this and we'll do this just like before when we want to go one below I want to say um I want to to get the actual um the a column sorry um do like this so this one will get the actual a column and then similarly I can say I want to since this comes from Excel it looks like a um it looks like an actual number but it's not we need to convert it since we want this to work with decimals as well we only have whole numbers in the actual sheet but we could make it work with decimals so then I can say a to a load that is convert this to a float then we'll simply just say load and I really hope you write these expressions with me you will learn a lot so now I have the A and then the a to a float that is so we can add them to each other let me just make one more space here similarly I can just say B and I can just copy this one in here and simply just change this one to B then I can say B to a load that is so again I can add a to B and let's hope that this expression is right that we don't have to because we cannot validate it here in notepad sorry B yeah like this now to add these two things to each other and let me just add in space here so we then we'll simply just use the add like we used to and then we'll have the first number that will be the a to a float and here on the P sorry I'll need to delete this a and then have a b I hope you're with me and let me just do this so here I will copy in a to float paste it in here then I'll have a comma and then I will have the load and then I will have the actual um B oh it will look like this here and then I'll have a parentheses end that will be the end the starting parenthesis up here from the add now I have added these two together if I go in here in the compose calculation and now you can see uh for some reason there was got it here I'll click OK and then we will click we add it now um we don't use the variables A and B our flow will be ready to go but we will also talk a little bit about the lab the actual flow here because since I'm going to write the lock and the lock let me just find it here I placed it over here in the live I want to update the log but I also want to get the status when it succeeds I want to have written in the succeeds here that means that let me just go here that means that in the catch I'll still have the error message here but the status I want to move that to the final because that's where I want to use it now um I can just update DXL now so I'm still in the in the apply to each and you can see I'm in here so in the finally I'll click add an action and this is the last part this is how easy it is to write a log we could have written a CSV or any other um output that we can create in here so here I will find my file again and I placed mine on the live but we could have created a separate block if we wanted and the table will be the calculation table the key column and key value now you can see all the headers are here the key column that will be the ID so we'll say look in this one here and then we need to map it that is because we want to say which row do we want to update and we already have an ID for each row that we're entering through up here and notice the same one here and then we just go into the key value and then we have the list rows present in the table ID so now power automate know which row it should update then we can just say the result that will be the calculation result here in the compose that will be from here we fix that the date will ease out as the same approached as we used before status that will be here and then the error message if that is present we will have it here again you could do all sorts of other things but what this has for us let me just go up here is that we have a try catch finally we try something then we have the catch where we perform things that we only want to perform when it fails and then we have a so I'll click save and it will be fun to watch if we have done everything completely right the flow and now we are updating our Excel sheet with the data the dynamic data the dynamic clock data and here it will probably take like 15 20 seconds and um you can see that we still run and if I go over here you can see that now it will process the data we have the result here for all this succeeds and here of course it cannot do then we have the date again this is Friday November 18 2022 we could have written this in a more Excel friendly format but for now it's perfectly fine then we have status succeeded failed failed failed and we can see that we also have error messages from the field once we need three transactions so um it's it still runs sometimes it can be a little bit slow we just have to wait we're waiting for the two times eight and again it's literally just to wait let us fast forward so you don't have to watch this and still runs that is because it's the API to Microsoft this piece is not something that we have done of course we will see this finish so I'll just fast forward again and again it's literally just to wait this is whenever as I said Microsoft API is busy it doesn't really make sense we saw that it works but for some reason now it came just as we talked this is it so we could of course create an even more extensive lock that will also say that timeout after five minutes and then create a log entry but now this is fine the next power automate lesson that you have to watch to learn everything about power automate is right up here
Info
Channel: Anders Jensen
Views: 7,377
Rating: undefined out of 5
Keywords: anders jensen, power automate, microsoft, error handling power automate, exception handling power automate, log in power automate, how to create a log in power automate, power automate log, handle errors in power automate, power automate error handling, creating a log in power automate, detailed log in power automate, power automate tutorial, how to handle errors in power automate, use a log in power automate, write a log in power automate
Id: M9FGgbFQG2I
Channel Id: undefined
Length: 51min 29sec (3089 seconds)
Published: Fri Nov 18 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.