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 / Logic Apps MS Teams Co...
Power Automate
Unanswered

Logic Apps MS Teams Connector - MessageId Not Available for TimedOut Actions with Adaptive Cards

(0) ShareShare
ReportReport
Posted on by
Currently, MS Teams connector of logic apps has an action to "Post Adaptive Card and Wait for Response" where we can send out adaptive card with response buttons based on the requirement. Post button click from end user, the respective data is recorded in the action including user email address and the selected option. However, if the action times out, there is no data sent back to action like MessageId, etc which causes the flow to break.

Due to this, downstream workflow is unable to update the same message stating no response retrieved from the user since it is a webhook integration to MS teams. There are no ways to add unique value to timed out MS Teams message via Adaptive Card to retrieve the specific message using the unique value through "Get Messages".

We cannot determine based on the message created time since our workflow is sentinel trigger based and at the same time, we can get multiple messages hence filtering is required using unique value only.

If MS Teams connector is able to provision the data back like MessageId even in timed out scenarios, it would be good for automation flow to determine the state of next steps or adaptive card to support adding Subject or Summary to identify the message
Categories:
I have the same question (0)
  • Suggested answer
    Flow-Rida Profile Picture
    2 on at
    Hello,

    to retreive the message id you can use a parallel branch in combination with a variable.
    The variable for the message id then can be used in the "Update an adaptive card in chat or channel".
    Also you have to set the run after conditions to run after success and time out of the previous action.


    Version 1 - Channel:
    Get Messages gives you the ids of the last messages sent. To get the ID of the last message you have to use the following code in the Set variable action: 
    outputs('Get_messages')?['body/value']?[0]?['id']




    Version 2 - Private Message:
    For private messages you have to use a different action. 
    The send a microsoft graph http requests gets you the last message sent with the following url in combincation with a GET action.
    https://graph.microsoft.com/v1.0/me/chats/{conversationID}/messages?top=1

    You get the conversation ID by using the MS Teams action "Create a chat".

    Then you have to set the variable using the following code:
    body('Send_a_Microsoft_Graph_HTTP_request-GetMessageID')?['value']?[0]?['id']




    The delay in both versions is being used to make sure the message has already been sent. Otherwise there sometime occured the problem that the message was not sent yet the message id was set to the message before.

    In case of any questions, let me know.
    Hope this helps you!

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard