Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
Unanswered

Populating an Adaptive Card RichTextBlock from output from Gen AI

(0) ShareShare
ReportReport
Posted on by 12

Rather than plain text responses from Gen AI, I'd like it to be more well-formatted and hierarchal.
With a little prompt engineering, I can have OpenAI respond with a RichTextBlock formatted response (something like below).

 

Detail what's involved in a Microsoft Partnership. Provide the well-formatted response as code for inclusion within a Microsoft AdaptiveCard RichTextBlock. The json schema will be 

[{ "type": "TextRun",
 "text": "Microsoft Partnership Overview\n",
 "weight": "Bolder", // lighter, default
 "size": "Large", // small, default, medium, extraLarge,
 "italic": true // optional
 }, {}..]

 

 

I can parse the result into a table variable that works when copied and pasted into AdaptiveCardDesigner (with a 1.5 schema).

My question is; for CopilotStudio, how do I bind the table so that can populate the adaptive card correctly?
Below is the Adaptive Card portion of the Topic:

 

- kind: SendActivity
 id: sendActivity_IGejwb
 activity:
 attachments:
 - kind: AdaptiveCardTemplate
 cardContent: |-
 ={
 type: "AdaptiveCard",
 '$schema': "http://adaptivecards.io/schemas/adaptive-card.json",
 version: "1.6",
 body: [
 {
 type: "RichTextBlock",
 inlines: 
 ForAll(Topic.VarTable,
 {
 type: "TextRun",
 text: text,
 weight: weight,
 size: size,
 italic: italic,
 wrap: true
 }
 )
 }
 ]
 }

 


Unfortunately, it simply displays an empty message.
Earlier messages confirm the table var is correctly populated.

Categories:

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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Leaderboard > Copilot Studio - General

#1
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 74

#2
Pablo Roldan Profile Picture

Pablo Roldan 61

#3
stampcoin Profile Picture

stampcoin 10

Overall leaderboard