web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Get MessageID of the m...
Power Automate
Answered

Get MessageID of the message after posted in team channel

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

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 

Categories:
I have the same question (0)
  • Verified answer
    Sutherland Profile Picture
    Microsoft Employee on at

    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) 

  • Verified answer
    fchopo Profile Picture
    8,003 Moderator on at

    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).

    postMessage.png

     

    Hope it helps!

    Ferran

  • xpl0sion Profile Picture
    7 on at

    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!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 557

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 264 Super User 2026 Season 1

Last 30 days Overall leaderboard