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 / Copilot Studio / Problems with PVA and ...
Copilot Studio
Unanswered

Problems with PVA and Teams (Adaptive Card)

(0) ShareShare
ReportReport
Posted on by 14

I have a simople bot which gets Data From a flow and Builds an Adaptive Card and send the Card to the user. This is working fine if i test the Bot on a website or in the PVA Site. If i connect the pva bot to Teams this fails, the card is not displayed.

 

I followed the basic steps here:

Use Bot Framework Composer adaptive cards in chatbots - Power Virtual Agents | Microsoft Learn

 

This is my card in Bot Composer:

 

 

# adaptivecardjson_meals(location)
- ```
{
 "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
 "type": "AdaptiveCard",
 "version": "1.1",
 "body": [
 {
 "type": "ColumnSet",
 "columns": [
 {
 "type": "Column",
 "width": 5,
 "items": [
 {
 "type": "Image",
 "altText": "", 
 "url": "https://bilderspeicher01.blob.core.windows.net/bilder/mittagessen_tp.png",
 "size": "Medium"
 },
 {
 "type": "TextBlock",
 "text": "Gericht",
 "size": "ExtraLarge"
 }
 ]
 },
 {
 "type": "Column",
 "width": 1,
 "items": [
 {
 "type": "Container",
 "height": "stretch"
 },
 {
 "type": "TextBlock",
 "text": "Preis",
 "size": "ExtraLarge",
 "horizontalalignment": "right"
 }
 ],
 "height": "stretch"
 }
 ]
 },
 ${location}
 ]
}
```
# AdaptiveCardMeals(location)
[Activity
 Attachments = ${json(adaptivecardjson_meals(location))}
]
# SendActivity_BjdYcR()
- ${AdaptiveCardMeals(virtualagent.user_city)}
# SendActivity_PCTrcP()
[Activity
 Text = ${SendActivity_PCTrcP_text()}
]

# SendActivity_PCTrcP_text()
- Alles klar ich schaue mal was in der Küche los ist...
# SendActivity_vGGQJz()
[Activity
 Text = ${SendActivity_vGGQJz_text()}
]

# SendActivity_vGGQJz_text()
- Ich hoffe du findest etwas passendes :)
# SendActivity_7rDEFK()
- ${virtualagent.user_city}

 

 This is my Dialog in Composer:

MarcHer_0-1671115803216.png

Testing in PVA works fine:

MarcHer_1-1671115859393.png

In Teams it stops after showing the output (for debugging reason) and nothing more happens:

MarcHer_2-1671115953819.png

 

can anybody help?

 

Best regards

Marc

Categories:
I have the same question (0)
  • MarcHer Profile Picture
    14 on at

    can anybody help?

  • MattJimison Profile Picture
    579 Most Valuable Professional on at

    Am I reading this correctly in that the 'location' variable you're sending in is the additional JSON needed to add the individual menu items for that location? if so, it looks like that JSON is being output as text instead. Just wanting to make sure I'm interpreting your above information correctly. If so, I assume if you remove:

    ,
     ${location}

    that the static content above that line renders fine in Teams?

  • MarcHer Profile Picture
    14 on at

    Hey,

     

    yes i pass the menues with the variable to the static content. I did some further testing:

    MarcHer_0-1671608175162.png

    The red square is just the variable content which renders fine in teams:

    MarcHer_1-1671608221518.png

    The green square is an example out of bot composer:

    > To learn more Adaptive Cards format, read the documentation at
    > https://docs.microsoft.com/en-us/adaptive-cards/getting-started/bots
    - ```{
     "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
     "version": "1.2",
     "type": "AdaptiveCard",
     "body": [
     {
     "type": "TextBlock",
     "text": "default text",
     "weight": "bolder",
     "isSubtle": false
     }
     ]
    }```


    Which also renders fine in teams:

    MarcHer_2-1671608305071.png

     

    And the orange square is just the static code of the card without the content of the variable:

     

    - ```{
     "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
     "version": "1.4",
     "type": "AdaptiveCard",
     "body": [
     {
     "type": "ColumnSet",
     "columns": [
     {
     "type": "Column",
     "width": 5,
     "items": [
     {
     "type": "Image",
     "altText": "", 
     "url": "https://bilderspeicher01.blob.core.windows.net/bilder/mittagessen_tp.png",
     "size": "Medium"
     },
     {
     "type": "TextBlock",
     "text": "Gericht",
     "size": "ExtraLarge"
     }
     ]
     },
     {
     "type": "Column",
     "width": 1,
     "items": [
     {
     "type": "Container",
     "height": "stretch"
     },
     {
     "type": "TextBlock",
     "text": "Preis",
     "size": "ExtraLarge",
     "horizontalalignment": "right"
     }
     ]
     }
     ]
     }
     ]
    }```


    Which doesnt get rendered 😞

     

    MarcHer_3-1671608362664.png

     

    I dont have a clue at the moment 😞


    Best regards
    Marc

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

#1
Valantis Profile Picture

Valantis 177

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 130 Super User 2026 Season 1

#3
chiaraalina Profile Picture

chiaraalina 45 Super User 2026 Season 1

Last 30 days Overall leaderboard