PL-900 Microsoft Power Platform Topic: Power Automate – connectors, triggers and actions
December 20, 2022

1. 24, 62, 63, 64: Introduction, incl. flow types, templates, connectors, triggers

Hello. And in this section, what we’re going to be doing is looking at Power Automate. Well, the website for Power Automate is fairly simple when you consider that Power Automate used to be called Floor. So it’s Microsoft.com on the floor. So if I sign in, I’ve already got a login because I signed up for Powernap’s. The plan includes Power Automate; there is some additional installation required there. So in this video, I want to have a look at some of the templates that we’ve got, because by doing this, we can get a good introduction as to what Power Automate can do. So let’s click on all the templates down here. So first of all, we can have instant templates.

These are also called button templates. So they run when you press a virtual button on a mobile app or when you click on a button elsewhere outside of Power Automate and it links into Power Automate. When you press a button inside of Power Apps, you’ve seen that you can add floors. You have seen various power, automation, and floor buttons inside power apps. And when I just decide to run it on demand, that can be used to send me a reminder in ten minutes. And if I click on it, you can see that there is a flow button, and then there is a delay and a notification. So going back, save Office 365 email attachments to OneDrive for business. In other words, when you receive a new email that has an attachment previously, you might have to search all of the attachments and all of the emails to find one particular attachment. Or you could download them automatically onto one drive for business. Now, that sort of thing is called an automated floor.

 So this occurs when data is changed. So something could be added to SharePoint Dynamics or Outlook. And then the third type of floor is a scheduled floor. For instance, get daily reminders in email, so you can get a reminder email every day. And so this is a scheduled floor. It occurs at a certain time of the day, every week, every month, or every hour it reoccurs. So we’ve got three different types. We have instant; something sets it off automatically when new data is received, changed, or scheduled. So that occurs at a certain time or at a certain frequency. Now, you can see at the top of each of these templates what is required for each template to run. For example, this requires SharePoint, Outlook 365, and Office 365 users.

So to get all of these components working, you’ll need to configure them by clicking on the plus sign. And then that will get you onto a signing page. And then you can sign in and say, “This is my account; please connect to it.” Now, it’s probably useful for you to actually have a look at all of these top hits, as they’re called, to get an idea of what they can do.

So let’s pick some examples. First of all, we’ve already said we can save the 365 attachments. We can get a push notification, for instance, when there is an update from the Power Automate blog or when you receive an email from your boss. You can get today’s web forecast. You can send customized emails when new files are received in SharePoint. You can choose whether or not to include an email button. You can get automatic processes done; for instance, when a new task is created in Planner, you can post a message to teams. So these templates allow you to automate repetitive tasks, including desktop-based tasks. So moving data from one system to another creates processes for users to follow. It can use over 200 different connectors from external data sources. And there are three main types of floor buttons, also called instances.

So something happens to trigger it. Like, for instance, me pressing a button on the computer triggering an automated process that’s triggered when data is changed and a schedule that runs at a certain time of day or week and recurs. And you may have noticed me say the word trigger. These are triggered when trigger is a key word in Microsoft’s automated trigger, which is the technical name for why a floor starts. They can be time-based, such as scheduled flaws, or action-based, such as automated or instant flaws. And triggers are only used in Power Automate. In other words, they’re not used in PowerApps; they’re just used in Power Automate. So these are some of the templates that you can use to speed up your work and create a flaw very quickly. And then you can modify it as you want in Power Automate.

2. 25, 68, 69, 71, 72: Creating, modifying and running an instant (button) flow

So let’s create our first floor. And I’m going to send myself a reminder in a few minutes. So I’m going to use this instant floor to do that. So, I’ll click on this. You must now connect to notifications. And there was, when I started this, a little plus button here. I clicked on it, and it created a check mark. So I’m going to have a valid connection.

So I’m already connected to notifications. So I’m now going to create a floor, and it will take just a little while. And there it is. So you can see on the left that we are now in the My Flaws section. So I can go home and get back to my flaws. As you can see, this floor has been automatically saved. So I can run it, I can edit it, I can look at the settings and other things, and I can share it. So, in this case, I’m going to edit it. Let’s look behind the floor. So first of all, manually trigger a floor. So fair enough, I just need to say “run.” And if you want more help, you can always use this question mark to get additional help. Then there is a delay, and you can see that the floor goes through here, through the arrow. I could insert an additional item if I wish to here, so I can add an action or a second parallel branch. So in other words, this one item can have several things happen. So I’m going to set this delay, and I’m going to change it to 1 minute.

So I’m going to change it from ten to one. And you can see that the computer is trying to help you. It’s trying to give you some additional items that you might want to use. So I could change it to months, weeks, days, hours, minutes, and seconds. Following this, I have sent a push notification, and that just gives a reminder. So what I’m going to do is add a parallel branch to this. So I want a new delay. So I’m going to fill this space by typing the word delay. So there is my action. So an action is doing something. So it can be an action between data and function or between two floor points. So you can see what happens if I add this and say I want it to last two minutes and then add another action. The sort of actions we’ve got, for instance, we can do if we can say there are a lot of things, like a lot of roles. And I want you to do certain actions for each row, or at least until So I want you to do a loop and so forth. Alternatively, there are actions to take with Excel online. So I might want to update a row, create a table, or create a worksheet. I might want to get the web forecast; I might want to send an email notification; I might want to get messages on Team.

So maybe for every message, I want a certain action to be taken. I might want to send a notification or send emails through Office 365 Outlook. So in this case, I’m going to send a push notification, and I’m going to choose an email notification for this one. In fact, I’m going to change this one to an email notification as well. So first of all, we have the subject and the body. And you’ll notice that it says “Add dynamic content from the apps and connectors used in this floor” as soon as you get to this page. So these are tokens. These allow me to say, “Okay, in the subject, I want the username, the date, and so forth.” So I’ll put the username here, and you’ll notice how it’s presented and in the space, as well as alert number two. And I’ll say this is your two-minute reminder, and let’s delete this one and add in a new one, add a new action, and this is going to be a one-minute reminder, and this time I will put the date in.

So you can have more than one token. At least that’s the terminology used in other programs. These are called dynamic contents. But you can have more than one of them in, say, the subject or the body. So this is your 1-minute reminder. This floor was fantastic, and you got the timestamp just right. So that’s all done. I’m now going to click on “Save.” Now there are two over buttons at the top here, floor checker. This gives you insights into questions raised by best practices. Which areas may be performance or reliability risks? For instance, test. Or you can see that your floor is ready to go. We recommend you test it. So, when you click test, you can actually test the floor, and I’ll start this manually and test and run now. So now it’s running. So your floors ran successfully. To monitor it, go to the Floor Runs page. So let’s do that. And you’ll see some previous runs that I’ve done, but this is my latest one, and you can see tests that succeeded and tests that were canceled. You might also see some other things. So let’s have a look at the floor. And you can see that the floor is running. We’ve got the manually triggered floor with a check mark, and these show the amount of time that has elapsed when both the left and one are waiting for 1 minute, and the right and one are waiting for 2 minutes.

So the test shows the floor while it’s running. So you can perform the trigger action manually, like we just did. You can use data from previous runs; maybe you’ve made some alterations and want to see how they impact the floor. Or you can use new data by using your connectors. For instance, you might look at new data from Office 365, Outlook, SQL Server, Gmail, and Outlook.com. So we should see some checkmarks here now, and you can see that this took 1 minute and this took 0 second. This is still running. Don’t think that this icon shows how much time is left. It just shows that it is waiting. It is running during the delay. This is a parallel branch. So it’s doing both of these actions or delays at the same time. So what I’m going to do now is pause the video and take a look at my email. So now you can see that both sides of the branches have worked. And we’ve now got two emails.

So this is your 1-minute reminder. The flow is triggered by a date in Japanese format, which includes the month, day, and the letter T to separate the time from the date. And then there was the time. And there’s a z afterwards to show that it is in Greenwich. Meanwhile, GNT or UTC, universal, time-coordinated, that sort of thing. It is essentially the time of year in the United Kingdom during the winter. And then we’ve got another reminder. There is a two-minute reminder. So in this video, we have created a floor using the button floor template. We’ve modified the floor, and we’ve run the floor as well. If we wanted to return to our floor, we would go to my floor on the left. Here’s my floor. And you can see a variety of buttons: run, edit, and share. But if I were just to click on it, then I would get a sort of mini dashboard. And we’ve got lots of different options at the top. So this is how to create a button floor.

3. 66, 68: Creating an automated flow template with a condition and expression

In this video, we’re going to have a look at an automated flaw template, and these are probably the more common templates because they happen in the background without you needing to click on anything. So what I’m going to do is create, and I’m going to look for Twitter. So if you’re going to follow on Twitter, you need a valid Twitter account for this, though there are plenty of other automated flaws if you want to try something else.

So I’m going to search for the word Twitter, and I’m going to get a push notification on the tweet with a certain keyword. So let’s click on that again. We need to make sure that all of the connectors are correct. So Twitter has a plus sign next to it. So I’m going to sign in. So do I want to authorise the Microsoft platform to access your account? So here I’ve got the username and password, so I will click on the Authorize app, and I’ve just received notification on my mobile phone that there is a login to your account from a new device. You can review it if you want to and give the device’s approximate location, when, and so forth. So now all the connectors are fine.

I’ll click on “Continue,” and you can click on the dots (dot, dot, dot) if you do want to change the account. So I’m going to look for Microsoft, but I’m going to edit this in advanced mode because I actually want to see the entirety of the floor. So let’s just read it from the top when a new tweet appears, and I’m going to look for the term “Microsoft.” I think that will happen fairly often. Now check the number of retweets—it’s got a condition. Now if I expand the condition, we have an expression within this condition where the retweet count is greater than 20. We can now change this to say is equal to, is not equal to less than, begins with, ends with, and is greater than or equal to, or less than or equal to. So I’m going to change this so it’s greater than one.

So I want this to happen fairly frequently. So I have got this expression; it looks at one figure, in this case a dynamic content retweet account, and you notice the dynamic content for Twitter is quite different from the dynamic content for sending an email, for instance. So where this is greater than one, then here we now have a condition. So this condition says if this is true, then do this; if it is false, then do this. Now, at the moment, if it is false, do nothing. And in fact, that’s probably what we wanted to do. We don’t want it to do anything if the tweet doesn’t fulfil my criteria; I only want it to do something if it does. So what does it do? Well, it’s going to send a push notification. I’m going to change this again so that it’s going to send an email. Now just have a look and see what we’ve got. What we’ve got here is a popular tweet. So copy and paste it. And here is a link. In this case, I’m going to say this is the link and just paste the links, so I’ll get rid of this push notification. So let’s save it. Let’s have a look at the floor. Check to see if there are any warnings or errors that it thinks might happen. Okay, so I recommend you test it. Well, let’s test it.

So let’s save and test. and it’s now running to see it work. Create a new tweet. And to be honest, I don’t think I’m going to have to. I believe that other people will do this as well. And sure enough, I’ve already gotten, in less than a minute, three emails with what I’m calling popular tweets, except, of course, that the number of retweets only has to be one. But imagine if we saved this into a database, for instance, and then analysed why your company name gets mentioned on Twitter. And maybe you could have an automatic reply saying, “Thanks very much for this; I really appreciate your tweet.” It might not be a good idea without finding some artificial intelligence behind it, but that is the principle. So what I’m going to do now is go into my flaws, and because I do not want to have an avalanche of emails, I am going to turn this off. There you go. We’ve now got a little no-entry sign right next to this particular tweet floor. So in this video, we’ve had a look at how to create an automated template, and we’ve also had a look at expressions that are contained within conditions.

4. 65, 68. Creating a scheduled flow, using an Apply to Each loop

Now in the last video, I created an automated floor that would send an email every time somebody tweeted Microsoft. Now that might result in a lot of emails. Maybe I wanted a summary instead—maybe an hourly summary or a different frequency. Well, I can do that by using a scheduled floor. So I’m going to start this one from scratch. I’m going to choose a scheduling floor. So I’m going to call this my minute Twitter. I’m going to check this every minute.

Now, obviously, if this were a real business use, I would probably be checking it every hour or every day or something like that. But for demonstration purposes, I’m going to check it every minute. So let’s create this, and we can see we’ve got a new flow with just one thing at the beginning, which is every minute start. So there is my trigger. So I’m going to now add a new step, and this new set is again going to be based on Twitter and be search tweets. So I’m going to look again for Microsoft. But let’s look at the advanced options. This will return a maximum of 20 results. That has changed since the last time I looked at it. So return tweets after the specified tweet ID. So, if I had the most recent tweet ID, I could say, “Give me the most recent ones.” But I’m not going to do that for this particular example.

So now what I want to do is compose my email. I’m going to say this email was sent to you because we have new tweets, and these tweets were created by, let’s say, 20 people. I’m going to give a list of the people who created these tweets. But I don’t want us to say, “Give me the first one, give me the second one, give me the third one.” What I’m going to do instead is create a new step, and this one is going to be called “apply to each.” So this is a control action, and I’m going to say okay for each. What am I doing? Well, I want the screen name of the user. Now notice that something has gone wrong. I’ve put in my username, and it’s given me my body. The username appears in the inner text for each.

Now, this is too complicated for the computer to actually do, and it’s going to generate an error later on. I’m just going to continue with this so you can see how to diagnose these errors and correct them. So for each body, I want youth to add this to something. And that’s something I’m going to do, which is called a variable. So I’m going to add a new step here. So I’m not going to interrupt the search and apply for the previous steps. I’ll just add it here. And this action is going to be creating or initialising a variable. So a variable is just a container. It’s a storage container. You don’t need to go into any more detail than that for this certification. So I’m going to say it is going to be a string. In fact, you probably don’t need variables at all for the certification, but they’re just useful for this particular example. So this is going to be called Twitter names, and the initial value is going to be completely blank.

So for each tweet, and then within that, the computer is then saying, “For each username, I want to add an action, and this action is to increment or append add to the end of a string variable.” So I want to add to the end of the string variable and the string of verbal tweet names, and I’m going to have this username. I’m going to use the scroll bar to go down, and then I’ll put a comma under the space. So, as you can see, we start with nothing and then add the first username, a comma, the second username, a comma, the third username, and so on. Now, this could be simplified, but I’m just going to leave it there for the time being. The next step is for me to create an email. So please send me an email with the subject “new Microsoft tweets.” And we’ll put the variable tweet names here. So the apply to each takes the body or username or whatever I want and appends it to the astring variable, which initially has nothing in it. And then at the end, after they apply to each other, it then emails me the notification, and it’s going to do that every minute. So there’s a lot that I could tidy up here, but this is just for a quick demonstration. So let’s save this. We’ll have a look at the floor checker. The floor checker looks fine, and we’re going to test it.

So we are now just going to run it manually. Right, my floor has successfully started, but you can also see that it’s failed. Why is that? Let’s go into it, and we can see from the previous flaw that it failed here. This applied to all of the ones that were generated automatically and were a little too complicated for the computer to figure out. But you can see the first three steps just fine. This has a problem. This was never executed. So let’s go back and change it to apply to each. These two paragraphs were created automatically. It’s a bit too complicated for the computer to work out. So I’m going to remove the second, apply it to each, insert this variable append, and append the username comma again. Now, as you will see from our test, even though I put the comma in, this won’t actually save. And that’s why it’s very important to test everything to make sure that what you’ve put in is saved correctly save.So even though the floor checker said yes, it’s all going to be fine. It wasn’t. So testing is really important. So let’s test it now. successfully started running. The fact that it hasn’t taken 41 milliseconds to fail is quite a good sign. So it succeeded. And because it is a scheduled floor, it will be checked every single minute.

So if I now go to my email, here we have my email. You can see who created these tweets, so if I edit this again, change the floor, and just add the comma and space that I previously added, you can see why that’s so important of us. You get a really, really long variable. So flaws are running. And here’s my new result. So, as I said, there’s a lot that I could do with this. I would probably want to get rid of the last commercial, for instance. I would want to make sure what the last ID was that I had so that when I go back into it, however many seconds later, it won’t give me anything more than what I’ve already processed. I would probably also expand the number of tweets to, say, 50. I’d probably add a condition to it so it doesn’t email me in the middle of the night or anything. But in this video, we’ve had a look at how to create a scheduled floor. And as you can see, it’s still running.

5. 65, 70. Other flow controls, such as Switch and Do Until

In this video, I want to just talk a bit more generally about floor controls, loops, and conditions. But I’m going to start off with a specific one in our Twitter: the one that flails every minute, which I’ve just turned off because it was flowing every minute. I’m getting this comma at the end. So we’ve got the list of 20 people and then a comma. So there are many ways to get rid of this comma, but what I’m going to do is prevent it from being added to the variable in the first place. So I’m going to count how many people are added and then do something different on the 20th occasion. So if I edit this, I’ll need a new variable. So I’m going to initialise a NU for the variable. And so the easiest way to do that is to just type the word “verbal.” So initialise another variable, and this is going to be called “number of times,” and this is going to be an integer. It could also be a float. An integer is a whole number. Float includes decimal places, and we’ve started at zero again.

So let’s refer to this whenever something happens. Then I want you to append the stringverbal with a comma and a space. But I don’t want you to do that for the 20th time. So what I’m going to do is add an action, and this action is going to be a switch action. So switching means putting something to the test. So let’s test the number of times; if it is equal to 20, do this; otherwise, do this. So what I want to do is append to the string variable, but just whether I’m having this comma or not. So let’s add an action. So we’re going to append to a variable. So tweet names, and the thing I’m going to append is the username, but this time without a comma. Otherwise, we will append it with a comma. So there are other things that need to be done first. First of all, I’ll need to actually increment a number of times. So let’s add another action and increment a variable. So we’re increasing the number of times by one, and then I’m going to get rid of my previous chord. So I just want to do the increment and then see whether that variable has reached 20. If it’s reached 20, then do this; if not, do that. So that is a switch function.

You might be familiar with the anif function in other programming languages. So let’s just see what other things we can do. So if I go into the built-in control actions, that is your yes or no. So what’s the difference between the condition and the switch, then? Well, the switch allows you to have multiple cases. So if it’s equal to 20, then do this. However, if it’s equal to ten, for instance, then do this and so forth. So we can test the same thing for multiple items and multiple values. So going back to this, maybe I had my variable up here, the number of times, and I wanted it to go into a loop until it happened ten times. So if I were doing that, then I would have done it until the number of times equaled ten. Now, you might notice that I can’t actually click on any of these. There seems to be a bit of a bug to enable it; just go to edit in advanced mode and then back into basic mode. So do so until the number of times is equal to ten. Then I want you to do things like increase the variable and then add to the string away, as well as anything else you might want to do. Do this until it exits when the number of times equals ten. Otherwise, it keeps going and going and going. Apply them to each of the ones we looked at earlier.

So we’ve had 20 tweets, and we’re doing the same thing to each tweet switch we’ve just looked at to scope and terminate what you want to need for this particular exam. There are a lot more floor controls, but those are the key ones that you will need for this certification. So now let’s see if this works. So let’s save this look at the floor checker and test it. So let’s run the floor, but you can see it’s turned off, so I can’t actually turn it on here. So why there isn’t a button for turning it on, I have no idea. There really should be. So now let’s run this. And now it’s succeeded. And you can see that for the first 19 tweets, we have the name of the tweeter and then a comma and a space. But for the 20th, we just have the name of the tweeter. So in this video, we’ve had a look at switch, we’ve looked at the do until loop, and we’ve had a look at some of the other flow controls, such as variables that allow you to perform some data operations.

6. 67. Approvals and Business Processes

In this video, we’re going to take a brief look at two different flaws or components of flaws. And the first one of these is an approval process. So if I’m going to create an automated cloud floor, what’s going to happen is that I want this floor to be triggered when a new item has been put into the database. So let’s go click “create that.” Make sure you are in an environment with the data first. So I’ve changed mine to one that is. So I’m going to say when you create, when you delete, or when you update a record. And I’ll just use the contacts table. So when a new contact has been created, I want to start the approval process within the organization.

So I’m going to start and wait for approval. So somebody has to say “yay” to this. Is it, however, someone? Maybe I’ve got three people to email. Could it be that the first person who responds can say “yay” or “nay”?Or must all three respond? The answer is yes. Now notice that I can either say, “Do you approve it?” or “Do you reject it?” Or are there some custom responses? So I’m going to do the standard approve and reject for the first person to respond. So this is my new contact. I’ll assign it to me. I might put down a lot of details, but I’m just going to maybe just put down the first name and last name, or maybe just the address city. And then what I could do is send an email to the approval, and then I could do a condition based on whether he’s approved or not. But that’s basically as far as we need to go in this process. So we can wait for an approval, and then we can continue the process whether it is yes or no. Now the other thing I want to touch on in this video is a business process flow. So you can see that this guides users through a multi-step process. So, if I say I want to do a process based on the contacts entity, such as adding new contacts or creating new contacts, this loads this screen with many stages.

So these are the various stages of the process. So the first stage, for instance, could be that I’m asking for data for the address, or maybe I’m asking for additional data. Maybe I’m asking for the name and that sort of thing. And then, once that is done, I might ask for additional things in a separate stage. So we just get one stage at a time, and then we load a second stage, which might be an astage or it might be a condition, and there might be data steps, there might be actions, there might be flaws, there might be lots of things. So we don’t have to go any deeper than that for this certification. So you should know that a business process floor guides one through various stages. So if you’ve got something that can be divided up into chunks, you might want to consider that. And then you’ve got the approval templates here, so you can see that when we’ve got a new approval for lots of different items, we can then send it to at least one person or maybe multiple people for approval. And then we can take actions based on whether they approve or not.

Leave a Reply

How It Works

img
Step 1. Choose Exam
on ExamLabs
Download IT Exams Questions & Answers
img
Step 2. Open Exam with
Avanset Exam Simulator
Press here to download VCE Exam Simulator that simulates real exam environment
img
Step 3. Study
& Pass
IT Exams Anywhere, Anytime!