Mention a channel with Flow

Twitter is always great for the latest information on the Microsoft stack. But it is also great for inspiration from the community. Lately I have been following John Liu his Flow hacks. His tweet inspired me to create an at mention channel Flow example.

What the hack?

One of the things which was challenging in Flow was the use of the Microsoft Teams post message action. I have been struggling with this action to use for more advanced things like at-mentioning.

And then I saw this tweet from John:

At-mention channel

My first attempt was of course to test his solution, which worked great. After that I wanted to try something different. I created a Flow which at-mentions the whole channel.

channelatmentioning_test

The Flow will use a manual trigger. After that the Flow initializes three variables.

Channel post url variables

Channel post url

Just like in John his example I am using the Invoke an HTTP request. This invoke HTTP request uses the ChannelPostUrl variable.

Invoke http request

The only difference is that the body of the post request.

Mark as important

While testing with the body of this request I was wondering if I could also make a message important. I know it is not directly related but it has a similar markup style in Microsoft Teams.

channelimportant_test

It is very easy. Just set the importance attribute to high.

Happy testing!

Leave a Reply

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

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