👉 Power Automate Beginner to Pro [Full Course]

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] well hello everyone my name is devin knight and i'm excited you're here to join us today for a day of power automate really three hours of power automate uh welcome from wherever you may be coming from if you're in the morning afternoon or evening or even if you're watching the recording i hope you enjoy today's session again a fairly full day on power automate so many of you we may realize are very new to power automate while some of you also may have a little experience with power automate but we're going to give you a full spectrum of what you can do with the tool in today's class we're going to cover a variety of topics within the application not only how you can create things like cloud flows and automate various tasks that you might do but we're also going to cover how you can do things like desktop flows and how can you automate more legacy applications that you might interact with so i'm going to go ahead and bring up my slides to get us kicked off for this afternoon the afternoon where i'm at anyways i know for some of you i'm seeing in the chat are actually dialing in from different parts of the world and different parts different time zones of course uh so very quickly i'll introduce myself my name is devon knight i'm the president of training at pragmatic works if you're not too familiar with pragmatic works maybe you're new to us we are exclusively a training company we don't do anything but training we solely focus on education we solely focus on teaching you how to fish and that's really our methodology at pragmatic works is to teach you how to work with these tools on your own that's really how tools like power automate which are part of the power platform are meant for they're meant for individuals to be able to solve problems on their own rather than having to go engage with maybe a data scientist or a data engineer or someone in it the goal with power automate is that you can solve some of these problems on your own and that's really what we focus in on and our training division is around how you can solve some of these problems on your own i'm also microsoft mvp primarily focused on the data platform side so on power bi azure sql server that's my primary focus but i do do quite a bit with power automate as well in fact i just taught a power automate class yesterday so we do these quite a bit i'm also an author of several books you can find my books of course on amazon uh books range from uh power bi power automates power platform sql server there's lots of different books that we've written over time that you can find on amazon and then i'm also a contributing member at the jacksonville power bi user group the only reason i share that with you the power bi user group kind of needs to re-engage it's been a little while with covent of course but uh the only reason i really share that with you just to let you know that i'm dialing in from jacksonville florida today so i'm excited to be able to share with you all this coming from the east coast of florida i also blog quite a bit you can find my blog at devonnitesql.com on my blog i have as of late have been blogging primarily about powerautomate so you can actually find several newer blogs around power automate and some videos that go into more in-depth topics than really what we'll even have time to cover in today's session and then of course if you're someone that does anything on twitter i tweet primarily about technology you can find my twitter there and you can also email me you can find my email on the screen as well all right so here's what our agenda looks like for today it's a pretty packed agenda we have a lot to cover in today's class but we're going to start by understanding basics of flows so we're really going to begin our session kind of covering what is power automate for those of you that are very new i realize we have people that are joining that have some experience and have some that don't have any experience we need to do a little bit of level setting here early on but we're going to understand the different types of triggers that you have available with inside of power automate what is a trigger to begin with so we'll talk about that we'll also talk about how you can do things like creating flows with conditional logic so how can you make flows run under basically different filters and different conditions that you might want to engage with and interact with we'll also talk about how you can create approval flows so approval approvals if you're not familiar with this is kind of the idea of hey before you do some action i want to have some interaction with a human and give a human the ability to say yes or no to this before they actually move forward with it and then we're also going to look at robotic process automation using the power automate desktop now uh within the power automate desktop this is a feature that allows you to automate some of the more legacy applications that you interact with now i have seen some questions that have come in the chat what do you need for today's class uh well a couple things uh that's actually worth noting here as we get started is one yes this session is recorded in fact you can even rewind this live so if you want to watch me do something again just rewind it with inside of youtube and you'll be able to go back and watch it again so yes this session is absolutely recorded and it will be on our youtube channel going forward so no worries there part of the reason i tell you that is because if you don't have some of the things required for today's session you can have time to go get those things and then come back and watch it again so good news is even if you don't have yourself prepared for the live class today no problem you'll be able to get yourself set up for later uh what you could what you might likely need for today is a power bi assume now power bi power automate subscription that power automate subscription we will be touching on some premium features here and there so a premium level one uh but if you have a trial subscription to power automate that will have everything you need as well so you don't necessarily have to go swipe the credit card right now to be able to participate you can actually sign up for a trial and follow along just fine the last section of our class is uh power automated administration so there we're going to talk about some best practices around using things like solutions how you can kind of follow an application life cycle management interface here where you can move your work from one environment to another environment perhaps you want to move from a dev environment to a qa environment to maybe a production environment we'll spend some time talking about that towards the end of class as well okay all right so first things first for those of you that are new to the power platform i want to talk about what it is why you should care about it and really it can be helpful to know about some of these other members of the power platform that you see on my screen right now now obviously today we're going to be focused on power automate uh so i'll be kind of light on that for this one slide because we're going to spend the rest of our class talking about it but the power platform really has four different members to it which include power bi which is probably the most well known of the tools but it also includes power apps power automate and power virtual agents now power bi is your data visualization tool an analytics tool so whenever you need to be able to build out analytics and reports and dashboards power bi is your tool okay power apps is a rapid application low code development tool meaning you as a business user can actually develop your own applications using power apps you do not have to go to it to get a developer to build your app for you you can do it on your own using powerapps and that's part of the power of what powerapps can do the idea with powerapps would be you could take something that maybe is a very manual or an analog process that you have today where someone's filling out a piece of paper and you can convert that process into a digital process using powerapps again powerautomate will come back to you but power virtual agents the last one power virtual agents is a chatbot tool by the way we did a learn with the nerds on all four of these topics now this uh power automate session today is our last one that we have yet to cover so you're getting that today but we have sessions on all four of the topics that you see on my screen right now if you check out our youtube channel go ahead and subscribe book on the notifications as well to make sure that you're getting notified whenever we post some of these new things as well but power virtual agents is your chat bot tool and power virtual agents allows you to build out chat bots for your websites for your teams for slack perhaps if you're using other applications but you can build out chat bots either for your internal employees or perhaps even for external customers to allow them to interact with a ai driven chat bot it's a really powerful tool now all of the members of the power platform have something in common and that is that they are geared towards the same audience they are geared towards citizen developers and if you haven't really heard that phrase before or heard that term before you can think of a citizen developer as someone that's traditionally thought of as being on the business side of the house not necessarily in it they can be but not necessarily but someone that's perhaps on the business side of the house that's really geared up to try and solve business problems on their own and the technologies within side of the power platform are geared towards those business users to be able to solve those problems on their own using technologies that are really designed for them so that's kind of the idea behind the power platform is it is tools designed for business users to allow them to solve problems that they create or that they have i shouldn't say that they create but problems that they have that they want to solve you don't have to go to someone else to solve them you can do it on your own using the tools on screen here so uh one thing also that all these tools have in common is a layer of data connect connectors so a lot of data connectors are shared across all of these different tools you also have a tool like ai builder that's shared across all of these tools and you even have a database storage feature known as dataverse that you can use to store data that you collect perhaps in a power app that you can then use with inside of a power automate solution and you can even display the data from a dataverse database inside of power bi so you can have data that's really shared across the entirety of the power platform using a tool like dataverse so dataverse is part of and built within side of the power platform as well all right so let's do again and talk more specifically around power automate obviously that's the focus of today's class you can see i have power automate on my screen but we're going to dig into it a little bit more in the coming up slide so i'm going to leave it alone here all right so what is power automate let me take myself off camera here for a moment so power automate is designed to help you minimize some of those repetitive tasks that you have without throughout your day so you you only have so much time in your day to solve problems right time is finite there's only so many hours in a day and if you are stuck doing some of the very repetitive tasks that you may have throughout your day then you are i don't want to say wasting time but you're spending a lot of time on something that perhaps could be automated and so the idea behind power automate is to take some of those more repetitive tasks that you have and build them into a workflow they call them flows in favor of giving you more time for more strategic work so that's really the goal of power automate is to give you more time to work on solving bigger business problems to think about bigger business strategy and so it puts the power to automate also in the hands of those that have the business problems this kind of goes back to the previous slide you as a citizen developer have the ability to create your own power automate solutions so you don't have to go necessarily to i.t to build out an automation for you you can do it on your own and again the goal here is that it's designed to give you the confidence to kind of empower users with more control freeing up it to even work on their own more complex problems it has a lot of complex problems that are on their plate so give them back that time to be able to work on those problems give you back your time after you build out your automations and everyone has hopefully a lot more time to work on more difficult work so the idea behind power automate here is that it's an end-to-end holistic view of automation not only are you going to be able to automate some of your more modern applications that you have but you're also going to be able to automate some of the more legacy applications that you have as well using tools like power automate desktop which we'll talk about in the latter part of today's course so we will get into talking about the desktop application as well the desktop application has a different purpose and a different set of tools a different reason why you would use the desktop application versus the cloud version of power automating we'll talk about that as we get going through our session really the latter part of the day we're going to talk about the desktop flows the morning is going to focus on cloud flows but before we even get to doing any kind of flows we're going to talk about why you would use one versus another in our slide section here all right so again this is kind of repeating what we talked about but the ultimate goal and the vision of the power automate team at microsoft is to make it so that people should not have to focus on tasks that don't necessarily require any unique human value if it is something that you can have one of those birds with water in it kind of hit the button and do it for you then why not build out an automation that can do those tasks for you and that's really ultimately the goal with power automate is to give you back more time to work on other things all right now with inside of power automate there are tons of connectors that are available to you more than 470 different connectors both to on-premises data sources as well as cloud data sources that you have the ability to connect into and automate so if there's a particular type of data source that you're working with or a particular type of sas offering that you're using something like say for example salesforce or say for example dynamics or onedrive or outlook.com you can kind of tie in the various information from those sources using some of the connectors that are available and if there's a connector that you want to work with that's not available you can even build your own connectors so you're not limited to just the connectors that are available to you by default you can even build your own connectors and you can even have those connectors shared with others once you create them as well you'll be able to find there's a connector library where you can find custom connectors that others have created and make it available for you to utilize them as well so a lot of different ways you can connect into data and use it all right let me take myself off screen here again this is probably while it might look like the most simple slide here it is actually a pretty impactful one because here's what i'd like to describe to you on this slide is the difference between cloud flows and desktop flows all right so on the left hand side actually tell you what let's start with the right hand side because this is how we're going to start our class is really the topics on the right on the right hand side this is what you would consider cloud flows okay so on the right hand side is cloud flows okay so when would you design a cloud flow versus when would you design a desktop flow cloud flows are going to be for your more modern applications that have apis so if you're working with an application that has an api you are likely going to stick with using a cloud flow when you're designing cloud flows all of your work is going to be done from your web browser so the designer is your web browser and i'll abbreviate here we'll go to the next line so all of the design development of cloudflows is going to be done from the web browser the other thing that's interesting to note about cloudflows is that they tend to be the orchestration tool or the organization tool for your desktop flows so you can think of cloud flows or your as your organization of desktop flows as well and what i mean by that is whenever you want to schedule or trigger a desktop flow you're going to do that by leveraging a cloudflow okay so we're going to talk about that as we get a little bit later in the day but cloudflows are going to be one to connect into your more modern applications that have apis you're going to be doing your designing of it from your web browser and then this will also be the tool that you use for orchestrating the execution of your desktop flows as well all right now when we think of the other end of the spectrum here these are your desktop flows on the left and when we think of desktop flows think of desktop flows as when you want to automate older applications perhaps you might even consider them legacy applications that have been around in your company for decades right every company that's been around for some time has some old application that you just can't get rid of and it's difficult to build out automations around and so what ideally you could do if you really wanted to automate some of those more legacy applications is you could build out a desktop flow that can still automate it so it doesn't have to be a more modern application to do automations with power automate you can actually do it using desktop flows desktop flows by the way where were a fairly recent acquisition of microsoft a little bit more than a year ago now i believe of a company called soft emotive and that allowed them to integrate in cloud flows and desktop flows together they already had cloud flows for some time desktop flows are a little bit newer to the game but they've already made a lot of enhancements to desktop flows since making that purchase so again desktop flows are for your older applications that do not have apis and so when you want to build out a desktop flow your designer is going to be the power automate desktop okay and again the purpose of using the desktop flows is for the older applications that you have in your environment that there's just not a nice smooth way to connect into it like an api would have all right so if you get anything out of today i know we're only 15 minutes in but if you get anything out of today hopefully it's the that you will understand the difference between cloud flows and desktop flows think of cloud flows as your modern applications think of desktop flows as to the way you automate your more legacy applications all right cool so let's go ahead and move forward so what makes a cloud flow a cloudflow really has two components that you absolutely must have but more often than not you also have a third component that would be the last one you see on the list here so cloud flows always consist of some kind of trigger and we'll talk about what trigger types you can have as we move further along here but every cloud flow is going to have a trigger and essentially a trigger you can think of it as power automate listening and waiting for you to tell it when to run so a trigger is what initiates the execution of your cloud flow it doesn't actually know when to run until you tell it to here so you'll use triggers for determining the execution time of your flows and there's various types of triggers we'll talk about those a little bit more as we go further along but triggers are the beginning point of every cloud flow that you're going to have actions are going to be the things that you want to do so while a trigger is going to start the execution of your flow an action is the task that you actually want the flow to do and so you can have multiple tasks that are part of your cloud flows that you can determine what different actions you want to do what kind of different tasks do you need to do whenever your trender runs and then the conditional logic the one that's above me here conditional logic is things that you can build into your flows to kind of do like if-then-else statements or maybe you want to filter your data down with a conditional logic or there's different things that you can do with conditional logic but it basically allows you to split up the execution of your flow based on some condition that happens so if a certain value is reached then you can have the flow run down one path versus another path so you can set up conditional logic with inside of your flows and we'll see this in action as we go through the course all right so some of the building blocks again are triggers actions and conditional logic and you're kind of seeing that on my screen here don't worry we will actually see that in action as we go through our sl actual demonstrations here in a few short moments but this is actually how you would see it inside of your web browser whenever you're working on cloud flows as you would see an experience that looks something like this now the other thing that you're going to find is when you're new to power automate especially cloud flows there is a nice feature built into power automate called templates and templates are designed to allow you to get a kind of a jump start on using power automate so if you're totally new to power automate what i had did early on is i would search for some of the applications that i was trying to build automations or flows around and so say for example i was trying to build an automation around microsoft dynamics i could search the templates for dynamics and it would show me all of the flow templates that are already designed for me so the great thing about how these templates work is these are templates that are pre-designed by someone else maybe they're by microsoft maybe they're by another user and they've been published off to power automate that give you a little bit of a head start on building out your own solutions and so you can start with a template and then start to modify it a little bit on your own so that's actually going to be one of the first demonstrations that we see that we're going to jump into right now is building our first flow using a template and then we're going to build on that and go much more in depth after we go through that first demonstration all right so let me go ahead and do this i'm going to be launching open my web browser and i'm going to bring it over so we can actually see it here now as a reminder for those of you that may be joined a little late this is recorded so don't worry if you need to catch up and watch some of this again later you will be able to certainly rewind me you can go back and forth you can even rewind me live as it stream through youtube they allow you to kind of rewind right now so you can watch something a second time now the way that i'm going to start and i'm going to take a step back because i this actually signed me in already so i want to take a step back so we can all be looking at really the opening screen here power automate but what we're going to do is i'm going to start by going to powerautomate.com okay and you can actually see it already brought me there this is the home screen for powerautomate.com as of today and what this allows me to do is get started but it also has a lot of information on the different types of things that you can do with power automate so if you scroll down you'll get some good information on why you might want to use power automate some of the benefits that you're going to get from it there's a couple of case studies here that might be interesting to you so definitely explore the site see what might be helpful and useful to you there's also a great community site if you go to the community site you can find a forum there where you can get uh post questions that you might have a lot of good information as well all right but we're going to start by signing in now again i am signing in with my account that i have from pragmatic works if you don't have an account already you could sign up for a free trial your company may block your trial capabilities so if they do block it that's okay there are some other ways you can work around that for instance you could actually sign up for your own trial of office 365 so you can sign up and really kind of build out your own trial tenant and then come to sign up for power automate as your own separate tenant so there's there's lots of ways you can get started if you're if your company does not allow you to sign up for a trial power automate you can kind of even circumvent that and sign up for your own office 365 or microsoft 365 trial and then come in here and sign up for a trial on your own all right but for my case here i do already have a power automated account so i'm going to launch and sign in to my power automate account by hitting sign in it's going to prompt me to sign in here of course so i'll go ahead and sign in using my pragmatic works account and i have two-factor authentication so it's probably going to hit me on my phone to approve this all right we're good oh gotta look at it for one more second there it goes all right we're in good shape all right so i've signed into my power automate account this is your home screen that you see whenever you log into power automate you can see i have some approvals that are kind of prompting me up top here as well the thing that i'm going to be doing for today is i'm going to be starting with an environment that is totally new so i'm actually going to be flipping up to the top here to a different environment that doesn't have anything in it already now if you're not too familiar with the concept of environments you can kind of think of environments as containers that hold your power platform collateral so you can create a new environment uh for instance you can actually go to the power platform admin center and create a new environment and with inside of that environment you can create power apps you can create power automate solutions all of that can be done inside of your environment by the way one of the things i forgot to mention when i mentioned about the power automate trials is you can also sign up for a developer edition if you sign up for a developer edition of power apps for instance it also includes power automate with it and you can do anything you want with inside the developer edition the developer version of the tool at no charge you of course can't use it for production purposes but it does allow you to explore the full breadth of what you can do with both power apps and power automate so the developer edition is a good thing that you can try out i will warn you some companies do block you from doing that as well so be aware of that but in my scenario here i have created an environment and again you can think of an environment as a container where you hold your power automate or power apps work so i have a new solution or a new environment here called power automate learn with the nerds i could have a environment that's called power automate learn with the nerds development power automate learn with the nerds testing and power automate learn with the nerds production and so you can have these different environments that you kind of follow your application lifecycle management work where you can have hey here's where my development work is actually done but then i can push this into my testing environment for my users to test once they approve all of the testing that they've done i can move it in and then into production now i'm getting a little ahead of the game we're going to talk more about that in the last section of the class because really the proper way to do that and to move your work from one environment to another environment is with a feature called solutions and we're going to talk more about solutions really during like the last few minutes of the class so we will come back to that concept of moving between environments the short answer for you on that right now is you're going to do that with solutions but we'll come back and actually show that in action later in the day okay so i am in my fresh environment here that i have and i'm ready to get started and the first thing that we're going to be doing in our example is we're going to explore the templates so i mentioned the templates earlier and how the templates give you a good head start on getting warmed up into power automate and so you can find the template section of power automate right here on the left hand side within the navigation so i'm going to go ahead and go over to the templates area and explore what kind of templates are available to me that i might want to use you can see you're given this big list of templates that are available but what i'd like to do in this scenario is i'm interested in seeing what kind of automations i can build around uh maybe something like posting something into teams so let's say for example i work for a software company that has a support staff that supports our products and whenever we get an email about a specific product i wanted to email me and let me know that i have a support case that i need to go follow up with but not only do i want to email me i also wanted to send me a teams message and so what we're going to do in this scenario is show how i can take an email that i receive and send it to me as a teams message as well okay so here's what we're going to do i'm going to go search up in the templates section for post message to microsoft teams and i'm going to go ahead and search here and i find this one pretty popular one you can see it has 23 000 people that are using this particular template i'm going to select this one called post to microsoft teams when an email arrives in office 365 outlook and so i'm going to go ahead and select this template right here and when i select this template it's going to prompt me and ask me how do i want to wire up my connection information to the template because the template is connecting into various data sources and so if you scroll down to the bottom you'll actually see towards the bottom here i'm going to get off camera here for a moment so you can see this but towards the bottom you'll actually see that there's two connectors that are being used here one to microsoft teams and one to office 365 outlook and so i need to confirm which accounts do i want it to use whenever it's connecting into those various connectors and so i can go ahead and hit sign in and that'll sign into microsoft teams using my account but i could optionally tell to use a different account and then i can also hit sign in into office 365 outlook to make sure i'm connected into my proper account for that as well so this is the experience that you're going to have whenever you first connect to and select a template that you want to use so you can actually select the template and then identify the connectors you're going to need all right so we're going to go ahead and hit continue [Music] yeah this particular one does not require premium this is a pretty simple uh template here no need for premium for this particular one but let's take a look at what it's done for me here so it's built with inside of this template it's going to search my inbox and you can by the way filter to look for certain subject lines or you can have it filter to look for certain attributes or maybe just emails with attachments for example but here's what it does by default so by default it's going to look in my inbox for emails and whenever i receive at the moment any email it's going to send me a teams message now you'll also notice it automatically put some conditional logic in here but at the moment the conditional logic has nothing that's actually happening with it there's no there's no real condition actually it says that the body contains blank so basically it's saying that there's there's something there there's got to be something in my email here so the condition's not really doing a whole lot in this particular scenario but what it's saying here is once i go down once i receive an email it's going to post inside of a team's channel the body of the email for me so what we can do is if we wanted to we can now modify this template that was provided to me and say for example i wanted to look for a particular subject line i can actually come into the trigger that we have up top so this is what's considered a trigger right here my trigger is that i when i receive an email that's when it initiates the flow when i get the trigger of an email arriving i could also say hey i don't want just any email i want to expand and look at the advanced options here and say when i get an email with a particular subject line so when i get an email that says learn with the nerds for instance i'm going to kick off a this flow so not only do i need to get an email in my inbox but it also needs to have a particular subject line all right then if i want that to be posted somewhere i can work my way down to where it says that it's going to post it into a microsoft teams channel or chat and i can determine where it's going to post this so if i want to post it in a particular channel i can select the channel that i wanted to connect into that would actually be right here so i can select the team first so the team that i want to use for this example is i have a particular team called power automate learn with the nerds sorted alphabetically there it is and then i can tell it which channel with inside of that team do i want to post this message and so i can go into the channel selection here and choose which one of the team's channels that i want to post this in so i pre-created a team's channel so we can be able to follow along in this in this particular example but i just have a team with a channel called live event that anytime i get a certain email it's going to send me the body of the email here so i get notified all right so very simple little template this is obviously a very beginner level example that we're getting started with we're going to increase the complexity as we go forward but i'm going to go ahead and save this by going up to the top right so you'll see the save button above my head here and i can hit save to save this flow but by default it is going to save this flow outside of a solution again i mentioned solutions briefly earlier solutions are the way to kind of migrate your work from environment to environment and we're going to talk more about that later but just keep in mind that whenever you use templates oftentimes it will create these flows outside of solutions but you can always add them to solutions later again i'm getting a little ahead of the game we're going to talk more about that later on so don't worry too much about solutions yet all right so i'm going to go ahead and save my work and it's saving it to the cloud it's saving it to my account and then if i want to test this out i can hit the little test button in the top right so in the top right you'll see the test button above my head here and when i hit test it's going to allow me to either choose to do a manual test or an automatic test if you choose automatic that's usually going to look at any prior tests that you've done so if you've done some testing previously it would actually allow you to run based on a previous execution but in this case we're just going to go ahead and do a manual test all right so i'll hit test on the bottom that's actually behind me let me get myself off screen here for a moment so behind me you'll see there's a test button at the very bottom of our screen and when i hit test down on the bottom it's going to get my flow ready to receive an email and you can actually see there's a message on my screen right now right here saying hey go ahead and send yourself an email if you'd like to test out this flow all right so if i want to test this flow out i will send myself an email so i had my email purposely closed because i didn't want to be having email messages during the class today but let me pop it open here for a moment and what i'm going to do is i'm going to send myself an email with the subject line learn with the nerds and as soon as i get that email it's going to pop in and execute this flow all right so let me go ahead and launch this right now i'm doing this on my other screen so bear with me for a moment i don't think you necessarily want to see my email all right here is my email i'm about to send to myself and i'm going to put something in here so uh thanks everyone for joining the class and i'm going to hit send and assuming my trigger is waiting and accepting that particular subject line that's going to be emailed to myself anybody can email me that by the way you could even do it yourself i should receive that email and it should kick off my flow assuming i made my filter proper uh with learn with the nerds hopefully i did learn with the nerds plural and not learn with the nerd singular if i did singular it's not going to pick it up so let me give it a few seconds here and see if it detects my subject line and assuming there it goes so my flow ran successfully it kicked off my email and that actually happened down here uh it actually sorry this is not my email it actually received my email and then kicked off a message inside of teams now if i were to go check my team's messages all right here we go inside of my team's messages you can see right here thanks everyone for joining class today that was received from my email now posted with inside of the team's channel so really cool very basic example but it gets you started with understanding how you can do things when you're brand new to power automate get started by exploring the templates the templates are a great way to get started they're a great way to kind of learn and then you kind of expand beyond those basics once you get going so we're actually ready to go ahead and move beyond those basics right now ourself what we're going to do in our next example is we're going to show you building a flow from scratch and let me set the stage for this next example i'm going to go ahead and back out of this for a moment i'll hit the back button right here that'll take us out of our flow one couple things i'll note here is whenever you are looking at a flow that you have executed you'll actually see in the bottom half here of your screen once you hit the back button this will show you the flow executions that you have so this will show you if you have any flows that are running at the moment right now by the way flows can run up to 30 days long so if you have something that goes 31 days it's then going to stop on its own but you can see all of your flow executions that will show down here at the bottom of your screen and you can actually see previous executions so if i wanted to look at a previous run of this flow i can click on the link right here and it'll actually show me the execution of a flow that happened previously so if you had if this flow had run 10 times you would see a list of 10 different flows here and you can click on any one of them and actually view what kind of parameters were passed in whenever the flow ran if it failed why did it fail you can go look at it over time and see what was going on the other thing that you'll note is when you look at this particular screen is on the right hand side this is where you can also determine who are going to be the owners of your flow generally it's a best practice for you not to be the only person that is the owner of the flow because if this flow is particularly business critical and it fails and it airs out and you're on vacation or you're no longer with the company then what's going to happen right so you want to make sure that you do have at least one other administrator someone else that can come in and kind of monitor this if you're on vacation they can come in and be able to help out uh if there were any kind of failure with your flow execution so keep that in mind okay we'll talk more about that there's more on the administration side we'll talk about that in our last section of our class today all right so this was our first flow based off of a template but i want to show you how to create a flow now from scratch from nothing and the use case that we have for this example is i like to use microsoft forms i'm not sure how many of you like microsoft forums i actually think it's a pretty nice little tool it has some things that are good about it it has some things i wish were a little bit better but i have a microsoft form that you're looking at right now on my screen and it's a registration form for an event it's actually a registration form a pretend registration form for today's event it's not real but i am using it for our use case today because what i'd like to do is i want to enhance what microsoft forms can do one of the major limitations of microsoft forms is that it doesn't actually often send something back to the user that registered on the form it doesn't send them much information and what i'd like to do is i actually want to send back to the person that registers a teams invite or at the very least a link to a team's meeting that's embedded within an email so what i'd like to do in this use case is anyone that registers for my microsoft form i want them to have an email sent back to them that gives them the information about the event where they need to go whenever the event starts what to click on how to get involved within the event that they just registered for and so my form actually collects a little bit of information down here i get their first last name their job title and their email address but what i'd like to do is after i collect this information and they hit submit i want to immediately send them back a email letting them know that they have basically giving them all the information for the event okay so we're going to make this a little bit basic still but i'm going to show you how to create a flow from scratch using this example all right so i'm going to leave my form up but i'm going to go back to our power automate window that i have still open and what we're going to do is we're going to create a new flow from scratch so if you want to create a new flow from scratch there's a couple different places you can go but we're going to go ahead and click on my flows on the left hand side navigation so i'll go ahead and click on my flows on the left and when you select my flows you can see here's the flow that we created a few moments ago from our template and we'll talk about how to name the flows and rename them later as well we just kind of went with the template name for that first example but if i want to create a brand new flow i can do that by going up to the top where you see the new flow button notice here you can also import flows so you can export and import flows if i were to select this one you'll see that you do have an option here to actually export this and it'll allow you to move it from one location to another but what i'd like to do in our scenario is i want to create a brand new flow from scratch so we're going to hit the new flow button and then you're presented with a bunch of different options so let's talk about the options that you see on the at least on the bottom here the options that you see on the bottom actually have several different uh things that you can play around with here several different types of flows you'll find an automated flow and instant flow scheduled flow desktop flow and business process flow so let's talk about what each of these five options are here for a few moments the first one here the automated flow this is a flow that is a listener i like to use that phrase basically meaning that an automated flow is going to have some kind of trigger built in that is listening and waiting for it to be executed so an automated flow means that you have some kind of trigger that could be when someone fills out a form that could be when a new road shows up in your sql database that can be when a new row shows up in your sharepoint list all of those are different types of events that can occur and when that event occurs it will execute your flow so that is an example of an automated flow all right an instant flow the one right below that is one where you have to manually execute the flow itself so by manually executing the flow you would have to have someone that manually pushes a button you can see even the icon shows you that it's almost like someone's clicking a button here but you would have to have someone that pushes a button either through their web browser or even through the power automate mobile app so there's actually i'm pulling it up on my phone right now there's actually a power automate mobile app that you can download and you can kick off and initiate flows from the mobile app so using the mobile app you have the ability to initiate and kick off a flow there are even some third parties that sell physical buttons so you can buy a physical button that someone can push and it will run the flow based on when someone pushes that button so that's kind of like the idea you know amazon has that little button that you can push next to your your washer and dryer whenever you run out of laundry detergent you can push that button it'll automatically order you another thing of laundry detergent that's kind of the same idea with instant flows you can have someone push a button and it initiates some process scheduled flows is probably pretty self-explanatory so schedule flows means that a flow runs based on a schedule okay so that's pretty pretty common sense and then desktop flows are actually something we're going to cover more in depth in the second half of our class so i'm not going to go too deep into those but again remember desktop flows are more of those legacy flows or i should say uh flows that automate legacy applications is a better way of working it so if you have older applications that you want to automate then you're likely looking at desktop flows so we'll talk more about that as in the later part of the class and then finally business process flows are ones uh are basically flows that have some kind of human involvement so think about um the process of closing a deal for a sales person so a sales person likely starts by doing some prospecting uh then they send the customer a quote then they hopefully get approval from the customer then maybe there's a step where they get a po from the customer purchase order from the customer and then finally they close the deal well each of those individual steps that i met just mentioned can be part of a business process flow or a process flow that says all right what process are you within side of a particular um task that you have so if it's closing business if it's closing an opportunity for a salesperson they would have multiple tasks or multiple steps where they can say and and huma and there's human involvement with this where the human can say hey i'm on to the next step in this process kind of thing so think of a business process flow is there is some manual intervention but it's not it's on purpose it's a human actually saying what step they are within side of a business process that you have all right so for our example though we're gonna move a little faster now i'm gonna go ahead and select the automated cloudflow that you see right here and we are going to create a new flow we can really call it whatever we want i'm going to go ahead and name it up at the top here and i'm going to name this let's say send microsoft form registration information and you can really call it whatever you want whatever you name the flow is not super critical but then in the next section here we're going to identify what our trigger is again the trigger is what determines when the flow will actually run and we're basing off our flow our process here is to email our customers when they fill out a microsoft form so that actually happens to be the very first trigger that you see on the list here where it says when a new response is submitted so i'm going to go ahead and select the when a new response is submitted and i'll select that one and hit create now one thing you should note is you can also just skip all this down here on the bottom you could hit skip and that will just take you to a blank design surface where you can build the flow from scratch and you don't have to name it yet you don't have to apply what the trigger is going to be you could optionally hit skip but i went ahead and selected and gave it a name and i selected my trigger here so i'm going to go with that and then hit create all right so for this and uh for this flow that we're going to do and by the way i would share this form with you but if i did that and everyone started to use this form then i'm going to start to get uh dozens of emails that are sent around here so i won't be sharing the form with you if you want to use a form you can most certainly go to microsoft forms and create your own this is just kind of a sample example of what you can do normally i would say hey i'll send you the form but with quite a few people on the line here we'd have a lot a lot of action on my form and a lot of emails going up but what we're going to do is i'm going to tell power automate that which form it is that i want to use and which form it is that i want to connect into and because i'm signed in using my office 365 or microsoft 365 account i can select the form id that i have already created and so i can scroll through and find my power automate form i have a lot of forms that i use but here's the one that we want to use right here called power automate workshop december 9th that's today so i can select that form that i want to use here now one other little trick by the way i'll share with you is if for some reason you have created a form that you don't see listed here and sometimes sometimes that can happen if you create forms that are inside of different groups or inside of different containers you can actually tell powerautomate that you want to use a custom value here and then you can capture the form id the form id is something that you'll see whenever you are logged in as the admin of the form so if i was actually logged in as the admin of the form you'll see in the url up top we're not quite seeing it here but if i was logged in as the admin you would see a form id that you can grab and capture and then plug that into powerautomate as well so for some reason you were not seeing a form listed here which i have experienced before myself you can go grab the form id tell it that you want to enter in a custom value and then paste in the form id so there is a little work around it for some reason you don't see your form but in my case i actually do see the form here called power automate workshop so i'm going to go ahead and use that form that we've just selected and then what i'd like to do is i want to get the details of the person that responded to the form so keep in mind the first step that we have here is that we are just kicking off the flow we are just initiating the flow by the trigger that we have at the very top so when someone fills out the form it's going to start the flow but now in our next step which we'll select the next step button right here i want to actually capture the detailed information of what someone typed in whenever they filled out the form so if we select new step right here we can then search through all of the microsoft form so if we actually just type in form here and search for the microsoft forms category we can see that there is a an action here called get response details so that's going to give us all of the detailed information about the person that filled out the form when the flow was initiated so i'm going to go ahead and select get response details as the action that we're going to use here okay and let me show this one more time i know i did that a little fast how you do this is you can search for the type of thing you're interested in so if i'm interested in form responses i can search for forms and you'll see right here is the same thing get response details but you can if you want you can go to the category of microsoft forms here and then select get response details all right so we're going to use the action called get response details and then we're going to choose the form that they filled out and one of the neat things about how power automate works is you can actually pass values between the different actions and triggers that you have so if i want to pass in what form the person filled out i can capture that information from my trigger so my trigger can actually pass in information from one action to another action to another action if you want it's called dynamic content or at least that's how you're going to leverage pulling in values from one action to another action is using the dynamic content capabilities so the way that this would work is i can actually choose with inside the unique identifier of the form i can go through and i can select the form here individually which i will do in this scenario or there's actually an area that we'll see underneath the response id where i can pass in dynamic content you're seeing that right here all right so the form id that we're going to select is the same form that we had earlier so i'm going to choose the same form that we did in the previous trigger or the trigger above which was called power automate let me go down and find it power automate workshop december 9th all right so that's the form that we're trying to use here but the response that i want to capture is i want to make sure i get the response of the person that initiated the flow and so what you can do is using the dynamic content capability which you actually see pops out right here kind of kind of pops out on the side this will allow you to choose let me take myself off screen for a moment this will allow you to choose values that have come from other parts of your flow so if i want to grab something that actually was initiated in a different part of the flow you can do that using dynamic content so what i'd like to do is i want to capture the response id that actually came from the when a new response is submitted that is the name of my trigger so you'll notice that the name of the trigger is actually showing up in the dynamic content and so that's going to allow me to pull back the response id that initiated the flow itself okay so hopefully that makes sense you can see this matches this so i'm pulling a column or a field from my trigger and passing it into the next item here the next action all right so we're going to go ahead and select the response id we're going to pass in the response id where that was initiated from our trigger and use that with inside of our get response details actions now one of the things that you should probably consider as a best practice is it is common to rename your actions rename your triggers you can rename the items with inside of your flows by hitting the three dot menu in the top right of each of these and you can actually come through and rename these so if you want to make it really clear on what each of these actions are doing i do recommend going through and renaming all these so rename them basically and give them a little bit more context so get response details from power automate workshop something like that and again the reason why that's a best practice is because if someone has to come in and debug your work debug your flow you want them to really know what's going on here you can also add comments in the same area where we just renamed your flow or renamed your action you can also come in and add a note and if you add a note this is usually another area where you can provide a little bit more detailed description some people also like to put in things like their power automate expressions here so they can grab them a little bit easier but you can come in here and add some kind of little description so i can put a description of this action just to give you an example and if i click away you'll notice that that little note appears here for your users so it's really clear if you give a detailed note on what's going on with inside of this particular action so just a little tip for you as you get going it's always good to add in notes by coming over to the three dot menu and then selecting edit note renaming is also another best practice here all right cool so the next thing that i want to do is i want to send an email to whoever fills out that form so to do that i'm going to add in a third action or really a second action the first one's a trigger but i'm going to add in another item here another step by hitting the new step button right here all right so i'll select new step and this one is going to connect into the outlook connector and we want to send an email so i'm going to search for the action called send an email and if we search for that we should find an office 365 connector like you found right here that will will allow us to actually send an email and that's what we would like to do for this example so i'm going to go ahead and select send an email right here and you'll notice the new action gets created now we have to determine who are we going to send the email to this is another area where that dynamic content is going to come in handy so if we expand the two section here if we expand the two section this is where we can plug in and select the add dynamic content button and say that we want to send this email to whoever originally filled out our form which we should be able to get from the get response details action here so again we're going to use dynamic content grab something from this action and send it in to our next action all right so if we select add dynamic content you'll see right here is exactly what we want there was a question with inside of our our registration page where we asked our users for their email and so i can grab the email field and plug that into the to line to allow this to be sent to whoever filled out the form all right then for my subject line i can really put whatever i want in the subject line so i could say something like thank you for registering for the power automate workshop okay and then you can come in and build out the body of your email now to save us a little time there is a pretty nice little editor here where you can actually bring in some html so if you wanted to you can even have some html pre-written like i have right here so i have a bunch of pre-written html to save us some time and i can copy and paste that and bring it in using this little button right here where it says code view if i click on that that will allow me to either write html or copy and paste html into the editor or i can also just use the regular port editor features here to be able to write my own email if i wanted to but because i've already written a lot of the email and i have things like a microsoft teams link that i want them to click on i'm going to click on the code view button and you'll see that this brings me to an html editor that i can paste in my code and so i can paste in my big long piece of code that i have here and then flip it back using that same button that's now located right here i can flip that back to the regular view so take it off html view so if i do that again and that'll flip it right back to how it was so i've now included in the email that's going to be sent to my users some details about the course but i've also got in here a teams meeting link that well they can click on and that will take them to the teams meeting for this class i have alright you can also see there's some dynamic content that i had in here you can you'll notice in some cases it might not pick up the dynamic content quite properly when you copy and paste like this so i could remove that dynamic content and i could re-add it if i wanted it here so i could actually re-add in the first name of my attendee and make it so that whatever the name was that they provided whenever they filled out the form i'm going to address them by their name with the email i send them so if i go ahead and select that you can see the dynamic content plugs in here quite nicely and this is ready to go so i'm going to have an email sent to whoever fills out that form with the details of the course which is something that microsoft forums by itself does not really do a great job of frankly all right so i'm going to go ahead and save our work in the top right and once we save our work i'm going to test it out so i'm going to hit the test button in the top right here again way up top here i'll go ahead and hit test and we're going to do a manual test meaning i need to really i could do either one because i'm going to have to have somebody go fill out the form for me i will fill it out myself here in just a moment but i'm going to go ahead and do a manual test hit test and it's now waiting for someone to submit the form so you can even see right here it's telling me the next thing that needs to happen someone needs to go submit a response to the form for me to be able to test this out all right so if i want to do that i'll go back over to my form and i'll put in some information here i'll put in my name i'll put um developer whatever i want and then this is my actual email if you want to email me later you most certainly can but i'm going to put in my email address here and then hit submit and then as soon as i hit submit i am expecting that my form is going to uh be uh actually my my flow is going to be triggered from the insertion of a new record into microsoft form so if i go ahead and hit submit here let's go back over to our form or to our flow i mean and then i'm expecting that my flow should execute at any point there it goes you can see that in the top right hand corner of my screen that the flow ran successfully and the email sent out as well so if i go look at my email in my inbox i should see the email that i just sent myself so this is the email that we just sent it brought in the dynamic content for the name it has the nice teams meeting link in here so my users can click on that and they have all the information they need to go ahead and get started with this course on the the date that it's supposed to happen so again kind of upgrading what microsoft forms can do microsoft forms can't really do that by default it can't embed a team's meeting link so i can make a flow that does it for me so pretty cool all right hopefully you think it's cool as well all right so i think this one is done we've gotten this flow to run we can always hit the back button to see the execution of the flow so if we hit the back button right here this will take us to a view of the flow we can see that it actually executed the flow down here on the bottom it took 28 seconds it ran successfully and you can go look and actually if you want to see that particular execution just like we showed before you can click on this hyperlink and that will take you to the same view we were looking at a moment ago that shows you the flow execution and we'll talk more about kind of debugging flows and how do you deal with error handling and things like that a bit later in our last section but this is where you can go to see the executions themselves all right cool let's step up our game some now so let me give you another scenario we're still in cloud flows in this next scenario but in this new scenario i want to introduce a new potential problem all right so at pragmatic works we have a service called virtual mentoring i recommend it it's quite nice what virtual mentoring does for our customers is it allows them to come to us with problems that they have and you can buy a bucket of hours and you can meet with one of our trainers and you can share your screen and we can actually work through particular problems that you might have so check it out if you're interested in virtual mentoring it's a great service that we have and it helps a lot of people bust through roadblocks that they may be having but one of the things that we have to worry about at pragmatic works is how do we assign those requests when they come in we have a group of trainers and some of those trainers are more experts in certain topics versus other topics and so i want to make it so that whenever a new mentoring request comes in that it only gets sent to certain people and i want to set it up so that for me in particular that i only get requests for power automate i only want to know if there's a power automate request that comes in if it's not for power automate i don't care about it get it out of here i don't want to know about it but if it's for power automate i want to make sure that sends an email to me so that i'm notified that i need to reach out to this customer a customer about scheduling some time to meet to solve the power automate problem so the way that we are managing it at least for this scenario is through a sharepoint list i'm sure many of you use sharepoint lists as data sources and that's great you can absolutely do that but what i'd like to do is i want to wire up this sharepoint list to make it so that any time there's a new mentoring request that comes in that i get a email sent to me notify me of that request if it's something else i don't care about it don't tell me about it i only care about power automate all right so the way that this form works is this is just a basic sharepoint list that i have it's a sharepoint list and what i can do is if my manager gets a request for a new virtual mentoring session they would come in and they would select new in the top left this is again just a sharepoint list the one thing i have done to the sharepoint list i've made a few customizations like i've made the color hair change dynamically i also have whenever you hit to create a new item in this list it actually uses a different style form it uses a power power apps form instead of the standard form but if i click new on the right hand side it's going to pop out this form for me and in this form i can enter in the request so i can say who is the company that's making the request so uh let me put in another uh you can see my my previous customers here are customers that no longer exist so i'm gonna go ahead and type in another customer that no longer no longer exists we'll call it blockbuster video yes i did work there when i was in college so blockbuster video i can say my customer name was devon knight i can say my customers email and i can put what kind of requests they had so if it's power bi they can come in and type in power bi if it was power apps they can come in and type power apps and when is the session supposed to occur and then add in the description so i'm going to put this is going to be a garbage record i'm just going to insert this just so we can see what the process is right now and when i hit save it's going to add that record into my list it also has a little bit of a an expression on this list to build out the session name here all right so this is what happens whenever someone goes to interact with the form uh with the list i should say and so i want to make it so that i have a flow that captures anytime a new value is inserted into this list and if it's power automate i want to be notified of it all right so let's go work our way back over to power automate and we're going to go back over to my flows again over here on the left so i'll go ahead and select my flows and we're going to create a another new flow so i'm going to come up to the top and select new automated flow and the reason why it's automated this time is because we want to automatically initiate this flow whenever there is a new road that gets inserted into our new item that gets inserted into our list so if a new item shows up in our sharepoint list we want to automatically kick off this flow so that's why it's an automated one all right so we're gonna go ahead and select automated cloudflow and tell you what this time just to be a little different i'm gonna hit skip on this part but no i could come in here i could name the flow i can pick out my trigger now if i wanted to but just to show you a slightly different experience i'm going to hit skip on this this time all right so i'll hit skip in the bottom and the first thing that it's going to ask us for is what is our trigger it's also waiting for us to provide a name you'll notice up at the top right now it has no name so let's go ahead and name our flow we'll come up to the top here where it says untitled and we will rename this flow something like let's say new mentoring request notification all right so when we get a new mentor request on our sharepoint list we want to be notified all right so our trigger in this example is going to be a sharepoint trigger so we're going to search for sharepoint there's also a sharepoint category that we could have selected right here as well and then you'll see there are all sorts of different sharepoint triggers that you can work with now the one that we want for our example is the one on the very top when a new item is created you could also alternatively or optionally say when a new item is created or modified so if you wanted to be notified not only when a list item is created but also when it's modified you could select that but in my scenario i only want to be notified when it was initially created so i'm going to select the very top top option here called when an item is created that'll be our trigger and then we're going to specify what sharepoint site we are trying to use so where is the sharepoint site that we're trying to connect to to pull back and by the way this is sharepoint online this is a cloud version of sharepoint but we're going to go ahead and say that we want to look at the site called training which i have right here called training 46 so i'm going to pull from my training 46 site and we're going to go ahead and select the list name from that sharepoint site so first you have to tell it the site name then we're going to tell it the list that we want to pull back from so the list that i want to use in this scenario by the way i have a lot of lists that you can see here the list that i want to use in this example is called mentoring requests all right now i am actually first going to show you this using a not best practice and so if you if you're maybe familiar with one of the bad practices i'm about to show you hang tight i will show you the better way of doing this in a few moments but i'm going to show you kind of the the not as ideal way of doing this first and then i'm going to circle around and show you the best practice as far as how to do this because essentially what we want to do is we want to filter the results so that way anytime someone goes to fill out the form we check what kind of request it is we want to look at this column right here and know what type of request is being made is it power automated is it power bi now there's a couple different ways that we can it could be powerapps as well i think somebody could request that there's a couple different ways you can handle this and i want to start by showing you using conditional logic because one i want to introduce you to the concept of conditional logic but then i'm going to show you that's not necessarily the best practice in the way that we should do this but i want to introduce the concept of conditional logic because i think it will be helpful for other things that you might do but then we're going to improve on this after we show you conditional logic we're gonna make it better all right so first things first let's go back over to our flow and we are going to add in a condition now a condition is a way of splitting up your logic it's a way of splitting up the flow execution and it's going to have to your your flow execution is going to have to meet some requirement that you check it for that you haven't checked for so we're going to go ahead and add in another new step right here so we'll hit new step and we're going to search for a conditional function or a conditional action which you should see on your screen already it's right here it's the fun one really the default one because it's used so frequently it's the one you'll find here first so we're gonna go ahead and select condition and i'm gonna take myself off camera here there we go and what we want to do is in the condition which is right here we want to make a certain request we want to make a certain filter check and what i'm going to do is i'm going to come into where it says choose a value and we're going to have it search for some dynamic content so when you select choose a value you'll see the dynamic content box pops out right here and what we wanted to do is we wanted to search for a particular column the column that we are interested in is called request or requested topic so we're going to search for the requested topic column or field and when that requested topic value is equal to power automate and by the way you can say is equal to you can say contains is greater than or equal to uh does not contain there's a lot of different things you can do in this but we're going to say when the requested topic is equal to power automate then if that's evaluated to true it's going to go down the left path if it's evaluated as false it's going to go down the right path now if it's false i don't really want to do anything with it because this is just for me so i'm going to leave it alone and i'm not going to do anything if it evaluates to false but if it's true i want to send myself an email or maybe a teams message notifying me of the request so we're going to come down to the box here that says if yes right here and we're going to add an action with inside of that box all right so we'll go ahead and select add an action and the type of action that we're interested in here is going to be an email action just like our last example so we're going to type in send an email and we're going to use the send and email version 2 action found right here okay all right so i'm gonna go ahead and select that as well underneath send an email there we go and that chooses to send an email action and we can do something similar to what we did before now because i've created this flow just for me i don't really have a dynamic to line i'm just going to plug in my own email address here there we go i'm going to put in some kind of subject line so i can say this is a power automate mentor session and then if i want to make some dynamic content in here i could actually go look at uh let's see let's look at our our list here for a moment if i go back over to our list maybe i want the session name to show up in the subject line of my email so i can grab this right here as dynamic content that i want to bring into my email yeah let's do that so i'm going to go back over here and we'll say the email subject line is going to be power automate mentor session and then we're going to put the session name in there as well all right then we can come down a little lower and in the body of our email we can start to make some dynamic content in here as well so maybe i say something like who the customer was we can also put in their email address maybe we want to see a description of the problem they're trying to solve and then i put little labels in here but now i can actually add in the dynamic content of who the customers uh what the customer's name was so i can get their name right here and again i'm bringing this from the dynamic content you see over here on the right i can bring in their email address so i can grab the customer email and i can also grab the description these are all fields that came from our trigger so i'm using the items that came from here and i'm now injecting them down in the latter parts of our flow all right all right cool so now that i have that this is looking pretty good i'm going to go ahead and save our flow so i'll go to the top right and hit save right here all right and then we're going to test this out so i'll hit the test button in the top right really i don't even have to test it if i just go to insert another value it'll work but i kind of like using the test option because it will tell me if i did this as a test rather than as a actual execution so i'm going to go ahead and hit test in the top right tell what i want to do a manual test again and then hit test in the bottom okay let me show you that one more time we've done this a couple times now so i'm doing a little faster we're going to come in the top right and hit test hit manually and then hit test on the bottom all right so now when i do this it is waiting for me to insert a new value into sharepoint so it's monitoring sharepoint it's listening to sharepoint waiting for a new value to show up there so i would need to go back over to my sharepoint list if i want to test this out and insert an actual new value all right let's see what other fake company name or maybe other retired company name i can come up with here i'm going to go ahead and do another new record and this time i'm going to go ahead and plug in we'll say the company name is let's go with enron we're going to pick a really dated company name here we'll say that the customer's name is jacob i'm just making something up here i want to make sure i get the email so i'm going to plug in my email address here actually i should get the email regardless so we're going to say jacob enron.com and then the subject matter is power automate the date i can put a future date in here if i wanted to i'll just leave the default and then i can add a description i can say needs help with power automate desktop close all right then if i hit save it's going to load that record in the list and you can see my flow is already running it didn't wait very long at all my flow is executed and already completed and sent myself an email and if i go check my inbox here's what we just got sent i got sent an email with the subject line that had some dynamic content in it with the session name it has the customer's name their email and the description of the session so now i know i need to go reach back out to jacob i probably should have put the date in here as well actually the date's right here but now i can reach out to jacob and say hey unfortunately your company doesn't exist anymore i'm not sure we can help you anymore so we can kind of play around with it like that all right so that's how you can build out a flow off of a sharepoint list so pretty cool stuff there now if we wanted to and we want to validate that hey this is working even if we put in something that does not say powerautomate we could do that as well we could actually insert another value into our list that is not power automate and we would expect that our flow would run so let's actually let's check this out let's do this one more time let's test this again all right we're going to test this one more time but this time i'm going to insert a value that is not power automate so i'm going to come back into my list and i'm going to go ahead and say that this one is toys are us they sort they don't i don't think they exist anymore uh we'll say that um jeff is the person i'm trying to email or jeff is the person that wants mentoring i will say at toys r us dot com they're requesting uh some help with powerapps and the date is fine and we can put in any description we want because we're not going to get emailed this and so if i hit save this time you can see the powerapps entry gets put in you'll see my flow runs again however the flow goes down this path so because it did not evaluate to power app power automate excuse me because the condition was not met it never went down the left path it went down the right path instead you can see this item right here it's even kind of indicating to you was never run and so instead of running down the yes path it went down the right path of no and nothing happened all right so i told you early on that i was going to show you this example but i kind of even told you in advance that this is not necessarily the best practice or the best way to do this really the better way to do this is to use something called a trigger condition so you can actually build conditions on your triggers to make sure that the triggers never even execute unless that condition is met so let's i'm going to go ahead and edit this flow again and ideally what i'd like to do is i want to get rid of this condition because right now what's happening is no matter what someone enters into that list that sharepoint list my flow runs every time every time my flow runs it just determine my condition just determines whether or not i get emailed or not the better practice here would be to implement something called trigger conditions and what triggering conditions would do is it would apply the same filter that we're doing right now at the condition level but on the trigger and the benefit of that happening is it would mean that your flow would never run to begin with if that condition is not met and the reason why that's helpful to you is because uh power automate does work on a number of executions that you have so if you're unnecessarily executing your power automate flows it could eat up a little bit of your licensing we're not going to get super deep into licensing today but if i can save myself those executions and prevent this flow from even running if the condition's not met that's a good thing so what we want to do in this example is we are actually going to get rid of some of the work that we've done thus far we're going to replace some of what we have on our screen already we're going to get rid of the condition we're going to get rid of this little if then else thing we have going on and we're going to move our send email action we're going to grab this and we're going to move it up here you can move these things around if you wanted to so i can grab this and i can move it up here okay so if i wanted to i can shift that out of the condition and i can delete the condition by going over to the let me take myself off screen here we can delete the condition by going to where it says menu for condition and we can go ahead and delete it here if we want to get rid of it because we're going to replace this condition filter in a different way so i'm going to go ahead and delete it yep get rid of it and so that leaves us just with these two steps that we have now so what we want to do is ultimately we want to change our trigger and in the trigger itself we're going to come into the menu for the trigger and we're going to modify the settings now we're not quite ready to do this yet because we actually need to write a little bit of a power automate expression to make this work but in the settings area what we're going to modify is we're going to add in a trigger condition which basically determines whether or not the the trigger itself will fire off so we want to prevent the trigger from or in really the flow from even firing off if our condition is not met okay so how do we do that how do we get the expression to plug in here because we need to actually plug in a power automate expression to make this work now there's a lot of different ways to write expressions but if you're not super familiar with how to write expressions one of the ways that i tend to do especially if i want to plug them into a trigger condition is i will use a action called a compose action so real quickly what a compose action is going to do for you is it's basically kind of like a placeholder it doesn't have to really do anything but what the compose action is going to allow us to do is write this expression and we're going to use it as kind of this blank workplace so that we can write our expression and then we can copy and paste that expression into our trigger okay so we're going to add an action called compose and then at the end we're going to go ahead and get rid of it but basically i need the ability to write out a little expression i could technically do it in the send email action there but i want to show you a different way of doing it so we're going to go ahead and add in another new action we can either do it at the top or the bottom a new step i should say and so i'll add in and insert a new step and we're going to add in a new action right here and the type of action that we're going to use is the one i mentioned just a moment ago called compose so i'm going to type in compose and again think of compose as just a little playground where you can write expressions you can keep the output of the expressions you can delete the output of the expressions you can do any whatever you want with them but in this case we're going to use it as a little a little bit of a expression editor for us and then we're going to get rid of it all right so we're going to go ahead and select the compose action that you see right here so i'll go ahead and select that and then inside the compose action we are going to write some dynamic content so inside of the dynamic content section we're going to add an expression so where you see the expression section right here this is going to be our first introduction into power automated expressions it has its own expression language but we're going to expand the expression section and what we're going to be looking for is an expression that will allow us to evaluate whether or not the requested topic column is equivalent to power automate so this expression language is a little funky it's a little different than maybe things that you might have seen in the past so kind of i'm going to take myself off screen so you can see it but but just kind of pay close attention what you'll find is that there is a good document library for power automated expressions in fact i'm going to share this with my colleague who is on the call with us here that's actually sharing information so he can put it in the chat for you but he's going to share with you a link to a reference guide for the formula language for power automate so take a peek at that save it into your resources for later but for the purposes of our quick little demonstration here we're going to be using an expression that evaluates something to be equal to a value so there's actually a function in here called equals let me zoom in on this for you so there's an expression in language or a a function excuse me called equals and you can see that there's some intellisense here that's trying to help us out a little bit but we're going to go ahead and plug in equals here and then i'm going to do an open parentheses and what i'd like to do is i want to pass in a column or a field to evaluate whether or not it is equal to a certain value now the way that this works is you can kind of hop back and forth between the expression tab and the dynamics content tab or the dynamic content tab so what we're going to do is we're going to go into the dynamic content tab for a moment and we want to check and see whether or not the requested topic column which we'll scroll down and find way down there it is we're going to plug in the requested topic column into our equals function that we're seeing above so we'll plug that in right here and the reason why we did it this way is because look at all this other stuff that gets added for us so it's kind of difficult like i do not have all that stuff memorized so and i don't expect you to memorize all this stuff that gets plugged in here as well but whenever you select dynamic content in a particular column you're going to get some extra information or some extra details that come along for the ride and so rather than you trying to memorize all of that information this is basically telling you that it's coming from our trigger it's an output from our trigger but rather than you memorizing it you can use the dynamic content section here to leverage it now the end of this at the tail end of this expression you can actually tell it with a comma you're going to tell it what is the value that you're looking for so we are looking for the value of power automate all right and i'm gonna actually provide this to uh jonathan my colleague who's in the class with us here i'm gonna provide that link to or that expression so he can put that in the chat for you but essentially what this does is it's checking to see if the requested topic column is equal to power automate and you'll notice that i have the single quotes around the power automate column because it is a string column or a text column we need the single quotes around it here okay so with that i'm going to copy this expression that i just wrote and then i can get rid of the compose expression uh the compose action the really only the reason i needed this compose action is so that i could pop up this expression box and write that little expression here one little tip for you and you don't necessarily have to do this but one little tip that you might want to take advantage of is if you are if you like living on the edge if you like exploring new features there is a much better editor than the one that we just saw here uh the better editor that is in at the moment in preview in experiment mode in experimental mode is there is an option that you can turn on in a different editor and i'm not going to actually do it right now but i'm going to show you where you could do it because if i if i were to do it i would lose all my work here but if i go to hit the little settings cog right here in the top right way up here oh i really i did a really bad job of boxing it off there we go right there if i were to hit that settings button up in the top right you'll see underneath the view all power automate settings don't actually do this because i'm not going to do it but if you turn on the experimental features there is a much better better expression editor that's available to you it's actually the same expression editor that you have whenever you use another tool that's similar to power automate called logic apps that is the uh more enterprise version of this tool it's part of azure uh but if you turn on that little cog that are the little on off switch that you see on the screen right now again don't do it right now do that on a little test environment later on but that has a much better expression editor that's a lot easier to work with so just a heads up on that i'm not going to do that but i want to point you in that area in case you are interested in that uh it's a better it's a way better editor frankly all right so our compose action that we have right here remember i told you that was temporary we only wanted this so that we could extract out that expression that we wrote earlier and i've already copied and copied that expression so i'm ready to take that expression now into my trigger so i'm going to go ahead and delete this action and i'm going to go back into the settings of my trigger so if i go into the settings of my trigger right here okay if i go click on the settings found right here i can apply a trigger condition which means my flow will not even run unless the condition is met all right so we're going to go ahead and do a setting or go into the settings we're going to come down to where it says trigger phrases or trigger conditions to my left here to my side and i'm going to go ahead and select that we want to add in a trigger condition all right now for this trigger condition i'm going to paste in the expression that we copied a few moments ago but the one trick to this to make it work is you need to prefix your expression with an at sign so i'm going to need to go to the very front of this and add in an at sign here jonathan if you could post that in there in the chat one more time the same expression just with an at sign in front of it that ad sign is how you have to identify conditions that you're trying to equate with inside of your triggers so keep that in mind you need the little at sign in front of the expression that we created and generated earlier but once we do that i can hit done and now we're all set you can see we've eliminated a lot of the work here we don't have things that we had previously we don't have a condition in here anymore that condition was kind of unnecessary we have now replaced that and made this a lot easier to work with so i can hit save and now whenever i go to run this or test this flow so we can go ahead and test it again you guys have seen how to test it a number of times now so i did the test a little faster this time but i have this now set in testing mode so if i were to go insert another value into our sharepoint list if it does not meet the condition my flow is never going to run it's only going to run if i were to put in power automate as the requested topic so just to test that out i'm going to go ahead and add in a new [Music] request and we'll say that this uh this one is gonna come from let me give you another old company name here we'll go with uh compact compact all right and then my user is gonna be sandra and we'll say sandra at compact.com all right the requested topic for sandra is going to be power bi which means my flow should not run and then my description can be whatever i'm going to leave that alone and then go ahead and hit save so i'm expecting my flow will not run now remember these flows ran pretty quickly so i should see if it were to run it would run right away but we're not seeing anything happen right now so that's a good thing so my flow never even ran because my trigger condition was never met but if i were to add in another request let's make this one pragmatic works hopefully not a company that's going anywhere the user name will be devin the email will be myself and we'll make the request topic power automate spell it right and then we'll give it some kind of description okay then when i hit save on this it should run the flow right away so we'll give it a moment or two here there it goes and then i should have received an email with that request so the whole purpose of that demo and i can pop open the email that it sent me here let me bring that up here for a moment just got it here it is here's that request but the whole purpose of this demo is really to highlight some better efficiencies that you can make with inside of your flows so rather than using conditions to try and filter down the results try and use trigger conditions to be able to filter your results and you can do equals like i did you can do greater than you can do less than there's a lot of different types of condition statements you can implement i just happen to do an equals two value in this in this case all right well cool we are at a point i want to go ahead and give you a break you've been listening to me for almost an hour and a half now let's take a ten minute break and then when we come back we're going to continue on and i have one more cloud flow demonstration and then we're going to move to desktop flows all right so i'm going to put a 10 minute timer on my screen i'll see everybody back here and get started back and then again i want to thank everyone for joining i know it's a oh i'm kind of blurry let me see if i can fix that sometimes having to refocus the camera might fix it oh i'm still so blurry that's a bummer let me sorry one more time sometimes it has to refocus oh it's a little better still blurry all right that's okay so uh oh there we go now i'm better all right so i want to thank everyone again for joining if you're just joining back in halfway through today's course i appreciate it you can as a reminder this class is recorded you can go back and watch parts that maybe you missed earlier if you're just jumping in live this is recorded you can go back and scroll back watch me do things multiple times if you'd like absolutely no problem doing that i also want to take a just a moment obviously this course is free today we'd like to kind of share a little bit about what we do at pragmatic works in case maybe perhaps we might be able to help you in the future as i mentioned pragmatic works is solely a training company all we do is training that is our sole focus and we do training in a lot of different ways we have recorded training through our on-demand system our on-demand learning portal has 70 different courses which range from courses on the power platform like power automate and power apps and power bi as well as azure and sql server uh we also have uh live talk classes so if you prefer to have live training we do live training through our boot camps our boot camps can be either taught just privately to your organization or we also have public boot camps that can be found on our website we actually happen to be running a power platform boot camp this week actually today's the last day of the power platform boot camp that we're running but we'll have another one coming up next year so if you like to have kind of a class that's hands-on that is a small class we usually keep those and limit those to about 15 people to make sure that it's not overwhelming and everyone can interact check out our boot camps on our website we also have another offering called hackathons and hackathons are a really neat combination of education but also applying what you learned so what hackathons allow you to do is we always start with a hackathon with at least a one day training class so we want to teach you some of the basics of a technology whether it be power apps or power automate or power bi or even azure we start with a one day class on the topic that are what we're hoping to build a hackathon around but we after we get done with that one day let's say power automate class the next day is then focused on actually building a power automate solution with your ecosystem with your environment with your use case more most importantly and so the goal with that is to take some of the things that you learned in the training class and actually apply it to your life to your data because there's nothing worth in it worse than attending a training class right and you and everything work works hopefully perfectly in the training class but then you go back to your desk to try and take some of the things that you learned and apply it to your solutions and it just doesn't work because things are different well that's where a hackathon kind of solves that problem where we can actually build something with you we also have larger packages for people that have not just hundreds but even thousands of people to train so if you have a lot of people to train we have some custom options around our customized enterprise training which is designed not only to train a few dozen people but even hundreds or even thousands of people so we have some uh some some good case studies on our site some video interviews where we've done with people where we have done this work with them before where they had thousands of people they needed to train we have good programs kind of manage that because not everybody learns the same some people can learn with recorded training some people prefer to have a live instructor and we have packages that kind of help everybody and then finally i mentioned this offering a little bit earlier is our mentoring service and our mentoring service allows you to meet one-on-one with one of our experts and you can share your screen with them and show them a specific problem that you're trying to have or that you do have and so the way that this works is you buy a bucket of hours and you can use the bucket of hours and and little as 30 minutes of it at a time or at maximum two hours a day and so that allows you to kind of set time aside and solve a specific problem that you have with an expert on the technology and they can get you bust through any of those road blocks that you might be having now all of these are great offerings but i will tell you we happen to have a special on the on-demand learning right now on our site if you go to pragmaticworks.com you'll find in the banner that there's actually a half off price that's going on for our on-demand learning so check that out on our website i definitely encourage that that's a great way to learn especially if you like self-paced training so you can watch whenever you have free time take a peek at that on our home page of our website at pragmaticworks.com you'll find where you can sign up for our on-demand learning that's 12 months it's a year subscription at half off okay all right well thank you for your patience through that another reminder as well if you're just joining us make sure you subscribe to our youtube channel also hit the bell for notifications to make sure you're notified when we do additional videos like this or even other types of videos that we do in the future all right so our plan to move forward here is we have two major topics that we're going to do going forward and i saw a lot of excitement for approvals in the chat so i want to make sure we cover approvals before we wrap up our day in fact that's going to be the next topic that we cover is how to build approvals and we're going to do that in the context of the example that we've already been walking through our example of using a sharepoint list as a data source we're going to add approvals into that particular example and so what i'd like to do is take the flow that we've already designed that has a sharepoint list as a source and i'm going to set up and define an approval now for some of you that might not be familiar with what approvals are here's a basic definition of approvals approvals allow you to inject human interaction into your automations so that's a that's kind of a high level definition of what approvals can do is what you're trying to do with an approval is you're trying to make sure before some action occurs that a human approves or rejects it happening so for instance looking back at the flow that we've created so far maybe i want to make the flow that we've designed so far have an approval right here where someone says yes or no to whether or not i want to send that email to my user okay so before this email gets sent i want to inject an approval here that says yes it's okay to send that or no it's not so high level think of approvals as injecting human interaction into your automations that's the basic definition of them and what we're going to see next is how we can do that all right so we're going to follow along with this flow that we've already designed so far so that way we don't have to design something else from scratch and i'm going to go ahead and edit this flow in the top right i'll click the edit button and what i'd like to do is i really do want to do what we suggested a moment ago is i want to inject in the middle of our flow a new action and this will be an approval action and we're going to talk about the different kinds of approvals you can do and the different types of ways you can initiate an approval as well so we're going to go ahead and say we want to insert a new step in the middle right there all right so i'm going to go ahead and select to add in a new step and we're going to add in a new action right here now we're going to say and approvals are a pretty common feature so you'll actually see approvals once you start to type them in we'll pop in here really quickly so if you type in approve or even approval you'll see approvals will pop up right here but what you will notice is there are three different types of approvals that are showing up here for us so let's talk about these here for just a moment you'll see these three approval types you have wait uh sorry sorry uh you have start and wait for an approval you have create approval and you have wait for an approval now what start and wait for an approval will do is it will begin the process of having that human interaction and it's going to sit there and wait until the human says yes or no yes i approve it or no i reject it so the way that the approval will work is by default it's going to run and wait for someone to interact with it what create an approval will do is it will create the approval the approval will start but the flow will continue until you follow it up with some kind of a weight so you can actually split up the first one so the idea of the second two is essentially splitting up this and this apart from each other so it's making it so that you can start an approval but not actually wait for the approval to complete somewhere later on down the line so you have the ability to kind of control that behavior so that's what these three different options do start and wait just start or wait for a later time okay so you can split those different actions up now for the example that we're going to do in our scenario we're going to follow the the start and wait for an approval action which again that's going to start our approval start injecting our human interaction and then wait for the human to actually do something so that's the method that we're going to use for our example so we're going to go ahead and select that we want to start and wait for an approval all right so i'm going to select that option you can see that the approval is then injected in the middle of our flow and then what we want to do is we're going to select the approval type so if we look a little carefully here and look a little closely at the approval types you'll see there are four different options that are available to you so let's talk briefly about these different options that we have you have a plu approve slash reject everyone so everyone must approve you have the first person to approve so let's talk about these two first before i move on uh so approve or reject everyone must approve what that means is you can send the approval to multiple people so maybe you send it to five different people and if you have it set to everyone must approve then that means all five people have to give you the thumbs up before the approval will move on if you select first to approve or first to respond that means of the five people whoever the first one to respond to it is will allow the approval to move forward okay so this one means all five people have to accept it this one means just one of the five have to accept it and then you could also do some different custom messages in here if you wanted to or some custom responses we're not going to get too deep into that but these standard ones are really the most common ones that you'll do anyways but what we're going to do for ours is we're going to select that we want to approve slash reject based on the first to respond that's the second option right here okay then you're going to give your approval a title so this is basically what's going to show up in the approval whenever it is either going to appear in microsoft teams so microsoft teams actually has an approval section now many of you are probably already familiar with that it'll also send your approvals to your inbox to your email but whatever this the title is here is what it's going to appear whenever it's sent to you in either teams or outlook and so we're going to make our approval here and we're going to call this something like learn with the nerds approval and if we wanted to we could even put something like the session name in it so i can grab some dynamic content and i can inject that dynamic content into the title if i wanted to so i'm going to go ahead and do that there you go all right then you have to determine who do you want to send the approval to now i got a little bit of bad news for you when it comes to the assigned to in the assigned to section you do have to do individual email addresses this unfortunately does not tap into azure active directory and it's not able to grab groups there which is kind of a kind of a big bummer at least that's how it works right now as the moon as the moment of us doing the session this does not accept active directory groups however what you would do instead is you would have to plug in individual emails of those that you want to receive your approval so if i want devin to receive it if i want jonathan my other colleague who's on the line with us to receive it i can put in each of those individuals that i want to receive the approval okay yep and unfortunately kind of a bummer i can't just provide a group of users i have to provide them individually that's kind of a downside of it at the moment all right then if i want to come down a little bit more i can provide some detail so what kind of details do i want to embed in the approval itself this is where you likely would leverage some of your dynamic content there's also a markdown language that if you follow this link right here you can find what kind of other things you can do in there like how you can format it where you can have bullet points how you can have a numbered list there are different things you can do within the approval the details of it if you go to that a markdown language site you can kind of see what the different ways are that you can format the details that are returned back but in our use case here what i want to do is i'm going to put in something like please approve or reject the following mentor request and then if i wanted to i can come in and say all right well what we want to plug in here is the session name let's type it right session name and i can put in the session name for my dynamic content i'm going to zoom out for a moment so you can see the full context of my screen here but i can grab the session name from my dynamic content i can maybe plug in something like the description and i can bring that in here as well so this is all coming from my dynamic content same as we did in our previous example and then i can bring in something like maybe i want to have a link to the actual item so you can actually put in right here in a link to where it can be found so there is a link right here in the dynamic content a link to the sharepoint list so if i put the link to item i can put that into my dynamic content here if i wanted to and it will give my users a link they can actually click on if they want to go see more details of the uh of the the the details of the request here and i might also want to put like the date in here so there's a lot of other things i can go in detail on here but i'm going to go ahead and leave it as that i'll put the date in here we'll wrap that up but that's my my approval that i want to send my users all right so that's really the basics of it but what do i do with the outcome of the approval so now that i've created this approval what do i do next the next thing that i want to do is i want to actually determine well if it's rejected do i want to send the email or if it's approved do i want to send the email and by default the way it's going to work right now is i don't have anything that basically blocks whether or not to continue on with the flow i want to add in something actually something that you've already seen a condition right here is where i want to inject a condition and in that condition i'd like to add in the ability to check whether or not the approval outcome was set to approve if it was set to reject then i don't want to do anything with it but if it was sent to approve then i want to go ahead and email the user to notify them of the request all right so if i want to do that if i want to set up a condition in here this is going to follow a similar pattern to what we did in our previous example actually like two examples ago we're going to add in another action right here and that action is going to be a condition so i'm going to go ahead and hit add in action and we're going to do a condition condition is found right in front of us right here so i'm going to go ahead and select the condition once we select the condition you're going to see that same split that we saw in our last example so you have your condition up at the top if the condition is met it's going to go left if the condition is not met it's going to go to the right and so what we're going to do is we're going to sell tell it with inside of the condition that we want to look for the outcome you'll find the outcome right here we want to look for the outcome of the approval and if the approval was set to approve then we want to send ourselves the email if it was set to reject then we don't want to send the email so we're going to go ahead and select in the choose a value section the dynamic content that's right here for the outcome alright so we're going to select outcome and if the outcome is equal to approve make sure you type approve and not approved you have to make sure you do it uh with just an e on the end don't do a d if you do it with a d it's not going to work uh same with uh uh the the opposite so you want to make sure you say approve or reject here but then once you type in that you want to look for approved status of an outcome then if it is approved it will go down the left path if it's not approved it's going to go down the right path and that's where we can grab our send an email action and drop it into whichever area we want it to be in so if i want to send an email action to be on the approved side then i would go ahead and bring it into the if yes section here okay and that's a pretty basic approval but let's see it in action if i go ahead and hit save okay so that's going to save our approval you can see it says it's saving up top and now it's done saving now we can test it out so we'll go ahead and hit test we're going to do a manual test again all right so now it's waiting for us to trigger off our flow which is going to be based on us inserting a new value into our sharepoint list so i'm going to go back over to my sharepoint list here and we're going to insert another value this time we're going to make this the company of we'll do um i don't know i'm trying to i'm trying to come up with companies that don't exist uh let's do that don't exist anymore uh let's dear do like sears robot i'll do sears yours is still around i feel bad for you i think they're sort of still around uh we'll say from sears it's going to be judith oop i'll spell judas name right and it's judith at sears.com all right and she is interested judith is interested in learning about or having a mentoring session around power automate so we'll type in power automate here and then we could add in a description we can say something like uh i am interested and learning about approvals all right then when i hit save that's going to add the row to my sharepoint list so i'll go ahead and do that and it should kick off my flow all right so let's watch it should kick off my float any moment now remember we use the power automate filter criteria so it should run just fine and it's started and stopped in approval now approvals are likely going to be sent to you in one of two ways i mentioned this earlier they're likely going to be sent to you in microsoft teams but they will also be sent to you through your inbox so if i go look in my microsoft teams section i can see through my approvals app that i have an approval sitting here waiting for me actually that's not the right one here it is here's the approval popping up here so this is the approval section within side of microsoft teams it's actually i'm looking in my activity feed and here's the approval that we sent ourselves learn with the nerd's approval sears at judith for today here's the request you can see the approval app actually popped up here in the bottom now and i even have a link so i can go back to the sharepoint list and look at it if i wanted to so it's waiting for me to choose whether or not i want to approve or reject this approval so i can choose which route i want to go by the way you'll notice here that it's got sent to both jonathan and devin so you can see that here and you'll also be able to find the same approval showing up in my inbox as well now it looks like someone approved this jonathan i'm going to assume you you might have hit the approve button here because i see the approved status went through so i'm going to assume jonathan did it in fact actually yes i have documentation jonathan's trying to sabotage me here i'm kidding jonathan you're fine uh but jonathan actually approved this just a moment ago and so once it got approved if i went back to look at my flow you can see my flow completed and remember my flow ends by sending me an email so i should have received this email as well so if i go look in my inbox sure enough here's my email from my mentoring application my mentoring list telling me about judith's request for a mentoring session about approvals so using and leveraging approvals allowed me to kind of have a little bit of a gatekeeper here so i added in and kind of had a gatekeeper determine whether or not i wanted to actually have this flow to continue to go forward ooh i'm blurry again i'm seeing here i'm gonna take myself off camera if it's gonna be blurry so uh that allows me to kind of have more control to be able to inject information to have more available uh more interaction between my my automation and my users that are leveraging and working with it okay all right yeah jonathan went rogue i see i see uh i don't see too many of your comments unfortunately while i'm doing the session but i glance over occasionally and jonathan definitely went rogue on that one just kidding jonathan you're good that was actually what i was about to click anyway so you saved me a second or two by doing that for me all right cool so the next piece that we're going to transition a bit into here i'm going to hope that i'm on blurry when i uh no i'm still blurry golly all right let's take myself off camera if i'm going to be blurry so the next section here that we're going to look at though is we're going to transition from talking about cloud flows to starting to get into desktop flows so desktop flows aren't something that we've looked at yet we've talked about them a little bit in the slides i will actually bring up my slides for just one moment because i do have one or two slides around the power automate desktop the power automate desktop is a separate application that you'll actually install on your machine and if you remember back to what we discussed early on there's going to be some specific use cases on when you do a desktop flow versus a cloud flow so the thing that you're going to keep in mind when it comes to desktop flows and cloud flows is cloud flows are going to be used for your more modern application uh that you're trying to automate and then desktop flows are going to be used for more of those legacy applications that you don't have a very clear api that allows you to build out automations around so that's really the differentiator whether or not you choose cloud flows or desktop flows and it looks like my camera's behaving a little better now so i'll put myself back on camera i know you are really eager to see me so i'll pull myself back on camera but that's the big difference desktop flows are going to be for those more legacy applications that we all know a lot of our companies that have been around for decades have and we just can't get rid of because they're so critical to the business we want to build automations around them but we have just not a great way to inject automation capabilities and that's where power automate desktop comes into play now power automated desktop is an application that you will need to install on your machine some of you may not have that for today and that's okay you can come back and watch this section again later and do it on your own the other thing that if you would like to participate and jonathan's going to share a link in the chat for you here in a few moments is i'm going to be showing how to build an automation around a legacy application that's actually part of a larger class that microsoft has called rpa in a day in fact jonathan and i actually taught this class just yesterday and what rpa stands for in case you're not familiar with that is robotic process automation so he's going to share a link in the chat to these class files that if you download them there's a lot of extra supplemental material that will really be helpful to you if you're interested in learning more around desktop automations and he i can see he's put some links in the chat there for you actually that that references for a different piece but he'll get the chat the link to rpa and the day files in there here in just a moment so uh in that class you learn about how to build out desktop automations automations that can can basically uh take the the older applications you have and bring them up to date even if you can't get rid of them you can still make them more of a modern application in some way so what power automate desktop does for you is it gives you a graphical interface for building out your automations through a desktop client so there is a desktop client that you will need to install on your machine to follow along with this one special note is that future versions of windows i believe even windows 11 if i remember right but somebody can correct me if i'm off on this even future versions of windows are going to have the power automate desktop automatically installed on your machine so they're making power automated desktop as a regular windows application that is there whenever you install windows in the future so what you're going to be able to do to power automate is build out these automations you can have error handling in them you can actually call on other scripting languages like powershell you can call on vbscript you can do python in here you have debugging techniques that you can do but at its simplest level you can do pretty easy low code drag and drop design of flows through the desktop application and so that's what i want to show you in our next section which is going to focus around building out automations through the desktop experience all right so let me go ahead and take this off my screen oh i thought i had actually i might have not been sharing my screen for a moment it was just one slide talking about the power automate desktop so it's okay all right but here's what we're going to do is i'm going to now share my screen the proper screen here and we are going to be at least for the moment done with the web browser so i'm going to minimize the web browser for a moment i'm going to get teams out of the way we will come back to the web browser experience in a little bit because one of the things that i shared with you early on is that if you want to be able to run desktop flows you will oftentimes have to integrate them in with cloud flow so i'm going to show you that experience as we get moving along as well all right so first things first i am going to be launching the application on my machine called power automate desktop so i'm going to go ahead and go to my start menu and we're going to launch power automate not power bi but power automate desktop so the desktop application when you open it is going to require you to sign into your power automate account now to be able to build out power automate desktop solutions there is a prerequisite that your environment that you're working with also has a dataverse database so i'm kind of feeding you some of the prerequisites to working with the power automate desktop here is one you have to make sure you have a dataverse database within the environment that you're working on and the reason why that's a requirement is because you have to be able to have the metadata for your automate solutions stored somewhere and so the database database stores the metadata of your automations in that cloud database okay so that's just one of your prerequisites is you have to have a dataverse database in your environment now i'm going to go ahead and sign into my account so i'm going to sign in to my pragmatic works account you can of course have a trial where you can sign up as well as well i will note that there is an extra level of licensing that you need to be able to do rpa or power automate desktop you'll want to look at the power automate licensing website and you'll see there's another level of licensing for rpa so keep that in mind as well all right i'm gonna go ahead and sign into my account and my two factor authentication is gonna pop up on me let me open up my phone for a moment for that all right we should be good now all right so this is the opening screen that you see when you launch the power automate desktop when you first see this this is going to show you your list of flows that you have already designed now at the moment i don't have any flows because we're kind of kind of starting from square one here but if you saw if you had any flows already previously created that would be desktop flows you would see them listed here so you're only going to see desktop flows created here when you go to look from the web browser and you look at powerautomate.com you'll actually see both desktop flows and cloud flows both showing up in the web experience but if you ever want to edit a desktop flow it's going to go back to your desktop application and launch that application for you to edit the desktop flows all right sorry it's a little confusing there's a lot of moving parts to this but just note that you can see that desktop flows exist when you're looking for the web browser you just can't edit them from the web browser okay so our first step that we want to do is we want to create a flow now before we just jump into creating a flow i want to share with you our use case for this example for this example we are going to be automating a legacy application that i have on my machine and it's uh it comes from the rpa in a day class that which jonathan shared a link to the class files for that you'll actually be able to find this application in those class files but the application that we're going to be using is going to be called contoso invoicing and so this is an old application there's not really any api for it it's been around with our company for decades and we just can't seem to stomp it out and get rid of it so we've we've kind of uh threw in the towel a little bit and rather than trying to get rid of it replace it we are going to finally build some automations around it so that way at the very least we have much less user interaction that has to happen with it so what i'd like to automate with inside of this application is me entering in invoices so right now whenever i want to enter an invoice into this system i have to go to the invoices node right here so i would select invoices then i would come up to the top and i would say that i want to create a new invoice right here so i would select new and then i would enter the information for my invoice so i could provide a date if it's something other than today's date i could provide the account name so i can add in devin's donuts or something like that i could put in devon's donuts by the way are really good i'm just gonna let you know that uh the contact i can put in whoever the contact is and then i can plug in my amount and i think the contact is actually supposed to be an email address it looks like all right then i can plug in the amount we can say that it's uh 56.89 then say that it's been invoiced and hit save all right so everything that i'm showing you right now is not power automate this is just a legacy application that i would like to automate and i showed you the experience that my users have to do right now anytime they want to insert a new invoice and so i want to make that experience a lot better for them i want to try and automate some of these things for them and so what i want to do is automate those steps that we just did i want to even automate launching the application so rather than my user having to open the application power automate desktop is going to open the application for me rather than entering in an invoice the automation or the flow is going to enter the invoice in for me okay all right so let's flip back over to power automate desktop now and we're going to start by creating a new flow so you can either hit new flow up on the top or you can hit new flow down here on the bottom whichever your preference is either way go ahead and hit new flow now when you do that you do want to keep an eye on your environment i am actually pointed right now to an environment it's called power automate learn with the nerds and that environment does have a dataverse database part of it if the environment that you have selected does not have a dataverse database you will not be able to create power automate desktop flows so that is again a requirement that i mentioned earlier i'm just kind of reiterating it now so if you hit a roadblock that could be one of the roadblocks that you have another roadblock could be the licensing level that you're using uh here as well all right so we're going to go ahead and create a new flow now and once we hit new flow we can give the flow a name so let's go ahead and call this flow enter and invoice all right so this flow is going to automatically enter in invoices for us so we'll go ahead and give it that name and then hit create and ultimately what we're trying to do is we want to automate the process of launching the application and entering in that invoice for us so we'll give it a few moments what you're going to notice is it's going to launch a new interface for us so this is a totally new window that we're seeing here now and the window that it's launched open here for us is the editor or the designer for the power automate desktop now a couple things i want to point you point out to you here as we're looking with inside the tool uh first thing that you'll notice is on the left hand side are the actions so this is a little bit different than cloud flows it's actually a lot a lot different than cloud flows because whenever you want to add an action you will likely end up using this little search bar on the top and search for the action that you want up there because there are more than 400 different actions that you can choose from so it might be most beneficial to you to actually search for the type of action you're interested in in the action section up on the top here otherwise you're going to have to kind of siphon through all of these different actions here and find the ones that you want and it can be a little difficult to find the ones you want if you have to search through all these actions on the left but the action search bar will be a lifesaver for you or a time saver really in the middle of your screen you have your workspace so this whole middle area right here is where you will actually start to drag and drop in the various actions that you want to use so anytime you find an action that you would like to use with inside of your flow you can either double click on it or you can drag and drop it into the design surface in the workspace that you have in the middle of the screen okay you also have this concept of subflows so up at the top here you can see that we have a subflow drop down box and what the reason why you might consider doing subflows are let's say for example you want to compartmentalize some of your work so you want to uh maybe yeah let's go with compartmentalize i spelled that wrong we're going to say i'm going to say it out loud because i'm terrible at spelling but you want to break up your work as another way of saying it okay so if you have a rather large flow a flow that has dozens of steps maybe even 100 different steps to it that can be as you can imagine really difficult to be able to figure out what's going on within the flow so if someone else were to pick up the flow after you and your flow has a hundred different steps in it they're going to really struggle to figure out what the flow is doing so subflows really help you kind of package up and compartmentalize some of your work break it up into smaller chunks and then you can have your main flow that would be right here run those various subflows that you create the other benefit of creating subflows is you can have sub flows run multiple times with inside of your main flow so if you want to loop over a certain set of actions or if you want to basically just run your flow multiple times not maybe not even necessarily in a loop but you can have a sub flow run multiple times within side of the main execution of a flow as well so there's a couple different reasons why subflows are helpful i actually have a video on our youtube channel don't forget to subscribe but i actually have a video on our youtube channel that talks specifically about subflows and i spent about 15 minutes talking about nothing but that so if you're really interested in subflows check out that video on our you pragmatic works youtube channel all right but that's the reason for subflows we're not going to create these subflows in this example today but you at least know the why they're there the other thing that's worth highlighting is on the far right you have i'm going to zoom in on this for a moment on the far right you have three different tabs unfortunately i didn't want this ui elements piece to pop up so ignore that for just a moment but you have three buttons on the top right one is for variables one is for something called ui elements which is right there and then the other one is for images alright so let's talk briefly about these three different items i'm going to zoom in again without having my mouse hover above that so variables as you can imagine are used to make your execution of your flows dynamic so if you want to be able to pass in dynamic values if you want to be able to extract dynamic values you're likely doing it with variables we're going to talk a little bit more about variables later so i'm not going to go too deep into them yet but we will cover variables a little bit more as we make this example i'm going to show you more and more complex but for now just understand that variables are your way of making your flow executions dynamic okay below that is the option i mentioned called ui elements what ui elements allow you to do is capture and rename even the different elements with all within the applications that you're trying to automate and this will make more sense as we start to go through an example but ui elements are basically the things that you click on whenever you are inside of the application whenever you go to click on something whenever you go to type within a text box those are all considered ui elements and they're basically pieces and parts of a ui design of an application and those are captured there and you can rename them you can change them you can do what you want with ui elements you'll see a little bit more about those as we go as well and then images the last one here images is where you actually anytime you go to click on a ui element it will capture a picture or an image of that ui element as well and you may or may not want to keep those images you may want to delete certain images if they have for instance private information in them you can come in and actually delete or remove images if it captured them and you didn't want it to all right so looking good here but we're going to focus first on creating a very basic example that will automate the entry of an invoice into our application that we looked at a few moments ago so to get started the first thing that we want to do is we want to launch that contoso invoicing application so if we want to launch a contoso invoicing application we can do that by going up to the action section on the top left and we can search for launch or actually excuse me run application and if you search for run application that'll take you much more directly to the action that we're interested in here and we're going to drag and drop or you can double click but we're going to drag and drop the run application into the workspace design surface here now as soon as you drag and drop that action into your design surface you're going to have a pop-up that comes on your screen that we see on my screen right here and with inside of that is where you will configure how what what application is actually going to be launched so what application is going to run so you can navigate to your application right here so right here you would select what the application is that you want to launch you would likely use this little file navigator button right here and that'll allow you to navigate to the application you want to run so you would go find the executable for the application here and so we're going to go ahead and select that same button where it says select file and we'll select the file for the application we want to run all right so i'm going to go ahead and select that and then i'm gonna go navigate to where my application is stored mine happens to be in my program files x86 folder and it's also within side of my let's see x86 oh right here contoso incorporated contoso invoicing and then i have the actual application right here so there's a legacy invoicing application this is the application that i would like for it to run whenever this flow gets executed all right so i'm going to go ahead and run the legacy invoicing application here and you can see here's the file path where it found where to run it by the way if you download those class files that jonathan shared with you earlier jonathan if you don't mind poke put the link to the class files for the rpa in the default class again if you find those files or download those files this application this is actually in those files and you can follow this example later as well so you can re-watch this if you'd like and you can run through this example again later and whenever you install the contoso invoicing application it usually installs it in this exact same place all right so now what i'd like to do is i want to tell it that i want to go ahead and launch the application and i'm going to save this action right here on the bottom now before i do that i want to highlight one other thing is that you can notice right here that there is a variable that is going to be created automatically for me and this is going to be created in the flow variable section right here now what a flow variable is is it's a variable that's created internally with inside of this flow and it is only going to be used with inside of this flow as well so flow variables are not accessible outside of this flow however the other types of variables which we'll talk a little bit more about later these can actually have entries that can be accessed outside of the flow execution so for example you can pass in a variable value from outside of the flow into the flow whenever it actually runs but flow variables are just kind of for internal use with inside of the flow itself so what's happening with this flow variable that's being created is it's creating a variable called app process id which is going to store the process id for the application that we launch and the reason why that's really helpful to me is i can use that same variable later to determine which process it is that i want to terminate when i'm done running the flow which is it that i want to close which application do i want to close whenever i'm done running the flow so by capturing this process id it ensures that it closes the same application that we launched in the beginning even if we have multiple contoso invoicing applications opened it's only going to close the one that we opened initially so pretty cool all right so we're going to go ahead and hit save and that will create this first action to run our application if we want to test this out you can save the flow you can hit the save button up on the top here and if you want to just test this initial part out which i'm going to go ahead and do you can hit run and take your hands off the keyboard i'll explain that here in a moment but when you run the application or when you run the flow it's going to run the different steps that you have on the workspace area so in this case the only step that i had was to run the application and so it launched the application here for me now one of the things you'll hear me say quite frequently as we go through this last 45 minutes of using the cloud the desktop flows is that you i'm going to recommend whenever you go to test to flow or you run a flow take your hands off the keyboard and mouse because there is potential that you could interfere with what the flow is actually doing so you might hear me say that multiple times every time you go to run the flow take your hands off the keyboard mouse let it do its thing otherwise you could actually interfere with it there is another way of executing these desktop flows through a different mannerism called an unattended execution which means that you don't you can run these flows without someone being signed in and that is another way to prevent someone from potentially interfering with the execution of the flow we will talk more about that later all right so now that i have my contoso invoicing application open i want to actually build out the flow the steps the things that i'm going to do here the actions that we want to automate and so one of the easiest ways to get started with this is to use the desktop recorder that you see right here you'll also notice there's a web recorder as well if you wanted to automate some kind of a web automation but in our case we want to automate a desktop application so i'm going to select the desktop recorder which by the way kind of looks works very similar to a macro recorder if you've worked with one of those inside of excel so if you've ever done like a recording of a macro in excel this is very kind of similar to that experience so when i select the desktop recorder it launches this new window on my screen and actually cleared the power automate desktop it minimized the power automate desktop for me but it does show the desktop recorder on my screen as the primary application i also see my contoso invoicing application on the right hand side here as well and when you're ready to get started you can click on the record button found right here right there and that will start to record all of the clicks that you do every time you interact with the application so if i click on the record button notice now whenever i go to my application that i want to automate check this out look at this red rectangle that starts to appear within my application so within my application you're seeing this little red rectangle and what that means i'm not actually going to click yet but what those red rectangles indicate is each time you click with inside of one of these rectangles it's going to capture that click in the recording and it's going to automate those clicks that you do all right so if i wanted to go to invoices i would click on the word invoices here you'll see the red rectangle around invoices and if i go to click it you'll notice on the left hand side that it captured me clicking on the text invoices and if i wanted to create a new invoice i would come up to the top here where the new record button and i would click on new record and that will record me clicking on the image for the new record so it's recording all of the different clicks that i do then i can go work my way over to the forum and i can click with inside of the date field here so if i wanted to potentially change the date i want to record me clicking within the date field and then one thing that i like to recommend that you do is be very deliberate with how you move from from one area to a form to another area meaning what you would probably do if you were doing this in real life you would probably hit the tab key and that would take you to the next element of the form and that does technically work with power automate but i like to recommend you get in the habit of very deliberately clicking within each section of the form so if i were to click on amount here now and type in a new amount let's say i typed in something like 899.95 it's going to record not only me clicking within that area but also me typing in that specific text and again i recommend that you very deliberately click into the next area of the form rather than hitting the tab key all right so i'm going to go ahead and click on contact i'll put in and plug in my email address here now and then i'll go down to the amount oh i made a mistake you guys probably already spotted it so if you ever make a mistake like i just did you can actually backtrack here in the recorder i'm sure you guys spotted the mistake i made but i accidentally typed in the account i typed in the amount instead of the account so if you ever make a mistake i totally did that on purpose you can go over to the desktop recorder and you can eliminate those steps and kind of backtrack back to where you were so here i can backtrack back to where i was i can go back into click into account and i can type in a new account name here rather than what i had so i can type in pragmatic works instead and then i can type into the contact and i'll make sure i collect my uh typing of the email address in here properly as well all right i made a little boo-boo but i think we've corrected that here hopefully so let's see i think it actually did a little extra work i'm going to remove that step i don't think that was a necessary step that was me highlighting a value i didn't need it to record that i spell pragmatic works around that's okay i'm not worried about that but then under the amount we'll go ahead and type in that amount that i had earlier 899.95 and then we're going to mark the status here as invoice all right once we've recorded all of those steps we can hit finish in the desktop recorder and that will take all of those clicks that we just did and bring them into the power automate desktop so now in the power automate desktop you'll see all of those clicks that we just just did are now showing up within side of the desktop application so every one of those clicks is now in here and if i wanted to i could actually run this desktop flow and see it enter in that information again so i went ahead and closed the contoso invoicing application so that way when the very first action goes it'll relaunch it here so let's try this out i'm going to go ahead and save this and i want to make sure that the recording that i did was done properly because i did make a little boo-boo there that i had to go back and fix so let's go ahead and run this and see what happens this time so if i run this i'm going to take my hands off the keyboard i'm hoping that it's going to click on invoices then create a new invoice then enter in the new information and it looks like it did that properly alright so we've got the skeleton of what we want our desktop float to do it's just kind of hardcoded everything it's manually entering in the account in the contact and the amount all of that is going to be it's kind of hard-coded in our flow but our next step that we're going to do is we're going to actually build in some variables so we can make these values that we see right here dynamic so i want to dynamically pass in the account i want to dynamically pass in the contact email and dynamically pass in the amount using variables so we're going to end up replacing these with variables here in a few moments but we got the initial flow working so the initial flow when we run it it actually does pass in those hard-coded values so we got a good start all right so let's talk a little bit about variables and making these things dynamic if i wanted to make a variable so that i could influence and make this dynamic there's a couple different ways you could do it you could actually go ahead and edit this action and make the variable directly from within inside the action or you could actually go over to the variable section found right here and you can create your own variables i'll take myself off screen here for a moment you can create your own variables within the variables menu on the right hand side now you'll notice there's two different really three different kinds of variables you'll see flow variables right here and you'll see input and output variables above that i described flow variables earlier but just a quick repeat of what flow variables are these are variables that are only accessible with inside of your flow and generally you'll find that they are automatically created for you whenever you design the flow so that the flow itself whenever you're designing it will oftentimes automatically create those flow variables for you the other kind of variables here above that input and output variables i would consider these user defined variables [Music] so these are variables that you are going to define yourself and you're going to define them as either input or output variables to that so that way you can determine whether you're trying to input values into the flow execution or are you trying to extract values out of the flow execution so that's kind of the purpose of the input and output variables and that's these are ones that are going to be user defined by you all right so if i want to create a couple flow variables actually i'm going to create several flow variables we're going to create a total of four variables uh but three of them are going to be input variables and one of them is going to be an output variable so to create our first variable we'll go ahead and click the plus sign right here okay i'll hit the plus sign and we're going to add this as an input variable you can see here though you can choose input or output but we're going to go ahead and make this into an input variable the first thing that you'll want to do is you'll want to go ahead and name the variable now you'll see there are two properties here that have to do with names you'll have variable name and you'll have external name all right very briefly the difference between those two the variable name is the name as it will appear within side of the flow so whatever you name the variable name is what you will see it inside the flow however the external name can be something different the external name is what's going to be used whenever you go to connect to this flow from other applications like for instance if i were to run this desktop flow from a cloudflow i'm going to see the external name there so the external name is what's seen outside of the flow itself all right so you can have these have different names they can have the same name it really is just up to you all right all right so we're going to go ahead and rename this variable and i'm going to call this one uh let's call it a var for variable and i'm going to put var in because it's an input variable and we're going to call this amount so var and amount i'm going to make that my variable name and i'm going to also make that my external name here as well you can optionally give it a default value i'm going to go ahead and give it some kind of default value so that way when we're running this it actually brings back something so i'm going to put in 695.87 something like that so i have a default value to this variable as usual anytime you see a description field you should absolutely fill it out am i going to do that and waste time in our class probably not but if someone were to come in and look at your flow after you it should be it would be very helpful if you actually provided descriptions of each of your variables so i do recommend you come in and add some kind of good description in here to give your users or your developers that are coming in after you some idea of what the flow is doing or more specifically what this variable is doing all right so i'm going to go ahead and hit that and hit create one one last note here you'll see mark as sensitive that would be if you're trying to pass in certain like user credentials so if i had like a username and password and i didn't want that to be shown in plain text you can mark that variable as sensitive and then you can pass it in to authenticate to various applications that you have and it will pass it in encrypted so that you so that nobody can come in and actually just see the username and password so if you were working with sensitive data like that you may mark as sensitive here all right so i'm going to go ahead and hit create and create our first variable you can see our new variable above my head here so that new variable has now been created and we can start to leverage it now like i told you that we're going to create several other variables so i'm going to create three more we're going to add another one by hitting the plus button right here this time and we're going to select input again and this variable that we're going to create is going to be our contact so we're going to again call this var n var oh okay oh i'm typing on the wrong thing it's right here var n and this is going to be var in contact and then we're going to give it some kind of email address to use as the default value we will also give the external name the same name as the internal name but we're going to give it a default value of let's do my email address again all right and again i recommend you add a description but for the purpose of this we'll go ahead and hit create because i got two more i got to create here all right so when i hit create on this all we did on this one was we gave it a variable name an external name and we gave it a default value all right then i'll hit create all right we have one more input and one more output variable we're going to create so i'm going to come back up to the top right and hit plus input again and this variable in this case we're going to create is going to be our account so we're going to go ahead and type in the name of the variable here's going to be var in account uh by the way me typing in var n is optional that's just a kind of nomenclature to make sure that i know it's a variable and it's an input variable but you don't have to type that in you could just call this account if you wanted to i'm going to give it a external name that's the same although they can be different and then the default value that i'm going to plug in here i'm going to make it uh let's do pragmatic works this time and then i'll hit create all right so we have three input variables we're now going to create one final variable this one's going to be an output variable that's going to give us something back and the thing that i'm trying to get back from my application is i want to extract out the invoice id here so whenever i go to insert the invoice it generates an invoice id for me so i want to pass in some information about the invoice and then what i'd like to get back get back out as an output variable is the invoice id so that's why we're trying to create this input and output variable uh interface here all right so we're going to go ahead and create one more final variable again that's going to be back up here in the variables menu we're going to hit the plus sign and we're going to add in an output variable so this is the first one we've done is an output variable so it's going to be a little different this time in fact it's actually easier uh in this case there is no default value there you're not trying to plug in anything so there's no default value all you have to do really here in this scenario is you're going to provide a name a name of the variable so we'll call this var out and we'll call this invoice i by the way you cannot have spaces in your variable names i forgot to mention that no spaces are allowed so we're going to call this invoice id and i'll copy and paste that name down to the external name all right so once we've done that i'll go ahead and hit create and we have all of our variables created we set the stage for really making this dynamic now we did a little bit of the pre-work there now we're going to go through and make some additional swaps with inside of our flow to actually use that variable now before we go to use the variables one thing i do recommend that you do is change the ui element names and here is why that can be really helpful if you're looking at our flow execution notice what we have right here edit text box edit text box two edit text box three edit text box four how in the world are you supposed to know which one is which so what i recommend that you do is pay a visit over to the ui element feature above my head right here that's right here i recommend you to pay a little visit to the ui elements section and rename each of those items so that way it's really clear on what each element actually is the nice thing about this is whenever you go to the ui element section here and i'll take myself off screen for a moment the nice thing about this is as you go into each of these sections the reason i took myself off screen is you'll notice there is a screenshot that was sitting behind me and this screenshot actually shows you what the different clicks were doing and where you were whenever you clicked on them so this is why you may in some cases want to remove some of these screenshots because they could be capturing sensitive information but in my case it's fine i don't need to make any change here but what i do want to do is i want to rename these so i want to note that this is the date and that text box 2 is the account and text box 3 is actually bringing back the contact and text box 4 is bringing back the amount so you can rename these ui elements by selecting them and then clicking on the three dot menu found right here and that will allow you to rename these ui elements so if i click on that i can select that i want to rename the ui element right here so i'm going to go ahead and select that and i can give it a name now if i like the fact that it's identifying it as a text box i can leave text box in here if i wanted to and i can say text box uh date and i can come down here and i can rename this one and i'll call this one text box and we'll call this [Applause] text box underscore account something like that so i can kind of continue to go forward and i can rename each of these i'm not going to rename all of them but i want to show you this is definitely a best practice to come through and rename each of these so that way you can more easily understand what's going on with your flow you'll notice every time i go to rename something it's also renaming it in the flow over here as well so see here see here so that way it's just a lot easier to actually identify things i still need to do one more right here but it makes a lot easier to find the different elements that are within side of your flow all right so we'll go ahead and rename this last one then we'll move on just know you could rename all of these different things here so i'm going to rename this last text box and we'll call this one amount all right cool so now that we've renamed the ui elements i can more easily look at the design surface here and understand which each of these steps or what each of these steps are actually doing and so what i'd like to do is i want to rewire each of these steps that we see right here and right here and right here to replace the hard-coded text you can see this is actually just hard-coded values that were typed in and rather than using the hard-coded values i want to switch them out for my variables so i want to use the account variable i want to use the contact variable and i want to use the amount variable to replace the hard-coded text that we have in here so that's the next step that we're about to do so if i want to replace those hard-coded values here's how we can do it all you have to do is you can double-click on the action that you created you can also right-click on it and select edit both will work but i'm just going to go ahead and double click on the action and when you double click on the action it will launch open the editor on the screen here where you can actually replace what is hard coded in the original definition of the flow so when we originally defined the flow it hard coded in some values but now we want to replace them with some dynamic values from our variables so the way this works is you're going to see the hard coded text right here and if i want to get rid of that hard coded text i'll just backspace it out and then you can replace it with a variable value right here so if i want to replace it with a variable value i'll go ahead and hit the select variable and i'll find the variable that i want to replace it with so if i want to replace this textbox account with my var in account variable found right here i can double click on that variable name and it will play replace the hard coded text with my dynamic variable so go ahead and double click on that and there you go so there's my new variable that's replacing the hard coded variable we had earlier all right so we'll go ahead and hit save on that and you'll also see that new variable appearing right here as well okay so we're making things dynamic here that's the whole purpose of what we're doing alright the next step that i want to do is i want to do the same thing on this next action that has my contact email so again you can either double click or right click on the step and hit edit and we're going to replace my hard-coded email address which i happen to type wrong anyways with my dynamic one that's coming from my variable so i'll go search in my variables menu here again where it says select variable and we will select our contact variable that would be the one found right here okay so we're just kind of swapping out hardcoded values with dynamic values and what we're going to see is once we get done creating this flow we're going to be able to pass in values into the variable dynamically including from our cloud flow that's ultimately what we're trying to get to is show you from your cloud flow how you can execute these desktop flows and when you do that that means you can kind of integrate all of these different things together you can integrate things like approvals with desktop flows and you can do all sorts of stuff really impactful all right so let's go ahead and select our variable called var in contact and you can see those percent signs there are identifying a variable by the way so we'll go ahead and hit save on that and then we have one more final input variable to identify which is right here so we're going to go ahead and double click on this final action that has our amount and we're going to replace the hard-coded amount for 899.95 with our variable value which we can find by hitting select variable and we'll double click on the amount variable right here okay all right so i'm going to go ahead and do that as well i'm going to go ahead and select the variable and double click on it and that will place that variable value within side of our action all right so let's hit save all right so we've now replaced hard-coded text with variables but we had one more thing that we wanted to do which was that we wanted to extract out the invoice id i want to capture the invoice id that's created when it or generated whenever we create a new invoice and i want to pull it out because i might want to use it in other areas okay so if i want to do something like that i can extract values out of my application by using a different type of action and we're going to go to the top left here and search for the action the action that we're interested in this case is called get details of a ui element and the one that we specifically are interested in is this one right here get details of a ui element uh elements attribute in a window some of the difference between these two by the way some of these are for desktop applications some of them are for web applications that's the difference between these two different types of flows here or actions i should say all right so we're going to go ahead and grab get details of a ui element in a window and we're going to drag and drop that to the very bottom space over here of our flow we're going to drag it to the very bottom like so okay now when you drag and place that new element or that new action with inside of your flow it's going to immediately prompt you to provide what ui element are you trying to capture information from so the element that we would like is we're going to hit this little drop down and you'll see these are all of the ui elements that we have already captured but we want to capture one new one that we have yet to find so we're going to select the option right here called add ui element okay so if you're following along click that box that i'm highlighting right there and i will do it as well and what this is going to do is it's going to pop up on my screen something called a tracking session which is very similar in some ways to the um to the uh the desktop recorder that we saw earlier so the way that we want to do this is we want to make it so that it captures the value that shows up on this invoice id right here now if you look very carefully read the text here because it tells you to hover your mouse over the ui element and to capture it you're going to do control left click so i need to hit ctrl left click on this id column right here and that will capture it so that way i can pull values out of it alright so once you've captured that you can hit done and it will bring that back into your desktop flow all right all right say thank you guys to see someone put a comment or to let us know that i have something wrong in my flow i'll go capture that and fix that in just a moment no problem thank you guys but i'm gonna hit save on this one oh you guys you guys got the eagle eyes there yeah i totally missed that this one is wrong that's the wrong variable so we'll fix that here in just a moment but let's finish this process here so we want to capture the uh correct value from the invoice id and pull it out that's what we're trying to do now you'll notice that what this ui element did was it took the value and it put it into a new flow variable right here called attribute value and what we want to do is we actually want to map that to another variable we might want to use that somewhere else you could actually use there is a set variable value that you can do or a set variable action that you can do so if you ever wanted to take a variable from a flow variable and make it into a more traditional output variable like we have in our screen we created an output variable you can do that you can even come over here and if you wanted to you could kind of swap this out if you wanted to but just to show you the experience of using the set variable action i'm going to go up to the action section up in the top left and i'm going to type in set variables and i'm going to map our set variable i'm going to map the variable that we have that we created in our final action into our variable that we called hat that we have called var out one here all right so the way that this is gonna look we're gonna map these together we're gonna tell it that we wanna take our variable that we already have uh called uh was it called var out invoice id and we're going to try and connect it into um the the variable that we've already got here all right so to do this we're going to go ahead and say that we want to set right here the invoice id our var out invoice id and we're going to set it to the attribute value and that's the variable that was produced in our previous action that we did so we're basically passing values between variables and the reason why we need to do that is because one of them is a flow variable one of them is an output variable and that way is an output variable it's accessible to other areas that we might need it all right so we're going to go ahead and go ahead and hit save and thank you jonathan for coming jonathan came in with a whiteboard to let me know my mistake i'm sorry guys it's hard for me to to watch my demo and monitor the chat at the same time so thank you for monitoring that for me and capturing my mistake my mistake if you didn't see it already is right here i use the wrong variable so i just need to go in and switch that out i'm going to switch this out instead of using the contact variable we're instead going to going to use the amount variable so good eye on you for that let me swap that out and thank you jonathan for letting me know he he physically came in with a whiteboard to let me know i was making a mistake so that's uh that's our messaging system as we go through this he probably tried to send me a team's message and i'm just not looking at it all right but this is looking good now jonathan you're the hero of the day uh everything's looking fine i think so we can if we wanted to save this and go ahead and run it so i'm gonna go ahead and save this flow give it a moment to save remember what it's saving is saving this actually back to our dataverse database that's where it's storing all this information so it's storing it in our environment underneath the dataverse database it's collecting and storing all this information for us uh specifically the metadata of our flow design so now i'm going to go ahead and close this contoso invoicing app we're going to run our flow i'm going to take my hands off the keyboard and let's see what happens it launches it then goes to insert an invoice next there it goes and it's using my variable values this time so you'll notice that it's actually used the values from my variable rather than the hard coded value you'll also notice if you pay close attention here that the output variable has picked up the new invoice id here properly so we are seeing that the output or the extraction of a value from my application has worked as well so really really cool stuff right that is really neat that you can kind of pull put in values and extract values all within side of a desktop flow now there's a lot of other things that we can do to go take a step further so just to give you an idea of a few other things that we could do i could also add in a terminate action so i could add in a terminate process action and the idea behind this terminate process is to close the app once i launch it so i could bring that in and drag that down to the bottom to actually close the contoso invoicing application once we're done with it that would make sense i would probably want to do that and so i could specify in the terminate process that i wanted to process based on the process id and then i could map the process id that was generated from my beginning part of my flow and i can now set it got first of all i got sent in here and we're about to bring it back into the flow to terminate or close our application so you can select the variable right here and tell it that you want to use the process id variable to also close the same application that you originally opened in the very beginning a few other things that can be helpful you can add in weights so there are weight actions how these weight actions can be helpful if you look over here on the left hand side these weight actions can be really helpful when you're doing things like a web automation and you're waiting for particular things to show up on the screen you can actually wait for a certain ui element to show up you can also do weights in regards to hey i want you to wait five seconds or 10 seconds or something like that there's a lot of different things like that that you can do you can also do it different debugging techniques so sometimes i actually like to add in message boxes so you can add in your own little message box in here it's called a display message way down here and that way what i like to do with the display message or the message box is to actually pop up and show me what the variable values look like as the flow is running so there's a little few different techniques that you can use for debugging uh one final little tip for you is you do have these things called break points so break points if you look carefully right here i just added one what break points allow you to do is add little pauses in your flow execution so if you wanted to add a break point say for example i want to add a break point right here i can pause my flow's execution at that point and make sure that everything to that to that point has run correctly and then if something for some reason is not happening the way i think it is adding in these break points add little pauses for me so that way i can kind of troubleshoot as the flow is running so if i hit the run button this time it's going to pause at the end or pause in the middle of it and it's going to allow me to do some troubleshooting to make sure that things are happening as the way i would intend them to so you're going to see my flow is going to pause right there it stopped and now i can go try and troubleshoot what's going on with my flow and then whenever i think it's going uh whenever i'm ready for it to continue i can hit the run button here again and it'll run the rest of my flow in fact it also it fall picked up my last action there and it closed the application at the end as well so there's a lot of different techniques i definitely recommend taking a peek at the rpa in a day class that is actually one that we have recorded for free on our learning management system so if you would like to learn more about desktop flows we did a full class just on this one topic and we have recorded it and made it available for free forever so i'm sure one of my colleagues that are in the chat can actually share a link where you can sign up for the rpa in a day class if you're really interested in learning more about that all right so we've covered desktop flows for about 50 minutes what i would like to do is show you how all of these puzzle pieces come together now so how do we take a desktop flow and intermingle it with cloud flows and then i would like to spend a little bit of time talking about administration and a few other tips that i have for you as well but really our next step is to take this flow that we've designed and find a way to run it with inside of the cloud flow because if you remember from this morning i told you cloud flows are going to be the orchestration tool for your desktop flows because you're still going to leverage the triggers that exist within side of your cloud flows to determine when your desktop flows are going to run all right so i've already saved this desktop flow i'm going to go ahead and close the editor down and i'll go ahead and save it again i thought i already did save it but i'll save it one more time and we should be able to see this desktop flow now appearing in my list of flows within side of the power automate desktop we are actually done with the power automate desktop for now so i'm going to go ahead and close it out and we're going to go circle back to the web browser where we were creating the cloud flows earlier so i'm going to go back over to my web browser right here and i'm going to go back to the power automate home for a moment just so we can kind of reorient ourselves on where we are if you're trying to keep up and maybe you maybe you're even watching this recording and you're trying to figure out where i'm at just go to powerautomate.com and sign in and this is kind of the experience that you'll see when you sign in okay so hopefully that gives you a moment to kind of reorient where you are on my screen here now i mentioned earlier that whenever you create desktop flows you will see those desktop flows from within side of your web browser and you can find them when you go to your my flows section right here so if i go click on my flows i will not only be able to see the flows that we created earlier underneath the cloud flow section but i will also see the desktop flows right next to them and i should see my one desktop flow right here now the thing that i mentioned earlier about desktop flows is whenever you want to edit a desktop flow it you cannot edit them from the web browser what's going to happen is if you click edit it's actually going to launch the power automate desktop again where you can make any changes you want to the flow so keep that in mind but what i'd really like to do for this next example is i want to take a cloudflow or maybe i even create one from scratch and use that cloudflow to be able to execute a desktop flow and so the the bigger picture of what we're trying to envision here is how i can integrate the automation of some of my more modern applications with some of my legacy applications all together with inside of a single flow or maybe even across multiple flows so for our example we're going to create a new cloud flow and for this example i'm going to make it pretty basic i'm going to do just a manually executed flow so i'm going to come up to new flows and we're going to select an instant flow an instant cloudflow right here which means i'm not going to have an automated trigger for this one i'm going to keep it simple because we've introduced a new topic i'm not going to try and make it any more complex now that we have this new type of flow we're dealing with so i'm going to go under instant flow and select instant cloud flow and i'm going to go ahead and give the flow a name we will call this run my desktop flow and i'm going to use the manual trigger that you find at the very top so we're going to keep it very basic for this example we're going to use a manually triggered flow and then hit create so this is going to create a brand new cloud flow for me that's kind of empty all it has is just a manual trigger but what we're going to add to it is a new step right here where i can actually initiate and add in an action to run my desktop flow so i'm going to go ahead and select new step right here and we're going to be searching for the desktop flow actions which you can find by selecting this category right here all right so we're going to select desktop flows and you'll notice this does require a premium connector but we're going to be using the action here called run a flow built with power automate desktop all right so we're going to go ahead and select that now the big piece that i have not covered yet which is actually pretty important and i i i the reason i haven't covered yet is because i actually forgot and this this screen reminded me of it is you need some way to be able to wire up your desktop flows to the cloud so for those of you that have worked with tools like power bi and power apps and even power automate you might have likely experience that whenever you interact with applications that run on non-cloud sources that you need to have something called a data gateway and you'll notice that right now it's actually prompting me to point to a data gateway that i can use for this so if you want to run desktop flows you either need a data gateway installed on the on a workstation or really on a server's ideal or there's actually another option when it comes to power automate which is called machine settings and so you can actually set up a machine that will wire up and configure and tie your desktop flows to a cloud service now the piece that i mentioned missing right now to be able to do this direct to machine option is i actually need to go to the power automate desktop so i need to launch it one more time and there is a setting that i need to turn on and configure to wire up this power automate flow desktop flow to the cloud so i'm going to go underneath the settings option found right here little piece i forgot to do is kind of important we're going to go underneath settings and then we're going to go down to where it says open machine settings now i'm going to stop here for a moment for a moment because some of you may not see this option whether you're watching this live or whether you're watching this as a recording if you do not see the open machine settings option like i'm seeing here there's a couple reasons why it could be the case one reason is that you may be running a version of windows like windows home edition if you're running windows home edition you will not have this available to you you're going to need to upgrade windows to be able to do the machine settings and again the machine settings are wiring up and configuring your cloud service to the sorry your desktop service your on-premises service to the cloud some other reasons why you might not be able to do this what might depend on the permissions that your administrator has given you but there can be a number of different reasons why the machine settings options may not be visible to you all right but for my case i'm going to go ahead and select open machine settings right here and i'm going to configure this machine to recognize the environment that has my desktop flow and so what we're going to do is i'm going to select right here that we want to wire this up to my power automate learn with the nerds environment like so and then that way i'm basically connecting together my desktop solution to the cloud and that allows me to run my desktop solution from the cloud so we'll go ahead and wire that up after a few moments it usually takes about 10 or 15 seconds you should see a little banner come across the top that tells you that you're connected all right so i'm going to give that a few more seconds and as soon as these machine settings there goes as soon as these machine settings are wired up i now have the ability to connect to this machine from the cloud so it's very similar to the on-premises data gateway but this is specific at the moment just to power automate all right but i really like it i actually like this feature more than the on-premises data gateway all right so let's go back to the cloud now let's go back to my web browser for a moment and now that we're back into the of the cloud sorry i'm getting mixed up here now that i'm back in the cloud i can point to my machine settings by selecting direct to machine and then it should give me an option to see my machine now i have it here listed twice i think that might be because i actually have done this more than once but it should normally only appear here once so i'm going to go ahead and select the power automate sorry the desktop or the machine settings for the machine i'm on and then i'm going to go ahead and log in now unfortunately this is going to be an area that i cannot help you a lot with i don't know what your login is but the login that it's prompting you for here is going to be the login into your workstation so if you log in with your office 365 account you will log in with that if you log in with a different machine account then you're going to specify whatever the account is that you use to log into your machine for me i log in with my microsoft 365 account so i'm going to go ahead and plug that in here to connect me into my machine and then i'll hit create now when i hit create this is going to create a connection that saves this information so i can use it later as well so generally you may be connecting into a different machine not like your own personal workstation you may actually set this up on a separate server to be able to run these desktop flows from all right all right so now i have configured the connection you can actually see the connections listed over here now and what i'd like to do is i'm going to select the desktop flow that i want to run so i'll choose the desktop flow right here called enter an invoice perfect and then i'm going to go ahead and select the run mode in the run mode you have two options you can either run in attended mode or unattended mode very briefly the difference between those two is attended mode means that you have to be logged in for it to actually run the automation unattended mode means that you can actually not be signed in you can have it on you can have a machine that no one has signed into and he still needs to be turned on but you can have a machine that no one has signed into and it still be able to run flows from it that is ideal of course but it does have an extra licensing cost to it so you want to look into the licensing for that to make sure that you want to do that for our purpose i'm going to go ahead and say attended and then look what we have here i have a couple things in here that we can modify i can actually add in my variable so those input variables we saw earlier are actually visible here including my descriptions my terrible my terrible description is actually visible here as well so i can go ahead and type in here the amount that i want to pass in so maybe i want to pass in 65.68 and maybe the contact this time is going to be uh i'll put it as myself again and then i'll make the account devin's donuts again i'm going to go back to devin's donuts all right we're almost done here guys all right so i'm gonna go ahead and hit save on that and if i were to execute this flow now so i'm gonna go ahead and do a test on this it will run my desktop flow for me from the cloud so i'm going to hit test say it's a manual test and run it so i'm going to go ahead and tell it to run this flow and it's going to connect into my desktop once i hit run flow and execute that desktop flow for me so i'm going to take my hands off the keyboard mouse let it do its thing and it's going to actually pop open the contoso invoicing application on my screen here in just a moment and it's going to enter in those new values like 68.95 and devin's donuts are going to be passed in because i passed in these variable values from the flow execution itself all right so we should see it any moment actually it already happened it just opened in the background there it goes i'm going to take my hands off the keyboard look at that so we ran our desktop flow now from the cloud pretty cool stuff all right i know we are out of time here guys one last thing that i did want to make sure i shared with you i wanted to cover more on the administration side of things one thing that i should have been doing this whole time but i was saving it to the end is i should have been using solutions solutions are your way of managing your work being able to move your work from one environment to another environment and so when you create a solution this allows you to basically basically package up your work so i can call this my learn with the nerds solution and you can add in each of the items that you create into your solution so it's going to create basically a bucket where you can drop in your power apps that you develop your power automate solutions you develop and they can all be added into the solution you can even add and create new items within the solution as well but if you realize that solutions are really the best practice later you can always come and add an existing items here as well so i can add in existing cloud flows that i've already designed into this solution if i go underneath add existing that really is a best practice to follow and put things into solutions and then you can publish your solution and then add item and actually move that solution from one environment to another so if you have a development environment you can create the solution there uh then migrate your work to your production or your develop or your test environment by zipping it up into a solution it actually saves it into a zip file for you wish we had a little bit more time to talk about that i'm pretty sure we have some videos on that on our youtube channel but i know we are out of time hopefully you guys got a lot out of today i know it's a lot of material to cover in one day i do want to remind you again of course that uh take a moment if you haven't already subscribe to our youtube channel hit that bell for notifications so you know when we have new videos that come out and don't forget we do have that holiday sale going on uh right now you can go directly to pragmaticworks.com and sign up for our on-demand learning that's half off right now for our annual subscription so take a moment to do that hopefully you enjoyed today's class thank you so much for joining me and we will see you next time thanks a lot
Info
Channel: Pragmatic Works
Views: 9,451
Rating: undefined out of 5
Keywords: pragmatic works, training, microsoft, power automate, power automate microsoft, microsoft flow, business flow, business automation, how to create a flow, how to design an approval flows, how to build a rpa solution, RPA solution, power automate administration, what is power automate, devin knight
Id: 1p5kI7SYz4Q
Channel Id: undefined
Length: 171min 53sec (10313 seconds)
Published: Thu Dec 09 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.