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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Creating Adaptive Card...
Power Automate
Unanswered

Creating Adaptive Cards with mentions dynamically

(0) ShareShare
ReportReport
Posted on by

Hello,

 

We are sending adaptive cards using an incoming webhook (Adaptive Card).

We are also using mentions to tag users according to their email addresses. This works fine. 

Internally, before sending the card to MS Teams, we use placeholders to provide user information and replace our placeholders with either user information or an empty value.

 

Please find below our adaptive card format before placeholder evaluation:

 

 

 

 

 

{
 "type": "message",
 "attachments":
 [
 {
 "contentType": "application/vnd.microsoft.card.adaptive",
 "content":
 {
 "type": "AdaptiveCard",
 "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
 "version": "1.2",
 "body":
 [
 {
 "type": "TextBlock",
 "text": "Updated item",
 "size": "Large",
 "weight": "Bolder",
 "style": "heading",
 "wrap": true
 },
 {
 "type": "TextBlock",
 "text": "<at>#{assigneeName}</at>, the item has been updated.",
 "wrap": true
 },
 {
 "type": "FactSet",
 "facts":
 [
 {
 "title": "Title",
 "value": "#{title}"
 },
 {
 "title": "Type",
 "value": "#{type}"
 }
 ]
 },
 {
 "type": "ActionSet",
 "actions":
 [
 {
 "type": "Action.OpenUrl",
 "title": "Open item link",
 "url": "https://powerusers.microsoft.com",
 "id": "Dummy"
 }
 ]
 }
 ],
 "msteams":
 {
 "entities":
 [
 {
 "type": "mention",
 "text": "<at>#{assigneeName}</at>",
 "mentioned":
 {
 "id": "#{assigneeId}",
 "name": "#{assigneeName}"
 }
 }
 ]
 }
 }
 }
 ]
}

 

 

 

 

 

When our variables assigneeId and assigneeName are not empty, user information is provided in the payload and the adaptive card is created properly. 

However, we noticed that the adaptive card is not created at all if the variables assigneeId and assigneeName are resolved as empty strings. In addition, no error message is returned by the incoming webhook. Only a 200 error code is sent back. 

 

We also tried to remove the 'at mention' in the text block and let the mention block below but we got the same result: the adaptive card can't be created. 

 

Is there a property from the mention entity we could leverage to ignore the mention?

Alternatively, can we use a generic mention like @General as a fallback? 

Any suggestions would be appreciated. 

 

Thanks and best regards,
Sophie

Categories:
I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 112 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 52

#3
Ellis Karim Profile Picture

Ellis Karim 51 Super User 2026 Season 1

Last 30 days Overall leaderboard