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

How to reset a SharePoint column value to blank using Power Automate

In Power Automate, setting an already-populated SharePoint list or library field to blank isn’t as simple as leaving the field blank in your flow. Luckily, it’s just a couple extra steps to make it possible.

In this post I’ll cover multiple column types as they’re a bit different.

  • How to set text, date, number, and yes/no column values to blank
  • How to set single choice column values to blank
  • How to reset multi-choice column values to blank
  • How to reset person column values to blank

How to set SharePoint text, date, number, and yes/no column values to blank

The steps in this section will work for these column types:

  • Single line of text
  • Multiline text
  • Date
  • Number
  • Yes/No
  1. Click into the field you want to reset to blank
  2. Select Expression
  3. Type Null in the expression box (not case-sensitive)
  4. Click OK
Adding a Null expression in Power Automate | Click to enlarge

Test your flow and it should reset the field value(s) to blank wherever you used the Null expression.

Showing the fields that were reset using Power Automate | Click to enlarge

How to set SharePoint single choice field values to blank

To set a choice field back to blank (no selection) follow these steps:

  1. Add a step before updating the item that initializes a variable. The step is called Initialize Variable.
  2. Set the variable name to Blank, and the type to String. Do not set a value.
  3. In your update action, set the choice field value to the new variable from dynamic content.
Creating a blank variable in Power Automate | Click to enlarge

Test your flow, and you should see your single choice field reset to no choice.

Result of a Power Automate flow resetting a choice field | Click to enlarge

How to reset SharePoint multi-choice column values to blank

A normal choice column in SharePoint has more options that allow it to be set to multiple choice.

Multiple selection option for a choice field in SharePoint | Click to enlarge

Changing a single-select choice column to a multi-choice field alters how Power Automate resets the field, but it’s still similar to the steps involved for a single choice field.

To set a multiple-choice field back to blank (no selections) follow these steps:

  1. Add a step before updating the item that initializes a variable. The step is called Initialize Variable.
  2. Set the variable name to BlankArray, and the type to Array. Do not set a value.
  3. In your update action, select the T icon next to your multiple-choice field.
  1. Set the multi-choice field value to the new variable from dynamic content.
Power Automate actions resetting a multiple-choice field to blank | Click to enlarge

Test your flow and your multi-choice fields should now reset to blank.

Result of a Power Automate flow resetting multiple-choice fields to blank | Click to enlarge

How to reset SharePoint person column values to blank

Perhaps one of the more complicated column types to reset, a person field takes a bit more work to reset. To accomplish this, we can use an HTTP request. Follow these steps to empty a SharePoint person column’s value.

  1. Add the Send an HTTP request to SharePoint step
  2. Following the screenshot below, set the fields as follows (you must replace all red items with your own values):
    • Site Address (select your site)
    • Method: POST
    • Uri: _api/web/lists/getbytitle(‘YOUR LIST TITLE‘)/items(YOUR ITEM ID FROM DYNAMIC CONTENT)
    • Headers
      • IF-MATCH | *
      • X-HTTP-Method | MERGE
      • Content-Type | application/json;odata=verbose
      • Accept | application/json;odata=verbose
    • Body:
      {
      “__metadata”:{
      “type”:”SP.Data.YOUR_x0020_LIST_x0020_TITLEListItem”
      },
      YOURPERSONFIELDId”:”-1″
      }

Important notes for the Body field

If your list name has a space, replace it with _x0020_ such as Null_x0020_demo.

Field names are different than display names. Even if your field displays with a space (Person field) it is likely Personfield on the backend. You can verify your column’s actual name by going to List settings (gear icon) and selecting your column from the Columns section. Your field’s actual name will be displayed in your browser’s URL.

How your HTTP request should look when finished | Click to enlarge

Test your flow and you’ll find that your person column has been reset.

Power Automate solution: OneNote action errors involving invalid or inaccessible Notebook Keys and sections

When using OneNote (Business) in a Power Automate flow, you may be attempting actions such as Create section in a notebook, Get sections in notebook, or Create page in a section but getting errors when trying to select the relevant notebook and section.

And depending on what you’re using as the Notebook Key and/or Notebook section value(s) you may get any of the following specific errors:

  • Error; the requested notebook or section may have been deleted or is otherwise inaccessible.
  • Invalid notebook key
  • The specified resource ID does not exist.
  • The section id is invalid. If a custom value was entered, please try selecting from the supplied values.

I’ll show you how you may be able to solve this issue in this blog post by using a custom value for Notebook Key. To insert a custom value for Notebook Key, use the dropdown arrow in the Notebook Key field and select Enter custom value.

Enter custom value option for Notebook Key (click to enlarge)

Now you can type text freely. You’ll need to format your notebook key one of two ways, depending on whether it’s a personal (OneDrive for Business) notebook or a shared (SharePoint/Teams) notebook. Both solutions are below.

Solution #1: OneNote Notebook key API format for your own notebooks (stored in OneDrive for Business)

For OneDrive notebooks, such as the default one you get like Nate @ Contoso, format your notebook key as seen below, replacing highlighted parts with your own notebook name, organization URL, and email address (with underscores instead of the usual symbols).

Nate @ Contoso|$|https://contoso-my.sharepoint.com/personal/nchamberlain_contoso_com/Documents/Nate @ Contoso

Still not working? Your organization may have a .com added (even if you don’t see it in your notebook name). Try adding .com to your notebook name in both locations (beginning and end):

Nate @ Contoso.com|$|https://contoso-my.sharepoint.com/personal/nchamberlain_contoso_com/Documents/Nate @ Contoso.com

Solution #2: OneNote Notebook key API format for shared notebooks (stored in SharePoint and used there or in Microsoft Teams)

For shared notebooks, such as the default one you get with every Microsoft Teams team or SharePoint team site, format the notebook key as follows. Be sure to replace bold components of the key with your own notebook name, organization URL, and notebook location:

Notebook Name|$|https://COMPANY.sharepoint.com/sites/SITENAME/NOTEBOOK LOCATION/NOTEBOOK NAME

For example, all default notebooks are stored in a SharePoint site’s Site Assets folder so a complete Notebook key for a notebook like that may resemble the following (yes, you can leave the spaces in notebook names):

Mark 8 Project Team Notebook|$|https://contoso.sharepoint.com/sites/Mark8ProjectTeam/SiteAssets/Mark 8 Project Team Notebook

Or if it’s not the default notebook, and it was created in a document library a couple folders deep, it might resemble the following. Just replace Shared Documents with the name of the library, and replace the folder structure as appropriate:

Policies and Procedures|$|https://contoso.sharepoint.com/sites/Compliance/Shared Documents/Folder 1/Folder 2/Policies and Procedures 

As long as you enter the key correctly using either solution, your flow will connect to the notebook properly and, when relevant, the Notebook section dropdown will refresh and allow you to simply select the section you want rather than entering an API URL.

Notebook section dropdown functioning properly with a correct Notebook Key (click to enlarge)

Additional troubleshooting when sections are still not appearing

If you are certain you followed the instructions above correctly, made no typos, and you used the correct type of key format based on the notebook’s location (OneDrive or SharePoint), and you’re still seeing “Could not retrieve values…” for Notebook section, it might be a simple fix.

Just cut (Ctrl+X) and paste (Ctrl+V) the Notebook Key you entered into the field again and it may refresh and fix the second dropdown.

References

OneNote (Business) – Connectors | Microsoft Docs

How to send an email when a Planner task is completed using Power Automate

Microsoft Planner has built-in notifications for assigned tasks, reminders, and overdue tasks, but sometimes you’ll want to be kept in the loop when important tasks are completed as well, even when the task isn’t assigned to you specifically.

We can create a Power Automate flow to accomplish this. In this post, I’ll cover three topics:

  • Creating a flow from a template
  • Creating a flow from scratch
  • Sending notifications to task assignees

Use a Power Automate template to send an email when a Planner task is completed

First, you’ll need to sign in to Power Automate using your work or school (not personal) Microsoft account. Then follow these steps:

  1. Select Templates and search for “send email Planner completed” (or click this link)
Click to enlarge
  1. Click Continue
  2. Select the Group and Plan for which you’d like emails to be sent when tasks are completed.
Click to enlarge
  1. Enter the email address(es) to which notifications should be sent when tasks are completed in the selected plan. You can also customize the message body simply by clicking in the body field and entering your own text and/or dynamic content.
Click to enlarge
  1. Click Save (at the bottom or upper right)
  2. Go to the specific plan for which you’ve created the flow (Hint: you’ll find it at https://tasks.office.com) and complete a task to test it. You may want to create a fake task for your test.
Click to enlarge
  1. Check the email inbox for the address(es) you entered in step 4. You should have received your custom email. Note: It may take a few minutes for it to appear.

Note: Your email will come through with the “Completed by” individual’s ID instead of their display name. Follow the steps in this post to change the ID to display name.

Video demonstration using a template (see bottom of post for non-template):

Create a Power Automate flow to send an email when a Planner task is completed (without using a template)

To accomplish the same without starting from a template, follow these steps:

  1. Select Create from the left-hand navigation of Power Automate
  2. Choose Automated cloud flow
  3. Title your flow (perhaps something like Send email when Planner task completed)
  4. Choose your flow’s trigger (Planner: When a task is completed)
Click to enlarge
  1. Select the Group and Plan for which you’re creating the flow
  2. Click New step
  3. Find and select Send an email (V2)
  4. Enter the recipient’s email (or multiple, separated by semicolons)
  5. Enter a subject (perhaps using dynamic content such as the task title in the subject – see video at bottom of post for demonstration)
  6. Enter a message body (again, using dynamic content to insert details such as title and completed time)
Click to enlarge
  1. Click Save and test your flow by completing a task in the plan you selected in step 5

Here’s a video demonstration that adds the task description and a link to the full plan in the email as well:

How to send the completed task notification to the task assignee(s)

If you’d like your notification to go to the individual(s) assigned to the completed task, follow these steps:

  1. After your trigger (When a task is completed), insert the Get user profile (V2) step.
  2. Click inside the User (UPN) field, then select Expression from the dynamic content panel
  3. Paste the following expression in the box and click OK
triggerOutputs()?['body/completedBy/user/id']
  1. Click inside the “To” box and switch to Advanced Mode to be able to use dynamic content
  2. Use the dynamic content from the Get user profile (V2) step to insert Mail
  3. Save and test your flow.

How to get Planner task Completed By dynamic content in Power Automate

You can use a template in Power Automate to send an email when a Planner task is completed. However, this template returns the Completed by field as a user ID, and not as a display name. And the dynamic content available for a completed task does not include Completed by. We can, however, get this data using an expression. Here’s how to do it (video at bottom of post):

  1. After your trigger (When a task is completed), insert the Get user profile (V2) step.
  2. Click inside the User (UPN) field, then select Expression from the dynamic content panel
Click to enlarge
  1. Paste the following expression in the box and click OK
triggerOutputs()?['body/completedBy/user/id']
  1. Now, in your next step (email, Teams post, etc. – however you’re sharing the completion message), use the dynamic content from the Get user profile (V2) step to insert Display Name.
Click to enlarge
  1. Save and test your flow.

Solution: Power Automate “No database found” error for business process flows, process advisor, and AI Builder

If you’re trying to build business process flows, use Process Advisor, or use AI Builder in Power Automate, you’re going to need a database established in the intended environment first. If you don’t have a database in the environment yet, you’ll get an error as seen below:

  • Business process flow requires a Microsoft Dataverse database. Try a different environment or create a new one to start using business process flow.
  • You need a database to use process advisor. Create a database, or switch to an environment that has one.
  • AI Builder requires a Dataverse database. Create your database to start using AI models.

In the following sections, I’ll detail how to:

  • Switch to a different environment
  • Add a database to your current (or any) environment
  • Create a new environment with a database

Switch to a different environment

Your organization could already have multiple environments. Always check with your admins before making any uncertain decisions because environments could be used for specific data types, processes, geography compliance restrictions, etc. You may or may not have access to all of your organization’s environments depending on your specific organization’s governance and configuration.

Let’s assume you do have multiple environments and you’ve discussed with your admin or governance team which environments are appropriate for your specific need or project. To switch to a different environment that might have a usable database, click on the name of your current environment in Power Automate in the upper right, then choose the other environment from the side panel.

Click to enlarge

Add a database to your environment

You may choose to just stay in your current environment and add a database to it. If that’s the case, go ahead and click on Create a database and follow the right side panel’s wizard to complete the process.

You can also add databases via the Power Platform admin center if you can access it.

Create a new environment with a database

Let’s assume your organization hasn’t yet created any additional environments you could use other than the default one that came with your tenant (which obviously doesn’t have a database or you wouldn’t be here 😄). If you don’t want to create the database in the default environment, you may wish to create a new environment with a new database.

Check out this other post for help in creating a new environment that includes a Dataverse database.

Solution: This environment can’t be created because your org (tenant) needs at least 1 GB of database capacity

colorful human shaped wooden blocks in a bowl

Did you run out of capacity in your Dataverse environments from Power Automate and Power Apps usage? You have several options, and I’ll cover four in this post:

  • On a trial? Change the environment type
  • Purchase a capacity add-on
  • Free up space
  • Delete unused environments

Not what you’re looking for? Check out this detailed information on Dataverse storage capacity.

On a per user plan trial?

Change the environment type from Production to Trial. This will allow you to proceed with provisioning the environment for your trial purposes. You can later convert this to Production, but only if you have more database capacity when you’re ready to do so.

Click to enlarge – change the environment type from Production to Trial when creating a new environment as a user.

Purchase a capacity add-on

Not on a trial? Just out of space? Maybe it’s time to purchase a capacity add-on. View full documentation for more information on this, but here are the basic steps to purchase a capacity add-on:

As a global admin, go to the Microsoft 365 admin center (https://admin.microsoft.com). Then choose Billing > Purchase services from the left nav.

In the search bar, search for capacity and choose the type of capacity you’d like to add for your organization (i.e. Power Apps portals page views, AI Builder, etc.).

Click to enlarge

Choose Details for the capacity type you’re seeking to expand and complete your purchase.

Click to enlarge

You should also be sure to check out these two resources once you’ve completed your purchase:

Free up space

Just trying to clean up a bit? Start your evaluation by going to the Power Platform admin center’s Capacity page to see what’s using up the most space. Are there things you could clean up? Notice any unusual usage?

Click to enlarge

Depending on what you find in the Capacity page, you may find yourself wanting to look more closely at environments. To do this, select the Environments node from the left-hand nav.

From Environments, you can select an environment and choose to view its resources which will give you a good idea of what might be using more than anticipated. Perhaps a flow or app just needs adjusted. You could, for example, open a listed environment and choose Resources > Flows, examine the flows using the environment, see their owners, and even disable the flows until further action can be taken to address the underlying issue.

Delete an environment

See any environments that could be deleted? Just keep in mind a deleted environment takes its resources and backups too – so consider any flows, apps, etc. that might need updated to use a different environment first.

If you do determine there are unused and unneeded environments in your organization, you can delete them from the Power Platform admin center.

  1. Log in to the Power Platform admin center
  2. Click on Environments on the left nav if not already there
  3. Select the environment that you wish to delete, and choose Delete (can’t delete your default environment, though)
Click to enlarge

Environment owners have 7 days from deletion to recover it if they wish.