
Announcements
I have a workflow that creates an adaptive card in Teams that asks for a response (Approve/Not Approve). That chat includes four people, all it is looking for is one person to approve. It updates a SharePoint list with the response.
The card could require some conversation so I would like the card (essentially a message in the chat) to be pinned to the top of the chat.
How do I pin the adaptive card (message) using the workflow? I can manually pin it in the Teams chat but cannot figure out how to do it in the workflow.
I believe there was a conversation started last year regarding this but a solution was not provided.
Thank you.
Hi @ghman22,
You should be able to use the pin a message in a chat method of the Graph API for this.
https://learn.microsoft.com/en-us/graph/api/chat-post-pinnedmessages?view=graph-rest-1.0&tabs=http
You can use the conversationId and the messageId of your Adaptive card in the body payload of that request.
Below is an example
{
"message@odata.bind":"https://graph.microsoft.com/v1.0/chats/@{outputs('Create_a_chat')?['body/id']}/messages/@{body('Post_adaptive_card_and_wait_for_a_response')['messageId']}"
}