Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Copilot Studio - General
Unanswered

Message with Adaptive card not displaying markdown when using Formula instead of JSON

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

The text block of an Adaptive card supports markdown.  So you can have a formatted list for example in a block with the value:

"Numbered list:\n1. one\n2. Two"

 

However, if you set a variable to that string and use that variable in an adaptive card, it does not display as markdown.  This makes formatting results from API calls or OpenAI sub-par.

 

See attached photos.

 

Categories:
  • BradLawrence Profile Picture
    Microsoft Employee on at
    Re: Message with Adaptive card not displaying markdown when using Formula instead of JSON

    Figured out a temporary workaround.  In the variable you will have to replace instances of "\n" with an explicit call to Char(10) to force an actual newline into the string.

     

    Substitute(dataToDisplay, "\n", Char(10))

     

    In our case, the data source is sending data back stripped of newlines and no formatting.  So we have to do something a little more intense:

     

    Substitute(Substitute(Substitute(dataToDisplay, "1.", Char(10)  & "1."), "2.", Char(10) & "2."), "3.", Char(10) & "3.")

     

    It's not a scalable / maintainable solution, but gets us some formatting for now.

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
Pablo Roldan Profile Picture

Pablo Roldan 33

#2
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 25

#3
stampcoin Profile Picture

stampcoin 10

Overall leaderboard