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

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

Restrict creation of new Power Platform environments to admins only

A person buried under a pile of boxes

Note: This post applies to traditional environments, not Dataverse for Teams environments. Thanks to Loryan Strant for adding that clarification.

As long as someone in your organization is on a Power Apps or Power Automate per-user plan, they may have permission to create their own environment (unless you’ve already limited it previously in your organization). These environments can be used and shared by Dynamics 365, Power Apps portals and apps, and Power Automate flows. Environments can house multiple Dataverse tables (which can also be provisioned by a power user with appropriate licensing). Power Platform apps and Dynamics 365 can then connect to, read from, and write to these tables which would likely be shared across multiple applications/processes.

For example, if Megan Bowen is licensed on a Power Apps per-user plan she would, by default, be able to create new environments as she wished. And with the right training and deployed best practices, this may not be an issue. But if training isn’t provided and users are creating environments left and right, it may be time to limit who can create them (regardless of their licensing) until proper training and governance can be deployed.

So if you wish to manage environments centrally and prevent environment sprawl, you will want to limit the ability of users in your organization so they can’t create their own environments. Doing this may slow their individual productivity, but could also prevent duplicated efforts, inconsistent data organizationally, scattered naming conventions, and more. As long as you replace this restriction with a formal and effective governance policy, request form, etc. it will minimize disruption to your colleagues’ productivity.

Ready to do this? Let’s go over the steps to limit Microsoft Power Platform environment creation and management.

Limit new environment creation via the Power Platform admin center

As a Power Platform admin, sign in to the Power Platform admin center.

Choose the Settings gear in the upper right corner and choose Power Platform settings.

Click to enlarge

Then change Who can create production and sandbox environments to Only specific admins. As seen in the tooltip in the following screenshot, this limits creation to:

  • Global admins
  • Dynamics 365 service admins
  • Power Platform service admins and
  • Delegated admins

Click Save and you’re finished!

Note that this doesn’t remove existing environments or limit the abilities of their creator(s) to continue managing pre-existing environments. This setting will only apply to new environments and prevent additional unwanted sprawl.

Prefer to restrict environment creation and management via PowerShell? Check out this documentation.

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.

Microsoft Flow vs SharePoint Designer (SPD) Approvals

WORKFLOWvs

Perhaps one of the most useful automated processes out there is the ability to do approval processes. We fortunately have two tools on-prem or online that allows us to perform this action. Microsoft Flow offers some incredible connectivity between services (like approve a Tweet and post it, approve something from Google Docs and have it moved to SharePoint, etc.), but the approval process itself is very simple at this point and doesn’t offer some of the more robust features and customization options we get in SharePoint Designer 2013 approval processes.

I also will use both tools in the same business process occasionally, because they both have unique strengths.

But which do you use for approvals?

The quick answer to the question is: Use Flow for simple approvals, or approvals that involve multiple sites or external services. Use SPD for more complicated processes and customization options for approvals that involve a single site.

Continue reading “Microsoft Flow vs SharePoint Designer (SPD) Approvals”

How to create a dynamic “this week’s menu” button for your intranet

People jokingly (or not) sometimes tell me the only reason for which they use the intranet is the cafeteria menu. So on a recent draft of a redesigned homepage, I introduced a prominent “Menu” button that would always be linked to the most recent menu uploaded by dining services.

menu

Previously people would click a link which took them to a document library where the current menu lived, and would open it there. 2 clicks.

I had two goals for this project.

  1. Get it down to 1 click.
  2. Never have to manually update the link for the button. Set it, forget it.

Note: this could easily be applied to newsletters, updates, meeting minutes, etc. Anything that is published on a regular basis that could benefit from an always-current hyperlinked button.

Continue reading “How to create a dynamic “this week’s menu” button for your intranet”

Use Power BI to create a dynamic/live meeting room schedule

confasched

I recently set out to create a “live” conference room schedule that could be presented constantly on an auto-refreshed screen outside conference rooms. This would replace printed schedules placed in holders outside the rooms. The following example uses a SharePoint calendar as the conference room calendar and can be refreshed constantly using Power BI’s scheduled refresh in O365 or Report Server.

Continue reading “Use Power BI to create a dynamic/live meeting room schedule”

Intro to conditional formatting & rules/validation when customizing SharePoint new item forms with PowerApps in Office 365

2018-01-13_17-23-37.gif
This post will introduce you to some basic conditional formatting, rules & validation ideas you can implement today in your customized SharePoint forms using PowerApps. And don’t worry – if you start making changes to your form and don’t want to keep them, you can easily switch back to the original SharePoint form.

Continue reading “Intro to conditional formatting & rules/validation when customizing SharePoint new item forms with PowerApps in Office 365”

Use Microsoft Flow to create a “today” column for use in SharePoint list calculations

Note: I previously shared how to do this in SharePoint Designer. The following method utilizing Flow is better, and does not use loops/pauses.

It’s well-known that SharePoint calculated columns don’t permit [Today] to be used as a formula for a calculated date column. And the “default to today’s date” setting only works upon creation, and doesn’t update daily. But we can create a standard date column and have Microsoft Flow automatically update it daily for us, therefore allowing us to effortlessly perform calculations against today’s date such as:

  • Age =(TodayDate-Birthday)/365
  • Years of Service =(TodayDate-StartDate)/365
  • Days Past Due =(TodayDate-DueDate)
  • Weeks until summer break =(SummerStart-TodayDate)/7

Here’s how to create your own, always accurate/updated, today column (see bottom of post for video):

Continue reading “Use Microsoft Flow to create a “today” column for use in SharePoint list calculations”