cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Oskarkuus
Post Prodigy
Post Prodigy

Teams connection - how to get post/message ID from the post that just posted by flow?

How do i get a message/post ID from the team connection.

 

Screenshot 1: I create an adaptive card http://prntscr.com/t7d13o

I want flow to answer on this card

 

How to get the ID to the post that just posted?

Screenshot 2: http://prntscr.com/t7d18k

1 ACCEPTED SOLUTION

Accepted Solutions
stavi82
Frequent Visitor

It won't be in dynamic content. You'll need to create an expression for it.

 

outputs('<Card_Name>')?['body/messageID']

View solution in original post

4 REPLIES 4
Rahber
Solution Sage
Solution Sage

1) A flow can not respond to an adaptive card.

2) You will have a parameter for message ID or in the Body in dynamics content if the above action of posting supports a reply from Flow

 

At this moment if you post a Adaptive Card as Bot you wont get the message id.

teams post.PNG

 

Please click Accept as Solution if it resolved your problem or give it a Thumbs Up if it helped you in anyway this will allow other people to search correct solutions effectively.

Thanks,

Rahber

brettofthewild
Frequent Visitor

Hey @Oskarkuus, this can be done, regardless if there's an action for it or not. Here's the simple way I figured out how to do this:

 

brettofthewild_0-1629223074130.png

If you run the "Get messages" Teams action right after your Adaptive card, you can do a compose right after it to get the first message ID. Here's the function for "LatestMessageID". 

outputs('Get_messages')?['body']?['value'][0]?['id']

 

This has helped me after I post an adaptive card to be able to utilize the "Post a reply" action after it. 

Hope this helps! 

stavi82
Frequent Visitor

It won't be in dynamic content. You'll need to create an expression for it.

 

outputs('<Card_Name>')?['body/messageID']

finally someone got an answer for this 🙂 it worked. Thank you

Helpful resources

Announcements
MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power automate tips 768x460 v2.png

Restore a Deleted Flow

Did you know that you could restore a deleted flow? Check out this helpful article.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Users online (2,692)