cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sreedwilson
Frequent Visitor

Link to a specific message in Teams

I am building a Flow that will notify a user if a certain hashtag is used.  I have the Flow working properly - but I cannot seem to figure out if there is a way to link to the specific message.  I am sending the notification to their mobile device.  I don't see an action that includes a link to the Teams message - but wondering if this could be built in some way using expressions? Or perhaps some other method?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Re: Link to a specific message in Teams

Hi @sreedwilson,

 

Currently MS Teams connector does not provide a viable feature to get the link to the message.

If you want to the feature that you mentioned to be supported in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

In addition to this there is a method that could be considered for use.

Each message in Teams has a unique link, copying their link, we will find that they are actually spliced, many parts are the same, only the Message id is different, this could be obtained through Flow.

You could copy the links of several messages of the same channel to observe their similarities and differences.

I did a test on my side, using Message id to divide a link into three parts, put them in the compose, and then use the Concat() function to add Message id, thus forming the url of the message.

You need to copy the link of a message in your own channel, and then take the three parts in a similar way.

Expression:

 

concat(outputs('Compose'),triggerBody()?['id'],outputs('Compose_2'),triggerBody()?['id'],outputs('Compose_3'),triggerBody()?['id'])

Image reference:

18.PNG

Please take a try and let me know if you have any issue.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support
Community Support

Re: Link to a specific message in Teams

Hi @sreedwilson,

 

Currently MS Teams connector does not provide a viable feature to get the link to the message.

If you want to the feature that you mentioned to be supported in Microsoft Flow, please submit an idea to Flow Ideas Forum:

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

In addition to this there is a method that could be considered for use.

Each message in Teams has a unique link, copying their link, we will find that they are actually spliced, many parts are the same, only the Message id is different, this could be obtained through Flow.

You could copy the links of several messages of the same channel to observe their similarities and differences.

I did a test on my side, using Message id to divide a link into three parts, put them in the compose, and then use the Concat() function to add Message id, thus forming the url of the message.

You need to copy the link of a message in your own channel, and then take the three parts in a similar way.

Expression:

 

concat(outputs('Compose'),triggerBody()?['id'],outputs('Compose_2'),triggerBody()?['id'],outputs('Compose_3'),triggerBody()?['id'])

Image reference:

18.PNG

Please take a try and let me know if you have any issue.

 

Best Regards,

Barry

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

sreedwilson
Frequent Visitor

Re: Link to a specific message in Teams

Thanks Barry!

Highlighted
XCL
Regular Visitor

Re: Link to a specific message in Teams

Hi @v-bacao-msft. I tried your solution exactly as your screenshot ("when a new channel message is added", 4 composes, "post a reply to a message").

 

It didn't work for me somehow. It seems like

triggerBody()?['id']

did not get the message id becaue the input and output of the last compose are the same, id wasn't inserted. It failed at the last step of post a reply and got a 400 bad request "Resource not found for the segment 'teams.microsoft.com'."

 

Any idea what may caused this?

 

Update: I found the solution in another thread that compose can get the message id as a dynamic content. I wonder why it only works with compose not other actions where a messge id is needed.

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (7,422)