Notifications
Announcements
I have a topic with variables that I want to display inside an adaptive card within a message node. The adaptive card does not process the ${var1} reference in the textblock element. Is this even possible?
Hi, @Brian-65.
When you create your adaptive card, you'll want to switch from JSON to Formula in the adaptive card properties, and once you've done that, you can reference topic variables via Topic.VariableName.
Below is a simple example where I'm referencing a UserName variable within the adaptive card:
{ type: "AdaptiveCard", '$schema': "http://adaptivecards.io/schemas/adaptive-card.json", version: "1.5", body: [ { type: "TextBlock", text: Topic.UserName, wrap: true } ] }
Find this post helpful? Please mark it as the solution and/or provide kudos so that it will help others in the future.Cheers,Matt
Hi @MattJimison. Thanks for the information. Is this documented anywhere? Also, is it possible to use the adaptive card editor to export the JSON is this format? I have a very large adaptive card.
@Brian-65 I'd recommend checking out:https://learn.microsoft.com/en-us/power-virtual-agents/unified-authoring-conversion#upgrading-to-power-virtual-agents-unified-authoring
Yes - you can use the Adaptive Card Designer (https://adaptivecards.io/designer/) to build your card, then copy/paste it into the adaptive card in PVA. Once you switch from JSON to Formula, you'll then be able to inject your own data. I recommend creating a copy of the JSON prior to switching to the Formula, though, because if you try and switch from Formula back to JSON, the entire card will get reset. This will allow you to more easily recover your card should you get into a situation where your Formula is erroring out and you want to start over again.
Here is a video explaining this in detail: https://www.youtube.com/watch?v=5qWIIyyMmxo
i was trying to see how to send the tkt ID back to the user using adaptive card. This video helped me
Hello @MattJimison,This was very helpful. But when I switch to Formula mode from JSON, there are no outputs from the adaptive cards. How to get outputs in Formula mode as well?
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.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Michael E. Gernaey 250 Super User 2025 Season 2
Romain The Low-Code... 197 Super User 2025 Season 2
S-Venkadesh 103 Moderator