cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sreedwilson
Level: Powered On

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 Team
Community Support Team

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 Team
Community Support Team

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
Level: Powered On

Re: Link to a specific message in Teams

Thanks Barry!

XCL
Level: Powered On

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors (Last 30 Days)
Users online (5,794)