How to Link to a Planner Task with Power Automate

Do you need to link to a Planner task in an email or Teams message using Power Automate?

By providing a link, the person receiving the email or message can easily access the full task details needed quickly.

Links to tasks can be created with the task ID during your flow.

This post is going to show you how to get the task ID and use it to create a clickable hyperlink to your task.

Planner Task ID

To create a link to a Planner task using Power Automate, you’ll first need the task’s unique ID.

This can be obtained from the dynamic content of the actions to create a task or the trigger when a new task is created.

@{triggerOutputs()?['body/id']}

This example will use the Id dynamic content from the When a new task is created trigger.

Note there is no link dynamic content, but you will be able to build this URL using the Id dynamic content.

📝 Note: There is no link dynamic content, but you will be able to build this URL using the Id dynamic content.

Utilizing the task ID, you can create links to the specific task within your flow. For example, you can integrate the Task ID within an email action that provides users with a direct link to each assigned Planner task.

Creating Link URL with Concat Function

To create a link to a Planner task in Power Automate, first, you’ll need the task ID and your domain information. You can find the general structure of the link URL by looking at a particular task in the Planner app.

Open the task and click on the Ellipses icon in the top right of the task, then choose the Copy link to task option from the menu.

https://tasks.office.com/<yourdomain>/Home/Task/<xxxxxxxxxxxxxxxxxxxxxxxxxxxx>

Your task links will look like the above, where <yourdomain> is the domain of your M365 tenant and <xxxxxxxxxxxxxxxxxxxxxxxxxxxx> is the task Id.

Now you will be able to use this same structure for any task when you know the task Id.

@{concat('https://tasks.office.com/yourcompany.com/Home/Task/',triggerOutputs()?['body/id'])}

The above expression will create a URL for the task created in the yourcompany.com tenant.

The expression uses the concat function to combine the static part of the URL structure with the task Id dynamic content from the When a new task is created trigger.

Create Clickable Link in Email Action with HTML

To create a clickable link to a Planner task in an email or other communications you can combine the URL with some HTML.

@{concat(
	'<a href="',
	'https://tasks.office.com/yourcompany.com/Home/Task/',
	triggerOutputs()?['body/id'],
	'">Click here</a>'
)} 

For example, the above expression will wrap the task URL inside the required HTML tag to create a clickable hyperlink to the given task.

Now you can include this output in your email body for a clickable link that directs the recipient to the Planner task.

They can simply click the link and access the task directly in Microsoft Planner.

💡 Tip: Including a clickable link within any emails about the task is better than including the task details within the email since Planner will always have the most up to date task details.

Conclusions

This article showed the process of creating a link to a Planner task in Power Automate.

By leveraging the task ID, you can generate a direct link to the task within your tenant environment, using the standard task URL structure.

The concat function can be utilized to combine the fixed parts of the link with the unique task ID from your dynamic content.

You can then integrate Planner tasks into your emails as clickable hyperlinks with HTML.

Have you been linking to your Planner tasks in flows? How did you do it? Let me know in the comments.

About the Author

John MacDougall

John MacDougall

John is a Microsoft MVP and freelance consultant and trainer specializing in Excel, Power BI, Power Automate, Power Apps and SharePoint. You can find other interesting articles from John on his blog or YouTube channel.

Related Articles

Comments

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Get the Latest Tech Tips

Write For Us

Are you a tech enthusiast with a talent for writing great content? Come write for us!

Follow Us

Follow us on social media to stay up to date with the latest in tech!