Hello Team,
I am using 'Post a message as the flow bot to the channel( preview)' for posting a message in a team channel and I am able to do that but am unable to figure out on how to get the message ID of this posted message as have to store this in my local storage for future references ( i,e to find replies of the message using a message ID )
Any pointers are highly appreciated
Hi @Phani,
The answer from @fchopo is working but I used a very short way to get the Teams message ID I want to reply to:
In Teams-channel use the 3-dot-menu (...) on the message you want to use in the workflow and select copy link. Then open a program to paste the copied link (i.e. notepad). When the copied link was pasted there, the message ID is in the link:
https://teams.microsoft.com/l/message/ ...bla... ?tenantId=... &groupId=...&parentMessageId=... &teamName=... &channelName=... &createdTime=... &allowXTenantAccess=true/false
The data between "parentMessageId=" and "&teamName=" is the message ID to be used in the workflow of Power Automate.
I have testet it and it works with replies and adaptive cards.
good luck and have fun!
Hello @Phani
You could use the following expression in a compose action to get the message id:
outputs('PostMessage')?['body/id']
Have a look at this example (I'v renamed the Post message to as the flow bot ..." to "PostMessage" for simplicity).
Hope it helps!
Ferran
Hi Phani,
This connector 'Post a message as the Flow bot to a channel' has no returns.
https://docs.microsoft.com/en-us/connectors/teams/#post-a-message-as-the-flow-bot-to-a-channel
You could utilize get messages under above action to parse Odata message or just use ‘Post a message (V3)’ as workaround.
https://docs.microsoft.com/en-us/connectors/teams/#getmessagesfromchannel_response
https://docs.microsoft.com/en-us/connectors/teams/#post-a-message-(v3)-(preview)
stampcoin
97
Michael E. Gernaey
70
Super User 2025 Season 1
David_MA
48
Super User 2025 Season 1