Trigger a Flow using a physical button
Single physical button as a user interface is ingenious in its simplicity. A button that can be pressed. That's it. One example of these products is the bttn. But there is one thing that makes the bttn very interesting. Flow have triggers and actions for it!
Everything is ready for building solutions having a physical button as a user interface. You just have to figure out how you could utilize this simple gadget in your business.
Let's think what button could do in an office environment. I ended up with these examples for our office:
- Message to all when people are going to lunch
- Message to all when we have visitors in the office
- The coffee pot is empty! Whose turn is it to make fresh coffee?
Let's go through each of these examples in more detail.
Let's go to lunch!
At the work, we like to go to lunch together. But not all at the office have clear visibility to the outdoor. Sometimes you can miss the lunch party just because you haven't noticed that the group is leaving. What if there would be a button which is pressed when a group of people is going to lunch? Pressing the button would send a message to the whole office that we are going to the lunch and everyone can join.
The Flow is simple. Pressing the button sends a message to the Teams lunch channel. The same channel has an active discussion about lunch locations.
After pressing the button we have the message in Teams.
Warning - Visitors inside the facilities
We have often visitors in the office. It might be convenient to silently inform colleagues about visitors. For that, we place the button beside the outdoor.
- When pressing the button Flow sends information to everyone that visitors have entered the premises
- When long pressing the button Flow sends information to everyone that visitors have left the building
In this case, we use Yammer as a communication channel. Actually, we make Yammer announcement.
The coffee pot is empty
Coffee is the most important thing in the office (my personal opinion). There has to be coffee for everyone. Next, we place the button next to the coffee maker. When an employee notices that the coffee pot is empty she/he just press the button. Flow figures out whose turn it is to make fresh coffee and sends a polite message to she/he.
For that, we need a SharePoint list containing all employees. Besides the employee name, there is a counter telling how many times the employee has made coffee.
Then the actual workflow. It starts when someone presses the button. After that, we find out who should make coffee. It will be the employee who's coffee making counter has the smallest value. This employee can be found from SharePoint list by using Get items action having items sorted by count (Order by = count asc). We need only one coffee maker so we get only one item (Top count = 1).
We will update the counter later on Flow. For that purpose, we initialize new variable (CoffeeCounter).
In some cases, you just don't have the time to make coffee. For that reason, we use (super handy) approval action. It informs an employee that he/she should go and make coffee. Employee clicks Approve when she/he have made new coffee. If she/he cannot make new coffee he clicks Reject.
If the person accepts the request our Flow does the following.
- Set CoffeeCounter variable value to selected Employee's current counter value
- Send a message to the Teams for the whole office.
- Update the employee coffee making counter value stored in SharePoint list. This is done with expression: add(variables('CoffeeCounter'),1).
Next time it will be someone else's turn.
Also in case, the employee rejects the request the Flow sends a message to Teams.
For the employee the coffee making request looks like this (mobile)
In an email the request looks like this.
Messages in Teams looks like this.
Or this.
Ready-made Flow looks like this.
Button as a user interface is very fascinating. With Flow you can use a button easily in your solutions.
*This post is locked for comments