I spent the other day playing around with PowerAutomate, formerly called Flow, to create a simple Automation to manage staff leave requests. It was a simple project to automate the approvals and sending of confirmation emails for info and for record. Following completion of the project I thought I would share a guide for the steps I took.
First create a form. I am not going to provide a guide for this as it is reasonably straight forward and there are other guides online for this.
Now www.office.com and select All Apps
Now select the Power Automate option
In Power Automate in the search box you can search for a template. Automate comes with a wide variety of different templates for you to use plus, where there isn’t a template appropriate to your needs, you can take any existing template and simply modify it.
For this example I want to start with a MS Form which a user will submit which then requires an approval before resulting in an email to the approver and user submitting the form. For this I searched for Form Approval. The “Start an approval process and send an email on Microsoft Form submission” template appeared to be closest to what I was looking for.
On the resulting screen which looks like below, scroll to the bottom and click the Continue button
You will now be presented with the Power Automate editor where you can customise your Automation including any emails involved.
Now lets start with some of the customisation:
- Give your Automation a name so that it will be easy for you to identify it.
- Select the Form which you wish to use with this automation. This sets the From which will trigger this automation.
- Again, select the Form which you wish to use this time to get the info from the Form to use in your automation.
- Select how the automation will work where multiple approvers are selected. The automation can require all to approve, one person to respond or allows for other custom settings. In this case I will use First to respond as anyone in the approval list should be able to approve a request.
- Give your approval a title. This will be the text which appears in the approval email received by those you set as the approvers for this automation.
- Add here the list of users who will approve a submitted request. Simply enter their email addresses here separated by a semicolon where multiple approvers are to be listed.
The next stage is to customise the approval email which will be received. We do this in the Details section.
In the Dynamic content window a list of variables and other functions will be available. This will automatically include the fields you setup in the form you created for use with this automation. Click in the details section then click on a variable such as Date (From) above to add it.
I note that there is very little formatting available in the approval emails. I also recommend leaving an extra line space between elements as I found the formatting to a little on the picky side. As such a details section like the below:
Would results in an email which would look like below:
The last part of the setup process is to configure the emails which will be received for an Approved or a Declined request. Below I will cover setting up the email for an Approved or Yes condition however the process is identical for configuring the email corresponding to a Declined or No condition.
The first thing I would do is turn on HTML support within you email. This provides you with significantly more control over the formatting and look of your emails.
To do this first access the advanced options via the Show Advanced options link.
Now change the Is HTML option to Yes. Having done this you now have the ability to use HTML in your emails.
We can now go about configuring this email.
To configure the emails follow the below steps:
1. Enter the email addresses of those who receive the approval/decline email. This can be multiple email addresses using a semi colon to separate them. You can also use the Add Dynamic content to gain access to variables such as the Approvers email variable and the Responders email variable. This means the automation could be made to send the confirmation email automatically to the person who submitted the form, the Responder, and to the person who approved the automation email, the Approve
2. Next give the email a subject line.
3. Finally create the body of the email. Again you can use dynamic content to add variables such as the various pieces of data which a user has filled in on the form along with some other variables such as the approvers email, etc. As we have selected HTML formatting you can also use HTML tags such as <br> to force a line break, <p> for a new paragraph, etc. This gives us a lot more control over the email design including fonts, colour, sizes and even including images. Looking at a very simple email it might look like the below:
And this would result in an email like below:
Having configured the Approved email make sure to go and repeat this for the rejected/declined email.
With everything now setup the final step is to make sure and save your automation using the Save button in the top right. You can then Test your automation to make sure it works. Simply click Test.
In a separate browser window visit the form which you linked to this automation and either preview it and complete or visit the sharing link and complete it. Having clicked Submit on the form the automation should run and your approvers should now receive their approval emails ready to approve. Having approved the relevant confirmation emails should be received.
Congratulations you have completed you first Automation. This first automation highlights a limited amount of the power of PowerAutomate. Go ahead and start exploring!