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 / Update Subject in a Te...
Power Automate
Unanswered

Update Subject in a Teams Adaptive Card Message

(1) ShareShare
ReportReport
Posted on by 24
Hi,
 
In one of my flows I am creating a teams post using 'Post card in a chat or channel' action , then updating the same post using ,Update an adaptive card in a chat or channel, action.
 
In the Update action I don't see the Subject field and when using the update action the entire post is replace with the new one including the Original Subject.
 
Is there a way to update the Subject as well using the Update action or just keep the original Subject?
 
Can someone please help?
Thanks
Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,189 Most Valuable Professional on at
    You can use a PATCH request with the Update a Channel message of the Graph API for this:
     
    Below is an example
    The body in the PATCH request uses the subject of the Post card in a chat or channel message action.. It reuses the card body from the Update an adaptive card in a chat or channel action. The example also uses a string variable to generate a unique id with the guid function.
     
    URI
    https://graph.microsoft.com/v1.0/teams/@{actions('Post_card_in_a_chat_or_channel')['inputs']['parameters']['body/recipient/groupId']}/channels/@{actions('Post_card_in_a_chat_or_channel')['inputs']['parameters']['body/recipient/channelId']}/messages/@{outputs('Post_card_in_a_chat_or_channel')?['body/id']}
     
    Body
    {
    "subject": "@{actions('Post_card_in_a_chat_or_channel')['inputs']['parameters']['body/subject']}",
    "body": {
        "contentType": "html",
        "content": "<attachment id=\"@{variables('Guid')}\"></attachment>"
      },
    "attachments": [
    {
                "id": "@{variables('Guid')}",
                "contentType": "application/vnd.microsoft.card.adaptive",
                "contentUrl": null,
                "content": "@{replace(actions('Update_an_adaptive_card_in_a_chat_or_channel')['inputs']['parameters']['body/messageBody'], '"', '\"')}",
                "name": null,
                "thumbnailUrl": null
            }
    ]
    }
     

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