Helping the busy BDM or manager: create ToDo tasks automatically when you are mentioned in a team channel

I have heard the story several times: too much teams, too much channels, too much notifications and especially: too much atmentions. Of course some of that can be taken care of by making Teams your own ( Check out my session at virtual Microsoft 365 Saturday Madrid to get Teams back to your control and get more benefits from it) but it leaves one more issue: how stay on track when you are being atmentioned everywhere and mentions in specific channels require that you do something about it?

I have heard people use different means for that: don’t atmention me for these – instead you have to use email or private chat. 🙄 For those who know me – I don’t agree because it hides information to chats or emails and they are not supposed to be your task management tool. To Do is. Or Tasks (Planner is going to be in Tasks app this summer!).

Let’s make it more proper and collaborative and start adding atmentions as tasks automatically!

This idea is meant for those busy people who feel they are overwhelmed by atmentions and are living on the edge if they miss something important that people expect them to manage. Project office coordinators, HR manager, Communication managers, Business managers / leads, marketing, support experts etc. Yes, there are lots of people who can use this.

Power Automate ❤ Teams

Of course we are doing this with Power Automate! There is a amazing capability that allows a Flow to trigger on when you are mentioned .. and we can use that to create a task into your bucked. But first, we have to understand there are some limits with Power Automate triggers.

First: You have to specify a team and channel for each “I am mentioned” trigger. This of course limits where you can use this. My advice: pick those channels that you know are most used for requests that you have to take of. Those most critical ones that cause you bad sleep for missing tasks (and money loss for the company).

Second: This involved a bit of citizen development / power user attitude. What is done here is not complex, but for a busy person it might be too much. Ask your Teams champions to help you set this up.

What’s the plan

  • Let’s create a Power Automate that is defined to a specific team+channel and triggers when you are mentioned
  • Create a To Do task out of that automatically. If you haven’t used ToDo it is a good time for that.

Alternatively you can point tasks to a specific planner( tasks) bucket – this is useful especially if you have a team of people who could help you – so the task would be visible to everyone. HR is a good example here: if the HR Manager/lead is mentioned in a company HR channel there is usually a HR issue that anyone from the team could answer – not just that mentioned person.

Note: You have to have a preview Region in use to your Power Automate environment, since some of these features are still in preview and you won’t be able to use them otherwise!

Looks simple enough – let’s start!

Open https://www.office.com (yes, the Office 365 start) and look for the App named Power Automate. Open it.

Go to Create (left navigation) and then choose Automated Flow.

In the next dialog name your Flow and look for Teams-triggers. Choose “When I am mentioned in a channel”. Hit Create.

Then choose the Team and Channel to this trigger. Not that difficult, right?

You will end up with something like this.

Hit + New step and add three Initialize Variable blocks. They are easy to find if you write “initialize” to search inside Choose an action.

When you click on the Initialize variable it will be added. Add three of these. Then let’s go and rename them. This begins with pressing …. part on the right on Initialize variable. Choose Rename.

You should rename them like this to Link part 1, Link part 2 and Link to message. This is because you want to have a link to message in your task.

Next navigate to the team and channel you selected for this and look for a message there. Get it’s link using message’s … menu and choose “Copy link”.

Did you get the message “Link copied to clipboard”? Good – let’s open Notepad and paste it there.

You need to get two link parts from that message link. What is changing is of course the message id. First, copy the link part one. It from the beginning and ends in the first thread.tacv2/ . Yes, include / in.

Copy the part and go back to Power Automate. Open the Link part 1 with a click:

  • name it Link Part 1
  • Type: String
  • Value: paste the link there

Now you have something similar like this:

We copy off the link part 2 in the same way: Choose the text beginning from the first ? (include it) all the way to MessageId= (include = ) .

Put values to Link part 2. Name it to Link part 2, Type is String. Paste the link part 2 there.

Open Link to message variable and name it “Link to Message” and also set it’s type String.

This time I need you to press Fx button to open editor.

Go to expression-part and write concat and then choose concat-function as it appears.

Type open parenthesis: ( and you see how it changes.

From the lower part you can see Variables. We need to add the following in this order:

  • Link part 1
  • MessageID
  • Link part 2
  • MessageID

Let’s begin by clicking Link part 1 into the concat and then add comma (,) to be able to add a second part.

Write messageid to lower part where it says “Search content from previous steps” and then choose Message Id that is shown under blue label “When I am mentioned in a channel message”.

Type comma(,), empty the search text and choose Link Part 2. Type another comma(,) again.

Now add again the search: messaged and add the final message Id to the end.

I agree – this is not nocode. Perhaps lowcode. Definitely coding of some sort! But while it requires attention it is not difficult to do. Now click somewhere else (empty area just left of these dialogs) to close the function formula area to see this:

It is a good moment to Save. Then we continue by adding the next step.

Click + New step on bottom and search for html to text. This is needed to be able to have a clear text in our task, instead of html coded text.

Click on Html to text (preview) to add it. Then click into to the text area and click on lightning symbol.

Click on Message body content.

And that’s it for this step!

Adding a task to To-Do

Click + New step on bottom. Search for todo.

Click on “Microsoft To-Do (Business)” and choose from the bottom part “Add a to-do (V2)”

Now we have a larger form to fill up. We only need a few info here.

Let’s add the subject first. Delete the existing text “DefaultToDo” and instead click on the lightning icon on the right.

Click on “The plain text content” under “Html to text”

Add some text of your choise. If you want to know who mentioned you it is possible to add by using the lightning icon again and search for displayname and click “Message from user DisplayName”.

After that I recommend adding also the team and channel name.

Then set the Status (not started) and To-Do List what you want to use here. You should have Tasks available if you haven’t created any lists.

The last thing we fill is the Body. We put there the link to the conversation. For that write , for example, “Link to the message” in the text and then switch to code(!) view.

Make sure your canvas had only the beginning of the text written – you need to delete the Link to message text 🙂 . What remains could be just as simple as <p><a href=” and nothing else. Then hit the lightning icon.

Click on the Link to message to add it.

Finalize the rest of the link: “>Link to message</a></p>

Now click Save! And you have created the first Flow!

Testing it

Let’s see what happens when we get someone to mention us.

And when I am looking at my ToDo I can see a task appear there with the text and also with the link to the message. Of course it is not a real deeplink to Teams message (it will try to open Teams/browser instead) but it does it’s job.

What about Planner (tasks)?

You can replace ToDo by adding a step to create a Planner task instead. Just search for the Planner and click on Planner on the upper part.

Then choose “Create a task”

Choose the group (Team), Plan you want to use and the bucket. Add Title.

After that you need to update task details.

Adding that Task Id requires a bit of tweaking:

Link is easy to add in here: Just add it to description the way you like it. It won’t be pretty (opened up) but it does the job!

Put this to action and get rid of nightmares!

This looks complex and it requires quite a many careful clicks. However the benefits can be quite high: not forgetting what needs to be done – either at personal (ToDo) or team (Planner) level. However – the whole Flow isn’t that long.

You can leverage this to other teams and channels by exporting the package and importing it several times & doing the necessary modifications (choosing team & channel, getting link parts 1 and 2 right) and fixing those texts (in which team and channel the mentioning happened).

Because this is not “just a couple of clicks” this doesn’t cover all channels. And why it should do that? The idea is to make tasks from those messages that mention you in specific channels that have the most critical content. It could be the support channel (if I am mentioned somebody needs support), it could be Project management office/resourcing, help needed from Comms or HR is needed to clarify things on channels.

This way those atMentions don’t get lost even when you have tons of them.

One thought on “Helping the busy BDM or manager: create ToDo tasks automatically when you are mentioned in a team channel

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.