cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Oskarkuus
Super User
Super User

How to send adaptive card containing rich text and/or all types of characters?

Hi

How can i send adaptive card to microsoft teams using the teams connector in flow for adaptive cards with flow-bot.

Cards that contain invalid characters and/or rich text.

 

looking at https://adaptivecards.io/designer/ i can see that there are a textblock for rich text.

but i dont know how to use it.

 

i have a powerapp and i want to send rich text to teams in adaptive cards.

 

 

i get error message running my flow´s complaining about invalid characters.

 

Microsoft.Azure.ProcessSimple.Data.Entities.Exceptions.ProcessSimpleDataException: Den angivna adaptiva kortbegäran för Teams-flowbot saknas eller är ogiltig. Spårnings-ID:t är {0}. ---> Newtonsoft.Json.JsonReaderException: After parsing a value an unexpected character was encountered: K. Path 'body[1].inlines[0].text', line 15, position 32.

 

My card just for test looks like this:

{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "TextBlock",
            "size": "Medium",
            "weight": "Bolder",
            "text": "Exempel"
        },
        {
            "type": "RichTextBlock",
            "inlines": [
                {
                    "type": "TextRun",
                    "text": "@{triggerBody()['Postadaptivecardinachatorchannel_AdaptiveCard_2']}"
                }
            ]
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.4"
}


This is the connector:

Oskarkuus_0-1649949395160.png

 

 

Any solution to getting the message to print?

This is the message when running the flow:

{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "TextBlock",
            "size": "Medium",
            "weight": "Bolder",
            "text": "Exempel"
        },
        {
            "type": "RichTextBlock",
            "inlines": [
                {
                    "type": "TextRun",
                    "text": "<p><strong>kk</strong></p><p> </p><p><u><strong>kk</strong></u></p><p> </p><p><a href="http://www.google.se"><u><strong>lll</strong></u></a></p>"
                }
            ]
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.4"
}

 

This text:

Oskarkuus_1-1649949614065.png


Comes from a rich texteditor from powerapps

So how to push that into a adaptive card in Teams?

2 REPLIES 2
sdholbrook3
Advocate I
Advocate I

I am encountering this same issue, did anyone resolve it? 

Sadly not.  I had to do a compose action to clean the text from characters that cause an error.  Id love to see the ability to post the same things as any user can post in teams. 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (2,315)