In an earlier blog post, we looked at how you can use Power Automate to dump the data from a Microsoft Forms submission directly into a custom spreadsheet. This time around we are going to look at adding some more functionality to start to create a more paperless workflow that could be adapted for a wide range of current paper-based applications.
The first thing we are going to look at is adding an approval layer to our process. In the original flow we triggered on the submission of our form, we then retrieved the details of the form and inserted the columns we wanted into a new row on our spreadsheet.
One natural step would be to validate some of that information up front to make sure it has what is needed before we insert it into the form and we can do this via the built-in approvals system.
Hovering over the downward arrows in the flow allows us to insert steps between the current stages. At this point we will be adding an action, we will look at parallel branches later on.
In the search bar, we’ve typed approval to narrow down the operations that we can choose from. In this case, we are going to select Start and Wait for an Approval.
Having inserted the new element into the flow we now get to choose how our approval will work. Approvals can be sent to one or more recipients and so the first choices are simple approve or reject and a decision whether it is first come first served or if everyone needs to approve. For our process we are going to need a single response so will select first to respond. Having made that choice the Approval details need to be added.
Here once again we see dynamic content being available to us. For the title we can simply type the title we want to appear in the approval but we also have the option to add in the content from the form, in this case, we’ve said who submitted the form.
We now assign the approval to whoever needs to see it. This can be either email addresses or groups already set up in your Office 365 environment. Next, we get to the Details section. Here is where we put the information that we want the approvers to have in order to make a decision. Don’t be fooled, although it appears to be a single-line box this is, in fact, able to take considerably more information and supports a technology called Markdown. This allows us to format the details in ways that make it easier for the approver to read.
For our example, we have included a number of the response fields. How this appears to the approver may vary depending on whether they are dealing with them via Outlook or Teams. Although not relevant to this example we can also link an item directly to the approval.
At this stage the same happens whatever the approver chooses (which in the case of this form is correct behaviour as we record approvals and rejects) but that isn’t normally what we want. Instead we would want to have a different flow depending on whether the request was approved or rejected.
To implement this we add another step to our flow. This time we need a Condition which tests a given value and branches depending on the result. In this example, we want to have different routes depending on if the approval was positive or negative.
We need to check the Outcome from the approval, once again this is dynamic content that shows up in the help pane as soon as you click in the box. We are looking to make the choice based on Approve being the yes branch.
We are now going to add custom emails depending on whether the request was approved or rejected. As with the earlier additions we simply add an action within the Yes and No branches and select the Office 365 Outlook action to send an email.
Interestingly, the Email Contact from the form is automatically available into the email box but once I added a field from the Approvals process the system automatically added the Apply to each box. This I assume is because the approval could be sent to more than one recipient.
As mentioned earlier, for some processes you would want the writing to Excel action to happen only on an accepted form and you will notice that both the yes and no conditions now have the ability to add more steps.
In our case though we are recording whether something was agreed or not and so the Excel remains below. We’ve now added the response to the approval and who the approver was into the appropriate column.
Once again this adds the Apply to Each wrapper automatically to allow access to the approval data. To make the flow slightly easier to follow I’ve renamed this to something more meaningful and it is worth noting that you can rename most things if you want to add clarity. As you build more complex flows with multiple elements such as conditions this definitely helps.
To wrap up we are going to look at another way of communicating by adding a message into a Teams channel as an alternative to email.
When we started you may recall we added an action and I mentioned parallel branches. We could of course add another step after we’ve written to the speadsheet but instead we are going to have two things running in tandem.
We now see the same box we’ve seen before to select what operation we are looking to do. Type Teams and you will see a mass of actions that can be undertaken with Teams. In fact, when you start to see the options here for creating and modifying Teams you can immediately see scope for a flow that could take info from a Form for a new Team setup and automate it (after approval). For now though we are just going to post a message in a chat or channel.
The rest is pretty straightforward. We can post either as an individual (or group) or we can let the Flow Bot be the one to post the message which does have the advantage of making it clear that this is an automated process.
Now we just need to say where we want to post and the message. As always, this is made simple by the details of your environment being automatically available in the drop-down boxes. The message box itself is fully featured to allow formatting of your message and even adding links etc.
When we now submit a form the following message pops into the appropriate Team channel chat.
So that’s it for this flow. The complete flow now looks like this:
Hopefully, this simple walkthrough has inspired you to learn more about Power Automate and to think about how it might streamline workflows within your organisation. As mentioned previously, there are a huge number of templates available to help you learn and lots of online resources ranging from the simple to manipulating the code behind the scenes to add more flexibility still.