Creating Workflows in Power Automate

Data Translates
219 followers
Hello, everybody, and welcome back to my channel.
In today's video, we're going to dive
into the wonderful world of Power Automate, and I'm going to show you how you can
automate lengthy, tedious business processes or tasks,
leaving you with more time to focus on the really important stuff.
I'm going to take a look at how to create
three different types of workflow in Power Automate.
So if you're interested in decluttering
during your day and becoming more efficient, then please keep watching.
Now, if Power Automate is an application
that you've never come across before, let's just do a very quick recap.
Power Automate is one of those little
applications that you'll find in Microsoft 365.
So if you have a subscription, click on your app launcher.
And if you can see this little icon just
there, then you have access to Power Automate.
It's worth noting there is also a desktop
application that you can download, but in this lesson,
we're going to be focusing on the online version.
And this entire application is basically
a way of streamlining business processes, automating tasks so that you can simply
click a button or maybe upload a file and a whole series of actions will kick off
in the background. So to really illustrate this point,
let me show you a few examples and then we're going to dive in.
I'm going to show you how to create some basic workflows.
Now, when it comes to creating workflows
in Power Automate, there are a number of different types of workflow.
We have instant, automated, scheduled, desktop and UI.
Now, I don't have time in this video to cover all of them.
So we're going to focus on the main three instant, automated and scheduled.
So what is the difference between these three different types of workflow?
Well, let's start out by taking a look at instant workflows.
Now, an instant workflow could be
something very simple or it could be something more complex.
For example, maybe I want to create a workflow.
That means when I click a button to trigger
that workflow, I can send myself a note.
So maybe somebody in the office has
mentioned something and I want to remind myself of that.
I can click a button and I can send a note
to myself and that's going to arrive in my email account.
So essentially what we have here is a trigger, an action and then the result.
So the trigger is that I'm going to be able
to click a button to kick off this workflow.
I can then type my note and it's automatically going to email to me.
And this is an instant workflow.
The reason why it's an instant workflow is
because I have to click a button in order to trigger the workflow.
This isn't a process that I want to happen
all the time automatically in the background.
I only want to send a note when I have reason to.
So the workflow isn't going to run until
I basically click a run button in Power Automate.
What Power Automate will then do is it will compose an email address to me.
I can type in the note and then it's going to send.
So that is the entire workflow.
Very basic, but a good example of an instant workflow.
Automated workflows are slightly different because they're triggered by an event
rather than a button click by a user.
So a good example of this would be something like YouTube.
So I have a YouTube channel and every week I upload a new video.
And what I have been doing up until this
point is every time I upload a video to my channel, I then go on to YouTube,
grab the URL, I then open up Twitter, paste in that URL,
send a tweet, letting people know that there is a new video.
And then I might go on to Teams or Slack
or maybe on to LinkedIn and also post the link to my video.
By the time I've posted the link to my
video on all of the different social media applications,
that's taken me a good 10 to 15 minutes.
What would be much better is if I could
automate this process so that as soon as I upload a video,
Power Automate posts a tweet and maybe it posts a message in something like Slack.
So here the trigger is the uploading of a video.
And then I have two actions.
It's going to post a tweet and then it's
going to post a message in the Slack channel.
So in this case, the workflow is being
triggered by an event as opposed to a button click.
And then finally, we have scheduled workflows.
And these are different again because they're triggered by a time and a date.
So, for example, maybe every Friday at 5
p.m., I want to send out an email wishing all of my clients a good weekend.
And maybe I also want to post the same
type of message in my team's channel for my team.
So here the trigger is a time and a date.
And then I have two actions,
the sending of an email and the posting of a message.
So really, the main difference between
instant automated and scheduled workflows is how they are triggered.
Instant is by a user clicking a button.
Automated is by an event like an upload
of a video or maybe an upload of a file to a OneDrive folder.
And a scheduled workflow is triggered by a time and a date.
So now that we understand those three
different types, let's jump into Power Automate.
And I'll show you an example of each of them.
Now, the Power Automate interface is fairly straightforward to understand.
I'm currently clicked on the home page
and we have a menu of different items running down the left hand side.
If you want to see all of the workflows
that you've created, if you click on my flows,
you're going to see all of the ones that I have sitting there.
And if you take a look at that last
column, it's telling me what type of workflow they are.
So you can see I have a combination here
of instant workflows, automated and scheduled.
Now, one of the coolest things about Power Automate is that you can use it
to automate processes that need to access lots and lots of different types
of applications. So so you're not just limited to creating
workflows that maybe just use Microsoft applications.
You can access all of these different
connectors, which really increases the scope of what you're able to do.
You can see here we can even link to things like Salesforce,
different Google applications, SQL Server, Power BI, even things like GitHub and Asana.
So the breadth of this and the potential is really great.
Now, when you're thinking about creating
a workflow, you can create it from scratch or you could use one of the templates that
are built into Power Automate. And again, there are hundreds and hundreds
of different templates that you can use.
The real tricky thing here is simply finding the one that you want.
Sometimes I find it's easier just to create
them from scratch if I'm struggling to find the correct template.
But let's start out with an instant
workflow. And for this, we are going to use a template.
So let's do that first example that I showed you.
I want to create a workflow so that when
I click a button, I can email a note to myself.
Now, all of these templates are divided down into different categories.
You can see those categories running across the top.
You can see that one of them there is buttons.
So this is for all of the workflows that require some kind of button click.
And these are all instant workflows.
Now, I could spend ages scrolling through trying to find something that I want.
But what I'm going to do is I'm going to use my search bar.
I'm just going to say that I want to send a note and hit enter.
And it's going to pull back all of the
templates that match my search criteria.
And I can see the one on the end here says click a button to email a note.
That sounds like what I want to do.
Now, the two icons above these represent
the applications or the terminology we use in Power Automate as connectors.
The system needs to be able to access
in order for you to be able to create this workflow.
So let's click on this template and see what we get.
Now, underneath, right at the bottom here
where it says this flow will connect to, you can see here it's got the mail
application, so this flow needs access to a valid email account.
Now, if you have a green tick next to this, that tells you that Power Automate has
been able to establish a connection to your email.
If you have something else, maybe a red cross or maybe fixed
connection, it might mean that you're not logged in
to your email account and you just need to provide your login credentials.
So if you see something like that down there, just click on the button.
It will walk you through the process of connecting to mail.
Now, I can see that mine's fine.
So let's say create flow.
Now, for this particular flow, that is basically it.
You can see it's taken me into the details of this flow.
I can see that it's called currently click a button to email a note.
The description, click a button to send a note by email.
I'm the owner.
The status is on and I can see when it was created, modified.
The type is instant.
I can see what applications I'm connected to for this workflow.
So in this case, just mail.
And then right at the bottom here,
we have a really important area, 28 day run history.
So as I run this workflow, I get to see a history down here of all
the times that I've run it and I can see if it was successful or if it failed.
I could even drill down and see the different steps and exactly maybe where
that workflow failed or something I am going to do here is I don't particularly
like the name of this flow, click a button to email a note.
So let's click the edit button and change the name.
I'm just going to change this to email
message to myself and click on save.
Now, because this is a instant workflow,
it means that it's not going to run until I click the run button.
And I can see just above in the horizontal menu, I have a run button just there.
More than likely, you're probably going to be on your my flows page.
And if you want to run this flow,
if you hover over it, you have a run button just here.
So let's click on run and see what happens.
Notice I get a pane open up on the right hand side,
just confirming that it's going to email a message to me.
And again, I can see that I'm connected to my mail.
So let's click on continue.
And now I can enter in the email subject and the email body.
So each time that I use this, I'm going to need to enter this information.
This is why it's an instant flow.
It's a little bit more manual.
So let's just say hello,
new biscuits in kitchen.
I don't know why I would want to email that to myself, but why not?
And click run flow at the bottom.
So now once you run the flow, if we click on done,
we can then take a look to see if this flow has been successful.
So if I click back on the flow right at the bottom,
take a look at that 28 day run history area.
Now you can see it ran just now and that it was successful.
If I want to drill down even further and see the different steps,
I can click on the run history.
I can see at the top, it says your flow ran successfully
and I can see the different steps.
So I basically click the run button
to trigger this flow and then it's sent an email.
And if I click on each of these,
it's going to open up and it's going to show the different inputs.
Now, I don't want you to worry too much about that at the moment.
Just know that you can see this flow diagram.
And if you have a green tick next to each step,
then that means that it's run successfully.
So now let's check our email to make sure that we've received that note.
And there we go.
The mail right to the top, new biscuits in kitchen.
And I can see that that has come from Power Automate.
So now every time I want to email myself a note,
I can simply come back to my flows, I can click the run button and then it's
going to ask me to enter in an email subject, email body, run the flow.
And away it goes.
Now, of course, this type of flow can get a lot more complex,
but I want to keep it fairly simple in this introductory video.
So now that we've seen how an instant flow works, let's look at an automated flow.
So this is one that is triggered by an event,
so it's not triggered by me clicking on the run button,
it's triggered by something else and that's something else in this example
is going to be when I upload a new item to my SharePoint library.
So when myself or anybody in my team
uploads a file, I want to receive an email just letting
me know that something new has been uploaded.
So for this, we're going to use another template.
So let's click on templates this time and this one's related to SharePoint.
So I'm going to search for all of the
templates that we have that use SharePoint as a connector.
Now, again, let's have a little scroll through and see what we have here.
See if there's anything that kind of matches what we want to do.
So I think this one just here is going to fit the bill.
Send me an email when a new file is added in SharePoint online.
Sounds good to me. Let's click to select.
Once again, you can see the applications
at the bottom that Power Automate needs to connect to in order for this workflow
to run, and I have a whole column of green ticks,
which means it's been able to validate my login successfully.
Again, if you have something else here,
just walk through the process of logging into the application.
Let's click on continue.
And now it's going to take me straight
into the different stages of this workflow.
So this first one up here at the top is the trigger.
This is what kicks off the entire workflow.
We then have the actions underneath.
And the reason why it's taken me into this screen is because there are some things
that I need to define here.
So currently Power Automate doesn't know which SharePoint site I want to use,
which library name, which folder I'm talking about.
So I need to define these parameters
because I have quite a few different SharePoint libraries.
So if I click the dropdown, it's going to pull up all of the
different SharePoint libraries that I've created.
So let's choose this one here, Footsteps Travel.
I then need to tell SharePoint which library I'm interested in.
So if I click the dropdown,
I can see that I only have one library and that is the documents library.
And then I could go a stage further and
select a subfolder within my documents library.
Now, I don't have any subfolders.
I'm interested in whenever anybody uploads a document into the document
library on this particular site, I want to be notified.
So I'm going to leave this blank for the whole library.
So once this has been triggered,
it's then going to get my profile details and it's going to send me an email.
Now, notice in here we have these little
fields and these are what we call dynamic content.
So this is kind of similar to if you've ever used something like mail merge in
Word where you're using merge fields, this is kind of similar in a way.
So it's using information that's already
available to Power Automate to compose this email.
So if we take a look at the body, it's going to say hi and then it's going
to use the given name from my profile.
So it's basically going to say, hi, Deb,
a new file, and then it's going to pull through the file name and it's going
to grab that from the file that I upload was added.
It's located at and then it's going to show me the folder path.
So, again, this is based on the information I've provided in the trigger.
Now, we could go even further into this
and start really customizing the body of this message and adding more and more
dynamic content fields, but I think we're going to save that for another video.
For the time being, I'm happy with this.
I'm going to click save at the top to save this workflow.
And what I would always recommend you do
when you're putting together workflows is run them through the flow checker.
And this will quickly check the flow to
make sure that you have no errors and no warnings.
Once I've run it through flow checker, I then like to test the workflow.
So let's click on test.
I'm going to test this manually and let's click test at the bottom.
So now what I'm going to do is I'm going
to upload a file to that SharePoint folder, which is going to trigger this workflow.
So I'm going to go back to Office 365 and open up SharePoint
and I'm going to go to the correct site, which is Footsteps Travel.
I'm going to jump into my document
library and this is the folder that's going to trigger the workflow.
So when I upload a new file or if I create a new file, that should trigger the workflow.
So let's just very quickly create a new Word document.
I'm going to rename this travel.
Let's hit enter and then I can go in and I can start adding whatever text I want.
And because we're working within the online
applications, remember, this file saves automatically.
So if I close it down, you can see right at the bottom there,
there is my new file travel.docx and take a look, I've got a mail notification.
So that to me suggests that this workflow has worked.
Let's just check it, though.
Let's go back to Power Automate.
I can see your flow ran successfully and I have green ticks next to all of the steps.
If I go into my flows and click on the flow
and take a look at that 28 day run history, I can see it was successful.
So now if I go across to Outlook, take a look at the email that I've received.
It says, Hi Deb, a new file called document.
So it's actually run this flow before I've changed the name of that file was added.
It's located in shared documents.
So this email is being composed using all
of those dynamic content fields to pull through things like my name,
the name of the file and also the file location.
So that is an automated workflow triggered by an event.
Let's take a look at the final type of workflow that I want to show you
in this particular lesson, and that is a scheduled workflow.
Now, we're going to do this one a slightly different way.
We're going to create it from scratch.
We're not going to use a template.
So let's click on the Create button in that left hand menu.
And you can see here, I have a choice to start from a blank or start
from a template, which is what we have been doing this time.
I'm going to use a blank.
So we're going to say scheduled cloud flow.
Now, what I want this flow to do is that every Friday at 5 p.m.
I want it to post a message in a team's
channel that wishes everybody a good weekend.
And that's going to have recurrence set
on it so that every Friday at 5 p.m. it posts the same message.
So let's give this flow a name.
I'm just going to call it weekend starting out.
Well, let's say I want it to start from this Friday.
We can set the time.
So let's choose 5 p.m.
and I want it to repeat every week.
I then need to specify the days.
Now, for me, this is a little bit counterintuitive,
as I've already specified that I want it to start on Friday.
But we basically have to go through and
deselect all of the days that we don't want it to run.
So now I can see this flow will run on Friday every week.
Let's click on create.
So now it takes me into the flow.
Now, remember, because this is a blank flow, we have to build it ourselves.
So we have our recurrence step.
That's what we've just established.
Now I need to add a new step.
So what do I want it to do every Friday at 5 p.m.?
Well, I want it to post a message in a team's channel.
So I'm going to search for all of my team's connectors.
And you can see underneath I have two different lists, triggers and actions.
Remember, triggers is what kicks off this flow.
So in this particular flow,
the recurrence or the time and date is the trigger.
I need to provide the action.
So let's take a look at through all the different options that we have for teams.
And this is the one I want here.
Post a message in a chat or channel.
Now I have to specify my parameters.
Now, who do I want to post this message as?
Do I want it to look like it's coming from Power Automate?
Do I want it to look like a bot or do I want to look a little bit more
natural and have it coming from my account?
So I'm going to say, yes, send it from my account.
I then need to choose where I want to post this message.
Well, I want to post it in a channel.
As soon as I select channel,
I need to let Power Automate know which team I'm interested in.
So I have multiple teams set up.
I'm going to post this to the leadership team.
And within that team, I want to post it in the general channel.
And my message is just going to say, have a good weekend, everyone.
I'm not going to bother with the subject.
I'm just going to click on save.
Once again, once you've saved,
it's always good to run it through the flow checker to make sure you have no
errors and no warnings.
Let's test this flow.
I want to test it manually and click on test.
And I want to run the flow now so I don't have to wait until Friday.
And I can see almost straight away I'm
getting the message your flow ran successfully.
And I can see both steps have a green tick.
So now if I jump across to teams,
let's check to make sure that message is posted.
So I want to go to the leadership team and the general channel.
And would you take a look at that?
Have a good weekend, everyone.
And it's going to post that message every week at 5 p.m.
So if we go back to my flows,
we can see we have those three flows sitting there that we've just created.
Instant, which is triggered by clicking the run button.
Automated, which is triggered by the event,
in this case, uploading a file to a SharePoint folder.
And then our scheduled flow, which is triggered every Friday at 5 p.m.
The final thing to note here is with these
automated flows, remember,
they will run every time a file is uploaded into SharePoint.
And if after a while that gets a little bit tedious,
maybe you no longer really want to be notified,
but you don't particularly want to delete the entire flow.
What you can do is click on the flow and choose to turn the flow off.
So if we turn it off, it's not going to run.
But the flow is still available for you
to toggle back on if you want to use it again in the future.
So that is it.
Three basic examples of how to create
instant, automated and scheduled flows in Power Automate.
We really have just scratched the surface
here, guys, because these can get super complex.
So if you've enjoyed this, I encourage you to look out for further
videos on Power Automate that I'm going to produce over the next few weeks.
If you like this video, don't forget to smash that like button.
Maybe consider subscribing and turn on
notifications so that you know when I upload a new video.
That's it for now, guys.
Take care. I will see you next time.
