Scheduled Flows can be a great tool that can help with tasks that you want to do every day, every hour, or even every minute if required. Today, we are going to be looking into creating a Flow that will allow us to plan our week. This Flow will trigger every Monday at 6 A.M. and it will get all of our tasks, and any meetings that we would have this week, put them in a nice table, and send it to us in a email.
Starting our Flow
As we have every time, let's start by opening Flows (flow.microsoft.com) and create a new Flow. This time, we are going to select Scheduled Flow. Once we have selected the Flow, we will use the naming convention that we see fit (I will be calling it 'Weekly Planning').
We then need to select when we would like this Flow to run. It should run every Monday, at 6 A.M. To complete this, we need to select which day it will start (in this case, next Monday), How often we want it to repeat (Once a week) and which day we would like the Flow to trigger (Monday).
Getting Your Meetings
We begin by getting our meetings, putting them into an easily handled variable, then putting them into a table. We can do this by creating the next step, and searching for “Get calendar view of events”. This will allow us to define what days we want to pull for our variable that we will create later.
Now that we have our calendar, it's time to select which dates we want to pull. The first thing is choosing the calendar that you have your meetings in., then define which days we want to pull data from.
If we are running it on a Monday, our start time can be when the script is running, because I never set a meeting before 6 AM Monday. We will use the expression that we have used in the past:
Now, to set the end time, we are going to use a new expression. It will be the AddDays function, and this will allow us to add days to the UTC now. If we want to make sure that we are getting our whole week in, we will have to add 6 days to the end time, so the Flow will look at meetings until Saturday at 6 AM. Our expression will look like:
Now that we have our start and end times, we are going to have to Map a table, which we can convert into our email later. Time to add a new step and this isn’t one that we have used before. It will be the Select action, which is under Data Operation.
Once we've done this, we are going to select which data we want to map. We are looking to map out several pieces of data, so we will simply select the Value content. Now that we can map content from our calendar into this table, let's do so.
Starting with Subject, simply add the title of what you want in your table, and then the corresponding Dynamic content. For example: Enter in 'Subject', and select Subject from your Content. Your table should look something like this:
For the last step of our calendar, we just need to convert it into something that Outlook can handle and send to you in an email. This is as easy as converting it into an HTML table.
We will start a new step, and select the action "Create an HTML table".
From here, we simply need to point it to the output that was created by our Select Data Operation. Once you have clicked into your from field, you will see the option of Output.
Once you've selected that, we are done with the calendar side of our Flow!
It's now time to create a variable for our tasks. To start this, we are going to learn about another function of Power Automate.
We are going to go back to the arrow between our Recurrence, and our calendar view. If you hover over it, you will get a little “+” icon. Click on it, and you will get a few options. Add an action, or add a parallel branch. We are going to want to select Add a parallel branch. This will allow us to do two separate things at the same time, with no dependency on each other.
Getting Your Tasks
We now have a branch that is triggering at the same time. The second part that we are going to be pulling into our email is our Planner tasks. We will start with finding the Planner app in action, and then selecting List my tasks.
Once you have selected this, it makes it nice and easy. It will pull any task that has been assigned to you. The next steps are just like the above. We need to create the variable, put it into a table, and then put it into an HTML table.
Just as a reminder, make sure that you are selecting the “value” Dynamic content when using your Select function. Our table also only needs 2 rows, Title, and Due Date. Your Planner side of this Flow should look like this:
Now that we have all of the data that we want to include in our easy to use variables, we can start building our email.
Sending Out the Email
Begin by clicking on New Step and find our “Send an email”. Once we have selected that, we simply need to fill out our To and Subject fields.
We are going to keep it nice and simple for this Flow, and select ourselves, and enter the Subject as “Weekly Planning”.
Once that is completed, we will go to the body of our email. This is where we are going to be able to recall our variables. One thing to note is to make sure that you are selecting the correct outputs for each one.
Our first output is associated with our Calendar, and our second one is associated with our Planner. I simply used one heading for 'Meetings', recalled the meeting Output, which is associated under the first Create HTML table. I then made a second heading for 'Tasks' and recalled the task Output, which is under HTML table 2. Our email should look like this:
With that, we are done! Make sure that you save your Flow, and go back to your Flow history page, by either clicking the arrow in the top left of your Flow or by going to My Flows and selecting your Weekly Planning Flow. As we have in the past, now you simply need to click 'Run' to make sure that it is working properly, and shortly after, you will get an email with all the details.
Now that you have seen Power Automate do a few functions at the same time, it is really easy to see the versatility of the tool. This is still a very simple function, and there are quite a few out there that are much more in-depth, and sometimes complicated. Good thing our team at Bloom Software can help, and we'll show you the value that Power Automate can add to your workforce.
Do not hesitate to reach out to us, and we will happily chat with you about your Microsoft 365 and Power Automate needs.