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 / Copilot Studio / How-To access topic va...
Copilot Studio
Answered

How-To access topic variables from within an adapative card in a message node

(1) ShareShare
ReportReport
Posted on by 7

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?

Categories:
I have the same question (0)
  • MattJimison Profile Picture
    577 Most Valuable Professional on at

    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.

     

    MattJimison_0-1686941640425.png

     

     

     

    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

  • Brian-65 Profile Picture
    7 on at

    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.

  • Verified answer
    MattJimison Profile Picture
    577 Most Valuable Professional on at

    @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.

     


    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

  • cloudatica Profile Picture
    42 on at

    Here is a video explaining this in detail: https://www.youtube.com/watch?v=5qWIIyyMmxo 

  • aparnaa Profile Picture
    95 on at

    i was trying to see how to send the tkt ID back to the user using adaptive card. This video helped me 

     

  • MurtuzaD Profile Picture
    24 on at

    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.

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 > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 250 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 197 Super User 2025 Season 2

#3
S-Venkadesh Profile Picture

S-Venkadesh 103 Moderator

Last 30 days Overall leaderboard