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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Retrieve message id af...
Power Automate
Answered

Retrieve message id after posting message in Microsoft Teams after API update

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

I have a flow I've been using for the past few months that posts a message in Teams and then replies to the same message with more information.

I went in today to make changes to the flow and saw that the previous "post message" and "post a reply" actions were deprecated, so I updated to the newer versions of the actions. Now though, I can't find where to access the messageId - the documentation for the new "post message" action says that the action output is dynamic, and in my flow I can only access variables for the message, team id, and channel id.

khalper_0-1650316754313.png

 

With these new actions, how can I retrieve the messageId from the "post message" action so I can pass it in as a parameter to the "post a reply" action?

Categories:
I have the same question (0)
  • jiwhite Profile Picture
    498 on at

    It's hard to tell without seeing more of your flow. Can you access the message Id immediately after capturing the message, save the message Id to a variable, then use the variable to reply?  Variables are more flexible in their scope than connectors, so that may be a work around that you can use.

  • v-yujincui-msft Profile Picture
    on at

    Hi @khalper ï¼Œ

     

    Based on your description, I have created a flow on my side, it should work.

    Here is my Flow.

    vyujincuimsft_0-1650437683925.png

    Result Screenshot:

    vyujincuimsft_1-1650437727826.png

     

     

    Best Regards,

    Charlie Choi

  • khalper Profile Picture
    Microsoft Employee on at

    @jiwhite @v-yujincui-msft 
    Thank you for the help!

    Here's more info about the structure of my flow:

    khalper_1-1650458294738.png

    khalper_3-1650458403906.png

    I am posting the message inside an "If yes" scope, and then I have another condition check that determines whether or not I will reply to the original message.

     


    I tried the work-around with setting a messageId variable immediately after posting the message, but unfortunately it still doesn't show up in the dynamic content pane. 

    khalper_2-1650458374910.png


    Just to be sure, I created some test "post message" and "reply message" blocks at outermost level, so they're not inside any conditions or other scopes, but for some reason I still don't see the messageId as dynamic content:

    khalper_5-1650458732993.png

    I checked the "peek code" settings to make sure I wasn't somehow accidentally using the deprecated actions, and it looks like the operation IDs match the new actions from the documentation:

    khalper_6-1650458871755.png

    Do you have any other suggestions for what to try? Maybe it has something to do with me updating an existing flow and not creating a new one?

     

  • Verified answer
    jiwhite Profile Picture
    498 on at

    When posting to a chat or channel, I have no problem getting a message Id. Make sure that the variable is initialized as a String. Or, maybe you're right that because it's an existing flow, you're not getting the latest version of the connector, which has Message ID exposed.

     

    jiwhite_2-1650474886035.png

     

     

  • khalper Profile Picture
    Microsoft Employee on at

    The variable was initialized as a string, so I think I might just have to copy the flow logic over into a new flow. Thanks for looking into it!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard