Hi it's Matt, and welcome to Collaboration Coach.
We recently ran a series on how we use Microsoft 365 to run our business.
We got some great feedback from you about the automated workflows we use
and some requests to show how we set them up.
So this video is all about how we use Power Automate.
This used to be called Microsoft Flow
and it's the workflow engine that runs throughout Microsoft 365.
If you find yourself repeating the same workflow operations
then you can get Power Automate to do these for you.
So let's look at what we use it for,
then I'll open up the Power Automate editor and show you how we build these flows.
Hopefully this should inspire you to automate the work you do
and give you a practical understanding of how to do it.
At Collaboration Coach we manage our content creation with SharePoint and Planner.
We use a SharePoint document library to store all the collateral we need for our videos
like the scripts, the audio and video recordings and any other content.
So for every new video we make, we have to set up a folder in our Screenflow document library
and then in Planner we track the progress of each video until it gets published,
and for that we need a new task for each video.
Some steps of this setup process are always the same and they take way too much time
and these are steps that we could automate with a flow.
So let me show you the flows I've created with Power Automate.
Okay, so I have two flows.
One is to set everything up for a new youtube video,
and the other one for a school class.
They're both attached to this document library called 'Screenflow' in SharePoint.
When I create a new folder in this library...
I name it...
then select it...
and I go to the automate menu on the ribbon.
So this new folder will be for a class,
so I choose my new class flow,
the panel opens up on the right hand side
and I choose 'run flow' and off it goes.
The first thing the flow does is prefix an ID to the folder name - that gives it a unique ID.
If I refresh the page you can see that number.
That number is an internal one
that every item in a SharePoint document library has,
and I'm using Power Automate to get that ID and add it to the folder name.
The next thing it does is update these columns with the appropriate choices for the flow.
This is just a way of categorising the videos so I can filter my list.
You can see the channel column shows me
that it's for the school rather than YouTube.
The YouTube flow would obviously choose YouTube here.
And the status starts off as 'planned'.
The last thing this flow does is copy over a script document.
The script is a pre-formatted Word doc that we can use as a template,
and you can see it's got a table of contents and some example headings all ready to be written.
This gets copied from a templates folder into the new video folder.
The same flow also updates Planner for me,
so you can see I have a bucket for the Screenflow tasks
and now there is a task here with the same name as the folder
and Power Automate created that for me.
It also assigns me to the task and applies this yellow label which is 'class'.
The last thing the flow did was to put this checklist in for me
and that saves loads of time typing it out.
Okay so that's what my flow does.
Now let's open it up in the Power Automate editor and you can see how I built it.
I'm going to go to my cloud flows,
and you can see that I have two flows here,
one called 'new class' and one called 'new youtube'.
I'll open up 'new class' and press 'edit',
and now you can see here I have eight steps.
Some are SharePoint and some are Planner.
The first step is the trigger,
and this flow is triggered by me selecting the folder
and then starting the flow manually.
The first step determines where the flow is going to be available
so I have to choose the site and the library which in this case is 'screenflow'.
It also gets me the ID of the folder that I selected
and I'm gonna need that for the next step.
Step two is a 'get file properties' action,
and that gets me the properties of the folder that I created.
I just need to add the ID that I got from the previous step to the field here
and I can click into it if I want,
and it will show me all the properties that are available to me from step one
so i can just choose ID.
Step three is called 'initialise variable'.
This is where I get the ID and the name of the folder and I join them together.
I give the variable a name - and it could be anything,
and I've called mine 'new file name',
and it's a string of text
and if I click into the value field here,
it's going to show me all the properties that I can pick.
I've added the ID and the name fields together with a space in the middle
because that's how I want it to look on the folder.
Now, step four is the tricky bit.
I used a 'send an http request to SharePoint' action
to change the name of the folder.
What this does is post the new name, which as we know...
is the ID and the name that I stored in the 'new file name' variable in the previous step.
We post it back to SharePoint using its api,
I choose the site,
and the method is 'post'
and to build the uri that the post will use
I have to identify the library, which in this case is 'Screenflow'
and for the folder I can use the ID property from the previous steps.
Now, if you copy this method
all you have to do is replace 'Screenflow' here with your own library name.
Now, this header table configures the type of post it's going to be,
so this has to be accurate.
And then finally the body is what's going to be posted,
so in my case it's the variable I created in the previous step
named 'new file name'.
So if I click into the body field I can pick that
and add it to this string of text here.
The 'file leaf ref' you see here is just the internal name for any SharePoint item in the library,
and if I click into the body field
it's going to show me all the available properties and variables
including my new file name.
Again you have to be super accurate with your typing on the body code here.
Any mistakes and your flow is going to fail.
Alright, almost there .
Step 5 is a SharePoint action called 'update file properties'
and it updates the columns in the library.
So these are the choice columns - 'channel' and 'status'.
I need to name the site library and the ID of the folder here first
and I want to change the channel to 'class', and I can pick that with the drop down.
The status is going to be 'planned'.
Step six copies the script into the folder
and I use a SharePoint action called 'copy file' to do that.
So I just have to pick the site
and then the file to copy - which I can browse for
and mine's called 'script.docx' and it's in the 'templates' folder.
Then I pick the destination site which is the same as before,
and then the destination folder which will be the library 'Screenflow'
plus the variable 'new file name'.
Now on to step 7 and we're going to create the Planner task.
In this action I need to choose the group ID.
So when you drop this down
you should see a list of all the groups that you're a member of
that have plans already created.
Mine is called Collaboration Coach.
Next step is to choose the plan ID.
Now it will show you all the available plans for the group that you chose
and mine is called Collaboration Coach again,
and I can use the variable 'new file name' again for my task title.
And now I choose my bucket and this will be where the task will be added in Planner.
I have a list of all the buckets in the plan and I can choose 'Screenflow'.
Now I'm going to assign the task to me,
and I can do that by adding the 'user email' property,
and that's the email of the person that created the folder in SharePoint,
and that's yours truly.
And finally, to add the class label
I just set the yellow drop down to 'yes' because my 'class' label is yellow.
Step eight is an 'update task details' action
and it adds the description and the checklist to my task.
So I need to add the task ID
and I can get that from the previous action
and for the description I use the link to the SharePoint folder...
...which is called 'link to item'
and this is just a quick way of adding the folder address to the task
so I can click on it and it will open it up for me.
And then this is the checklist.
So for every item in the checklist there is a series of these three fields
and you can add and remove them as you need to.
The three fields are 'checklist ID', 'title' and 'is checked'.
The ID is the order in which you see the item in the checklist.
The title is the label of the item,
and is 'checked' is just choosing whether the item is marked as complete or not,
and that one is a drop down.
Okay, so that's how I'm using Power Automate to create my videos.
Thanks so much for watching and I'll see you next time.
[Music]