“I just created a bunch of Planner tasks using Power Automate and now I’d like to send users link to each task, is that possible?”
When you automatically create tasks in Planner, let it be from Excel or SharePoint template, you probably want to assigned them to users. And when you assign them, you might want to tell the users. Planner has a basic functionality to set notifications, but it’s personal notification setting. If users decide to turn it off there’s nothing you can do about it. Therefore, it might be better to build the notifications by yourself. Emails sent automatically by a flow, impossible to disable, that’ll include the task information including the task link. And this post will tell you how to build the link.
Get a link to a task
The best start to building a universal task link is to pick a random task and get its link.
The link will have a format similar to the one below.
You can see that it contains multiple parts:
https://tasks.office.com/ (fixed link to planner part 1) tomriha.com/ (your domain) Home/Task/ (fixed link to planner part 2) j8H5ceLj30aLOlmxnaF0zpgAL70m (task id) ?Type=TaskLink&Channel=Link&CreatedTime=637924629976670000 (additional parameters)
Build a link to a task
If you check links for multiple tasks, you’ll see that the first 3 parts are always the same. The difference will be between the task id and the additional parameters. And since the additional parameters are not important, all you need to build a link is the task id.
https://tasks.office.com/<your domain>/Home/Task/<task id>
Use the concat(…) expression to build the link and use it in your flow, e.g. link to a new task.
concat('<a href="', concat('https://tasks.office.com/tomriha.com/Home/Task/', item()?['Id']), '">Link to item</a>')
If you want to automate some existing functionality, it’s always helpful to check how it works manually. In this example you manually created a link to Planner task and replicated the functionality in Power Automate. There is a fixed part of the link that’ll be always the same, all that has to be changed is the task id. Such link can be then sent to the users, let it be via email or a Teams message.