How to create an automated, chat-based team availability system using Power Automate and Microsoft Teams

Efficiently managing and communicating team availability in a hybrid world is crucial for smooth operations in any organization. This guide will show you how to create an automated yet interactive system for tracking and communicating the availability of general staff members using Power Automate, Microsoft Teams, and SharePoint.

Step 1: Understanding the Business Process

  • Weekly Availability Surveys: Each Friday, staff members receive a personalized survey through a Teams chat message to submit their availability for the following week.
  • Confirmation and Preview: Upon submission, staff members get a confirmation message and a preview showing the team’s availability as of the time they submitted their own.
  • Comprehensive Monday Update: On Monday, everyone receives a complete overview of the team’s availability for that week, helping them make the most of everyone’s availability.

Video demonstration

The following video will demonstrate steps 2-3 (building the SharePoint list, and walking you through the Power Automate flow).

Step 2: Setting Up SharePoint

  • Create a SharePoint List: Establish a SharePoint list for logging staff availability. Ensure it’s accessible to all staff members who will be participating and/or reviewing availability of teammates. It needs:
    • A person column type for Employee
    • 5 single line of text columns – one for each weekday. In my demo, I’ve repurposed and renamed the default Title column for Monday.
The supporting SharePoint list upon creation | Click to enlarge
  • Manage Permissions (optional): Assign appropriate permissions to staff members to view and edit the availability list. In order for someone to submit their availability via the chat request, they’ll need Contribute or Edit access at least. If you added the list to a site accessible to all relevant team members, they already have access to edit the list by default.

Step 3: Automating with Power Automate

  • In-Office Status Survey Flow:
    • Trigger: Schedule to run every Friday at 10:00 AM.
    • It should first gather data from the SharePoint list (Get items) to know whom to ask for their availability
    • Before asking an employee for their availability, I use the following in my Update item step’s Monday, Tuesday, Wednesday, Thursday, and Friday fields to reset them each week:
⏳ Requested
  • Post an Adaptive Card : The chat message to each employee uses the ‘Post an adaptive card and wait for a response’ action. For the Message of the adaptive card step, utilize the provided JSON below. The only thing you’d want to update is the company logo URL to include your own. You could also adjust things like ‘Telework’ to ‘Work from home’ or any other verbiage you choose.
{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.3",
    "msTeams": {
        "width": "full"
    },
    "body": [
        {
            "type": "ColumnSet",
            "columns": [
                {
                    "type": "Column",
                    "width": 5,
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "Good morning!",
                            "weight": "Bolder",
                            "size": "Medium",
                            "style": "heading"
                        },
                        {
                            "type": "TextBlock",
                            "text": "Let us know where you'll be working next week so we know how best to collaborate with you.",
                            "isSubtle": true,
                            "wrap": true
                        }
                    ]
                },
                {
                    "type": "Column",
                    "width": 1,
                    "items": [
                        {
                            "type": "Image",
                            "url": "https://i0.wp.com/natechamberlain.com/wp-content/uploads/2022/08/cropped-Nate-Chamberlain-logo-icon-e1661192398264.png",
                            "altText": "Company Logo",
                            "size": "auto"
                        }
                    ]
                }
            ]
        },
        {
            "type": "Container",
            "items": [
                {
                    "type": "ColumnSet",
                    "columns": [
                        {
                            "type": "Column",
                            "width": 33,
                            "items": [
                                {
                                    "type": "TextBlock",
                                    "text": "Monday",
                                    "wrap": true,
                                    "weight": "Bolder",
                                    "horizontalAlignment": "Center"
                                },
                                {
                                    "type": "Input.ChoiceSet",
                                    "choices": [
                                        {
                                            "title": "In office",
                                            "value": "🏢 In office"
                                        },
                                        {
                                            "title": "Telework",
                                            "value": "🏠 Telework"
                                        },
                                        {
                                            "title": "Leave",
                                            "value": "🌴 Out of office"
                                        }
                                    ],
                                    "placeholder": "Select",
                                    "style": "expanded",
                                    "id": "Monday",
                                    "isRequired": true,
                                    "errorMessage": "Please make a selection"
                                }
                            ]
                        },
                        {
                            "type": "Column",
                            "width": 33,
                            "items": [
                                {
                                    "type": "TextBlock",
                                    "text": "Tuesday",
                                    "wrap": true,
                                    "weight": "Bolder",
                                    "horizontalAlignment": "Center"
                                },
                                {
                                    "type": "Input.ChoiceSet",
                                    "choices": [
                                        {
                                            "title": "In office",
                                            "value": "🏢 In office"
                                        },
                                        {
                                            "title": "Telework",
                                            "value": "🏠 Telework"
                                        },
                                        {
                                            "title": "Leave",
                                            "value": "🌴 Out of office"
                                        }
                                    ],
                                    "placeholder": "Select",
                                    "style": "expanded",
                                    "id": "Tuesday",
                                    "isRequired": true,
                                    "errorMessage": "Please make a selection"
                                }
                            ]
                        },
                        {
                            "type": "Column",
                            "width": 33,
                            "items": [
                                {
                                    "type": "TextBlock",
                                    "text": "Wednesday",
                                    "wrap": true,
                                    "weight": "Bolder",
                                    "horizontalAlignment": "Center"
                                },
                                {
                                    "type": "Input.ChoiceSet",
                                    "choices": [
                                        {
                                            "title": "In office",
                                            "value": "🏢 In office"
                                        },
                                        {
                                            "title": "Telework",
                                            "value": "🏠 Telework"
                                        },
                                        {
                                            "title": "Leave",
                                            "value": "🌴 Out of office"
                                        }
                                    ],
                                    "placeholder": "Select",
                                    "style": "expanded",
                                    "id": "Wednesday",
                                    "isRequired": true,
                                    "errorMessage": "Please make a selection"
                                }
                            ]
                        }
                    ],
                    "bleed": true
                }
            ]
        },
        {
            "type": "Container",
            "items": [
                {
                    "type": "ColumnSet",
                    "columns": [
                        {
                            "type": "Column",
                            "width": 33,
                            "items": [
                                {
                                    "type": "TextBlock",
                                    "text": "Thursday",
                                    "wrap": true,
                                    "weight": "Bolder",
                                    "horizontalAlignment": "Center"
                                },
                                {
                                    "type": "Input.ChoiceSet",
                                    "choices": [
                                        {
                                            "title": "In office",
                                            "value": "🏢 In office"
                                        },
                                        {
                                            "title": "Telework",
                                            "value": "🏠 Telework"
                                        },
                                        {
                                            "title": "Leave",
                                            "value": "🌴 Out of office"
                                        }
                                    ],
                                    "placeholder": "Select",
                                    "style": "expanded",
                                    "id": "Thursday",
                                    "isRequired": true,
                                    "errorMessage": "Please make a selection"
                                }
                            ]
                        },
                        {
                            "type": "Column",
                            "width": 33,
                            "items": [
                                {
                                    "type": "TextBlock",
                                    "text": "Friday",
                                    "wrap": true,
                                    "weight": "Bolder",
                                    "horizontalAlignment": "Center"
                                },
                                {
                                    "type": "Input.ChoiceSet",
                                    "choices": [
                                        {
                                            "title": "In office",
                                            "value": "🏢 In office"
                                        },
                                        {
                                            "title": "Telework",
                                            "value": "🏠 Telework"
                                        },
                                        {
                                            "title": "Leave",
                                            "value": "🌴 Out of office"
                                        }
                                    ],
                                    "placeholder": "Select",
                                    "style": "expanded",
                                    "id": "Friday",
                                    "isRequired": true,
                                    "errorMessage": "Please make a selection"
                                }
                            ]
                        },
                        {
                            "type": "Column",
                            "width": 33
                        }
                    ]
                }
            ]
        }
    ],
    "actions": [
        {
            "type": "Action.Submit",
            "title": "Submit"
        }
    ]
}
  • Get the updated list of availability (Get items 2) including the new response, making sure to use the following filter query to only get rows where people have responded for the coming week:
Title ne '⏳ Requested' and Title ne null
  • After someone responds, they’ll get a chat preview of the whole team’s availability for the week.
  • In-Office Status Results Flow:
    • Trigger: Schedule to run every Monday at 9:00 AM.
    • This flow compiles survey responses into an HTML table (similar to how we did the first flow) and distributes it to the team via a Teams group chat message where they can ask follow-up questions, provide additional context, coordinate meetings, etc.
    • Important – Exclude the Sender: The sender/owner of the flow should not be included in the Monday communication to recipients (assuming they’re using their credential to connect for that step in the flow). Since they’re the one connecting to Teams via Power Automate, they’re already included in the eventual group chat. Attempting to include them will result in an error.

Conclusion

By following these steps, you can set up a streamlined and automated process to manage the availability of your team. This system not only saves time but also ensures clear and consistent communication among all staff members.

How to Alternate Request Assignment to Responsible Persons for various categories

animals birds feathers flamingos

I had a unique challenge recently to alternate assignment of requests (tracked in a SharePoint list) to individuals as they were created. User #1 would get requests 1, 3, 5, etc. and User #2 would get requests 2, 4, 6, etc. To make it more interesting, different pairs of experts might be assigned to different request topics, and sometimes a single individual would be responsible for a particular topic. The overall idea, though, was a somewhat evenly dispersed workload given quickly and efficiently to those who were responsible for those request areas.

One (less than ideal) option to accomplish this is to use a Get Items (SharePoint) step on the requests list with a Top Count of 1 and Order By OData query (Created desc) for the most recently created request, see who the assignee is, and then assign to the other person in that category’s assignee field (when applicable). But I needed something that was better-performing, sophisticated, simpler in design, and not dependent on any historical items in case they were deleted, re-assigned, etc.

So, to determine the assignment as requests randomly trickle in over time, I decided to have Power Automate determine whether a new request’s ID number (auto-generated by SharePoint) is odd or even. Odd requests would go to the first assignee of a subcategory, and even would go to the last. If there was only one assignee in a category, they’re both the first and the last so it still works.

A general good practice when building flows is to make sure you don’t put a particular assignee’s identity explicitly in a variable, task, or email step. For example, you wouldn’t want to put user #1’s email directly in an Outlook email step’s To line. This makes sure that if an employee leaves the company, that the flow won’t need a revision. Instead, I created a list in the team’s SharePoint site with request categories, sub-categories, and responsible persons. My flow refers to this list each time it needs to make an assignment, making sure it has up-to-date contacts for each subcategory.

Example of a request categories list | Click to enlarge

The managers of the process keep this updated with no more than two assignees per subcategory. This way, when new employees join, the list gets an update for what subcategories they’ll be handling, and the flow continues without a hiccup.

What you’ll need to build this solution

Overall, for this process to work, you’ll need:

  • A list of request categories with these columns:
    • Category (choice)
    • Subcategory (text or choice)
    • Assignees/Responsible (person with multi-select enabled)
  • A list of requests (submitted via a SharePoint form, Microsoft Forms form via Power Automate, or Power Apps app via Power Automate)
    • I’d recommend Power Apps if you have the time and resources – this way your choices (categories and subcategories) in the form can be dynamic (only have to be managed in one place) and reference your categories list without granting access to the main request list, or even the SharePoint site, itself
    • Consider adding additional fields for your assignees like Notes, Status, Priority, etc. for them to add additional context, reminders, and status updates as they work the requests
  • The Power Automate flow for assignment determination

How to build a flow that assigns tasks evenly and by category

The following video will walk you through the necessary components to build this flow in Power Automate. The result will dynamically assign tasks to responsible persons based on categories they’re responsible for, as well as alternating tasks to help distribute workloads more evenly within each category.

Ideas to enhance your categories list with additional fields for different assignment scenarios

Consider taking this concept further by adding additional columns to your categories list. Things like:

  • Sequential assignment (Yes/No) – Assign to the first person in the multi-select person field and if they don’t mark it complete within 2-3 days, add the second person as an assignee.
  • Assign to all (Yes/No) – Maybe some subcategories should have all assignees involved in the resolution. A simple checkbox would have the flow assign to both (when applicable).
  • Request specific assignment (Yes/No) – Not everything can be randomly or evenly assigned. You may wish to choose on a case-by-case basis. Set your flow up to send an adaptive card to the process manager(s) asking for selection of an individual for each request that comes in with this Yes/No checked.

How to create a link to a specific approval request in Power Automate

Do you want to send someone a direct link to an approval request in Power Automate? This can be useful if you want to remind them via chat or email or assign them a task in Planner or To Do. In this blog post, I’ll show you how to get a link to a specific approval request’s link that you can use in different Power Automate flow concepts.

Note

If you’re looking for how to send a link to ALL a user’s pending approvals (rather than a specific approval request), check out my recent post on how to create a link to open the Approvals app in Teams.

You may already know that Power Automate has three approval related actionsStart and wait for an approvalWait for an approval, and Create an approval. Each of these actions has different dynamic content available for later steps. To get a link to a specific approval request, we need to use the Create an approval action because it gives us access to the Respond link dynamic content. This is the link that will take users directly to the approval board in Power Automate with their approval task open awaiting response.

Respond link dynamic content | Click to enlarge

How can you use this link? For example, imagine you want to create a flow that runs when a new request is created in SharePoint and creates a Planner task for the approver with the link to the approval request.

Illustration of the overall concept here – a link to an approval request | Click to enlarge

Here are the steps for this particular request scenario:

How to create a Power Automate flow that assigns Planner tasks containing links to approval requests

Note: For sensitive information, like leave requests, you’ll want to be mindful of PII and privacy and consider email or chat or other ways to use the link so only individuals who should see sensitive content can. This is merely an example of how you might use Planner tasks for any request scenario.

  1. For your flow’s trigger, search for SharePoint and select When an item is created. Configure the trigger by selecting the site and list where you want to monitor new items. For example, you might choose your HR site and the Leave request list.
  2. Click Add an action and search for Create an approval. Configure the approval details as you need. In our example, you might want to request approval from the employee’s manager and set the title to “Leave request approval.” If you intend to send custom notifications via email, planner tasks, etc., click Show advanced options and set Enable notifications to No. This will prevent approvers from receiving multiple notifications about the same approval request.
The first three steps of our approval flow | Click to enlarge
  1. Click Add an action and search for Create a task (Planner). Select the plan and bucket where you want to create the task. For example, you might choose your specific team’s plan and the Pending tasks bucket.
Planner task configuration | Click to enlarge
  1. Click Add an action and search for Update task details (Planner). Select the task ID from the previous Planner action. In the References section, fill in the following fields: References Alias is the text that will be clickable. References Resource will be the Respond link dynamic content from the Approval step. And References Type will be Other.
Update task details configuration | Click to enlarge
  1. Optionally, you can add more actions after creating the approval and updating the task details. For example, you could add a Wait for an approval action to take the outcome of the approval request and perform conditional actions based on it. Or you could add an Update item action (SharePoint) to set the original request’s Approval status from Pending to Approved or Rejected. Or you could add a Send an email action (Outlook) to notify the requestor, copying the approver and HR, with the final outcome of the request.
Optional final steps ideas | Click to enlarge
  1. Save your flow and test it.

That’s it! Now whenever a new request is created in SharePoint, a Planner task will be created for the approver with a direct link to the approval request.

You can apply this technique in other scenarios as well. For example, you could send chat messages or emails with links to approvals using Teams or Outlook actions. Or you could create personal To Do tasks with links using Microsoft To Do actions.

How might you be able to use direct links to specific approval requests in your business processes?

References and further reading

Looking for a deeper dive and more ideas? Look no further.

Power Automate approval actions: A comparison of Start and wait, Create, and Wait for an approval


If you’re responsible for building flows in Power Automate, you’re certain to be asked to create an approval process at some point. This blog post will cover:

  • Comparison of the three approval action types, descriptions, and business use cases
  • How to create a basic approval flow using Power Automate
  • Dynamic content differences between Power Automate approval actions

Let’s start by comparing your three approval action options.

Comparison of Power Automate approval actions

One of the actions available in Power Automate is the Start and wait for an approval action. This action starts the approval process and waits for it to be completed before executing any additional actions. Actions that follow are typically response-dependent, such as creating an item or updating a status if approved or rejected.

Another action available in Power Automate is the Create an approval action. This action starts the approval process but does not wait for it to be completed. Instead, you can use the Wait for an approval action to wait for the approval to complete that was started by the Create an approval action. You might use these actions…

  • …if you want to have steps between creation and waiting. For example, if you wanted to customize the email that is sent to approvers, you would disable Enable notifications on the Create an approval step, then add a Send an email action afterwards but before the Wait for an approval step. This gives you complete control over the look and feel of the email request, rather than sticking to the default Power Automate branded message.
  • …if your approval process will take more than 30 days and your flow will time out before it’s finished. Create an approval creates the approval in Microsoft Teams (or Power Automate) and approvers can approve it there when they’re ready. Your flow won’t fail as You may not necessarily wait for an approval in the flow itself.

Here is a table that summarizes the differences between the various actions:

ActionDescriptionBusiness Use Case Example
Start and wait for an approvalStarts the approval process and waits for it to be completed.A manager wants to automate the approval process for leave requests. They use the Start and wait for an approval action to ensure that the request is approved before the employee’s calendar is updated.
Create an approvalStarts the approval process but does not wait for it to be completed.A team lead wants to automate the approval process for expense reports. They use the Create an approval action to create the approval record and send notifications, but they don’t want to wait for the approval to complete before executing the next step in the flow. In this case, the approval response may not affect the following steps, but just needed to be requested and logged.
Wait for an approvalUsed to wait for an approval to complete that was started by the Create an approval action.A project manager wants to automate the approval process for project proposals. They use the Create an approval action to create the approval record, send their own custom notifications as a Planner task, an email, or a chat message, and then use the Wait for an approval action to wait for the approval to complete before executing the next step(s) in the flow.

Create an approval and Wait for an approval can be used consecutively to achieve the same result as only using the all-in-one action of Start and wait for an approval. For example, let’s say you use Microsoft Teams to manage your team’s projects. You can use Power Automate to automate the approval process for project proposals. You can create a flow that uses the Create an approval action to create the approval record and send notifications to the approvers. Once the approvers have approved the proposal, you can use the Wait for an approval action to wait for the approval to complete before executing the next step in the flow. This ensures that the project proposal is approved before any additional actions are taken but also gives you the added benefits of flexibility down the road like adding steps between creation and waiting, as well as additional dynamic content that may be helpful (see the dynamic content section below).

How to create a basic approval flow using Power Automate

Here is a step-by-step guide for creating a basic approval flow in Power Automate using reimbursement requests as an example:

  1. Select the When an item is created trigger for SharePoint. This trigger will start the flow when a new reimbursement request is created in the list.
  2. Add the Start and wait for an approval action to your flow. This action will start the approval process and wait for it to be completed before executing any additional actions.
  3. Configure the Start and wait for an approval action by specifying the approvers, the approval type, and any other relevant details. For example, you can specify that the approval should be sent to the employee’s manager and the Accounting department, and that the approval type should be Approve/Reject – Everyone must approve.
  4. Add any additional actions that you want to execute after the approval process has been completed. You’ll almost always have a Condition control that checks to see if the response was Approve or Reject. Then, for example, you might use the Send an email action to notify the employee that their reimbursement request has been approved, and maybe Update item to set the SharePoint item’s status as Approved.

Here is a side-by-side comparison that shows the steps for a flow that uses start and wait for an approval, and a different one that shows using create an approval, send an email, then wait for an approval:

Start and wait for an approvalCreate an approval, send an email, then wait for an approval
1. Add the Start and wait for an approval action to your flow.1. Add the Create an approval action to your flow.
2. Configure the Start and wait for an approval action by specifying the approvers, the approval type, and any other relevant details.2. Configure the Create an approval action by specifying the approvers, the approval type, and any other relevant details. In this example, we would disable the Enable notifications setting so we can send a custom notification.
3. Add any additional actions that you want to execute after the approval process has been completed such as a response-dependent (Condition control) secondary level of approvals.3. Add the Send an email action to your flow to notify the requestor and/or approver(s) of the request details and action required.
4. Add the Wait for an approval action to your flow.
5. Configure the Wait for an approval action to wait for the approval to complete before executing any additional actions like a response-dependent (Condition control) status column update.
Table comparing the steps added to an approval flow using two different approaches

Not only do you use these approval actions in different scenarios, but your choice also affects the dynamic content you can use later in the flow. Let’s take a look at that next.

Dynamic content differences between Power Automate approval actions

The choices you make for which approval actions affect which dynamic content is available to you in later steps. Here’s an example of the dynamic content panel for a step following Create an approval:

A screenshot of selecting dynamic content from a Create an approval step | Click to enlarge

Here’s a listing of all the dynamic content alphabetically listed and which actions provide it for you.

Dynamic contentDescriptionStart and wait for an approvalCreate an approvalWait for an approval
Approval IDThe name of the approval
ApproversAll of the approvers   
Approvers Approver emailThe email address of the approver  
Approvers Approver IDThe ID of the approver  
Approvers Approver nameThe name of the approver  
Approvers Approver tenant IDThe tenant ID of the approver  
Approvers Approver user principal nameThe principal name of the approver  
Approvers Item   
body 
Completion dateDate the approval was completed 
DetailsAdditional details about the request
Item linkA link to the item to approve
Item link descriptionDescription of the link to the item
OutcomeThe outcome of the approval 
Request dateDate the approval request was sent
Respond linkThe link to respond to the approval  
Response summaryA summary of the responses 
ResponsesAll of the responses 
Responses Approver emailThe email address of the approver 
Responses Approver IDThe ID of the approver 
Responses Approver nameThe name of the approver 
Responses Approver responseThe response from the approver 
Responses Approver tenant IDThe tenant ID of the approver 
Responses Approver user principal nameThe principal name of the approver 
Responses CommentsComments added by the approver 
Responses Item  
Responses Request dateDate the approval request was sent 
Responses responder  
Responses Response dateDate the approval response was sent 
Teams Adaptive CardAn adaptive card that can be posted to users to respond from within Microsoft Teams  
TitleThe title of the approval
Table comparing dynamic content for different approval actions in Power Automate

One of the most valuable differences here, in my opinion, is the inclusion of Respond link. It’s only available for the Create an approval action. This allows you to send custom reminders with links that take users directly to the item(s) they still need to approve. You could also consider just sending users directly to the Approvals app in Microsoft Teams to put eyes on all their outstanding requests.

Conclusion

As you can see, a simple action choice comes with a lot of potential for creating rich processes. And with all of the options provided through dynamic content, we can customize the approval process quite a bit. In most cases, you’ll probably use Start and wait for an approval. But as you develop more flows, you may find yourself wanting a greater degree of customization and flexibility so you opt for the Create an approval + Wait for an approval approach.

What sort of approval processes are you working on automating with Power Automate? Let me know in the comments or on LinkedIn.

References and further reading

Service principals vs service accounts: Which one should you use for Power Automate flows?

colorful toothed wheels

Power Automate allows you to automate workflows across various applications and services. However, when you create a flow, you need to decide how to authenticate and authorize it to access the data sources and actions it needs. This is where service principals and service accounts come in.

Service principals are special types of users that represent an Azure AD application. They have a system administrator role and use a client secret (a permanent password) to connect to data sources such as Dataverse. Service accounts are regular user accounts that have a username and password. They can be assigned different roles and licenses depending on the flow’s needs.

Recently, I posted How to use service accounts in Power Automate flows and avoid common pitfalls. Check it out to do a deeper dive on just service accounts.

So which one should you use for your Power Automate flows: service principals or service accounts? Here are some pros and cons of each option:

Service PrincipalsService Accounts
Pros:Pros:
– More secure as they do not expose username or password– Easier to set up and manage
– Do not consume a license as they use an application user account– Can be assigned different roles and licenses for different flows
– Can perform actions on behalf of organization users who trigger the flow– Can access more data sources and actions than service principals
Cons:Cons:
– More complex to configure and troubleshoot– Less secure as they expose username or password
– Limited to data sources that support Azure AD authentication– Consume a license for each service account used in a flow
Table comparing the pros and cons of Service Principals and Service Accounts

As you can see, there is no definitive answer to which option is better for your Power Automate flows. It depends on your specific scenario, requirements, and preferences. However, some general guidelines are:

  • Use service principals if you want more security, less licensing costs, and more flexibility in performing actions on behalf of other users.
  • Use service accounts if you want more simplicity, more data source options, and more control over roles and licenses.

This post has explained the high-level differences between service principals and service accounts to consider when building flows in Power Automate. For more information, please refer to these resources:

How to use service accounts in Power Automate flows and avoid common pitfalls

Do you want to automate your workflows with Power Automate and make sure they can last for years to come? If so, you need to pay attention to how you share your flows and how you sign into the services that you use in them. Using your own user account may seem convenient, but it can also cause trouble if your account gets changed or deleted. In this post, I will show you two examples of what can go wrong when you use personal accounts in Power Automate flows and how to avoid them by using a service account instead.

Consider these two scenarios involving Power Automate flows that connect to different services:

  • Bob creates a flow that triggers when a new item is added to a SharePoint list and sends an email alert to his team. He uses his own user account to create the flow and does not share it with anyone else. A few months later, Bob quits his job and his account is disabled. The flow stops functioning because the connection is lost and no one can access or edit it. The team does not receive any email notifications and has to manually monitor the SharePoint list for new items.
  • Carol creates a similar flow as Bob but she shares it with her colleague Dave as a co-owner. However, she still uses her own user account to authenticate to some connectors or actions within the flow, such as sending emails from her Outlook account. A few months later, Carol resigns from her job and her account is deactivated. The flow still runs but some connectors or actions fail because they rely on Carol’s credentials. The team receives incomplete or erroneous email notifications.

These examples demonstrate the risks of using personal accounts in Power Automate flows. And both scenarios could have been avoided if Bob and Carol had used a service account to create their flows and connect to the various services used in the flow. You may end up with broken connections, failed actions, or loss of access otherwise.

So what exactly is a service account? A service account is a special user account that has a fixed license and does not belong to any individual person. Multiple users may know/share the credentials to use the account for building flows. You’ll treat it much like a user account as you provision a license for it then add it to teams, groups, and roles so that it can perform actions a normal user would.

By using a service account, you can make sure that your flows run reliably and securely no matter what happens in your organization or team. Just be careful, as with any shared security asset, not to share a service account’s credentials with too many flow makers. 2-3 users would be the max I would personally consider for redundancy as people take leave and the organization experiences turnover.

Tips for building sturdier flows in Power Automate by using service accounts

  • Create a dedicated service account with a fixed license and assign it the appropriate roles and permissions (site or team membership, shared mailbox member, security group member, etc.)
  • Consider creating multiple service accounts that have access to different environments, teams, sites, etc. to ensure you don’t have one service account with access to absolutely everything
  • Creating the flow
    • Use a service account to create the flow or
    • Use a service account to create the flow and share it with other users as co-owners for more convenient edit access or
    • Share a flow you have already created with the service account as a co-owner (co-owners keep flows after other co-owners leave an organization)
  • Use the service account to authenticate the connectors or actions that you use in your flows, such as SharePoint, Outlook, or Teams. If any single step’s connection belongs to an individual, there is risk that the step will fail if that person’s account is disabled or even if they have authentication issues.
  • Test your flows regularly and monitor their performance and status using the service account
  • Document your flows and their connections and keep track of any changes or updates using the service account

References

Auto-approval of Microsoft Teams Shifts requests using Power Automate

Today I happily stumbled across a collection of Power Automate templates for auto-approval of different types of Microsoft Teams Shifts requests, such as time off requests, open shift requests, and swap requests.

Not familiar with Shifts? Check out my write-up.

The ability to auto-approve removes the current reliance on a Team owner to approve requests. In less formal Teams, this would be an excellent improvement to speed up the process and give autonomy to your team members.

While most of the templates’ triggers are set to use “Recurrence” (regularly reviewing requests and approving on the hour), you can also create your own flow using Shifts itself as a trigger instead.

Note: In high-activity Teams, using Recurrence as the trigger might cut down the number of runs/flows you use if that’s a consideration for you. Using Shifts as the trigger as seen below will run every time a request is made, but provides a faster response to your users.

Click to enlarge.

The templates for Power Automate auto-approval of Shifts requests range from simple flows to more complex flows. Check them out below:

  1. Auto Approve Offer Shift Requests
  2. Auto Approve Open Shift Requests
  3. Auto Approve Swap Shifts Requests and Send Email Notification
  4. Auto Convert Shift to Open Shift
  5. Share My Shifts as iCalendar Feed
Auto Approve Offer Shift Request
Image taken from Auto Approve Swap Shifts Requests and Send Email Notification template example. Click to enlarge.

Speaking at SharePoint Saturday Kansas City on September 16

I hope to see some of you this Saturday at SPS Kansas City, where I’ll be sharing an overview and demos on using workflows to improve business processes. Here’s what you can expect from me:

spskc2.pngLet Microsoft Flow and SharePoint Designer Workflows Do the Work

Your team members would appreciate getting some time back. Give it to them in ten minute increments here, thirty minutes there by using Microsoft Flow and SharePoint Designer to build them thoughtful workflows that range from simple one-steppers to more complex and conditional multi-stagers, even across site collections. We’ll cover specific HR and Accounting scenarios in this session based on real-case experience at KU Libraries, including automation of some onboarding and off-boarding processes, simple automated management of otherwise complex item-level permissions, travel plan submission and approval, receipt submission and reimbursement tracking and more all through utilizing workflows to save you and your colleagues time.

Automating item-level permissions in SharePoint document libraries and lists

workflowitemlevelpermissions

Item-level permissions come in handy for a number of situations. Here are some examples and food for thought:

  • Travel plans are submitted to a list, but only those in people columns (supervisor, director, traveler) are allowed to see or find the plan by search.
  • Allow “content owners” to edit documents, and everyone else to view only.
  • Allow non-admin individuals to set editing permissions for documents or list items by populating a people column

Using a SharePoint Designer 2010 Workflow and an impersonation step, we can:

  • Add list item permissions
  • Inherit list item parent permissions
  • Remove list item permissions
  • Replace list item permissions

This tutorial will use the “replace list item permissions” action. Whenever you’re replacing permissions, you must remember to INCLUDE YOURSELF or admin individuals in the replacement permissions or you won’t be able to access the content or help with troubleshooting. Let’s begin!

Continue reading “Automating item-level permissions in SharePoint document libraries and lists”

Microsoft Flow approval of Twitter tweet and Facebook post submissions via SharePoint list

This tutorial works for any Microsoft-Flow connected social media platform, but we’ll specifically go through the steps for setting up a Twitter tweet and Facebook post submission system. We’ll be utilizing Microsoft Flow’s new “Approval” feature. Here’s our (and maybe your) scenario.

  • We want to allow broader participation in social media content, while still maintaining a close grip on the quality and management of our platforms. This is more inclusive, increasing engagement and also giving you more eyes and ears throughout the organization while maintaining control
  • Individuals will submit their ideas (can be via direct email to a list, a form, PowerApp, etc. – we’ll use a list)
  • Social media manager or team will approve or reject submissions which will then be automatically posted to the applicable social media network if approved. See bottom of post for additional challenges to enhance this system.

Let’s get started!

Continue reading “Microsoft Flow approval of Twitter tweet and Facebook post submissions via SharePoint list”