SOLVED

Flow don't create adaptive card just put json in text

Brass Contributor

I writed a PowerApps that call a Flow to create an adaptive card in Teams but Teams displays the json code and not the card. I compare this to adaptive card designer and don't find why.

Json passed from PowerApps to Flow:

{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "Container",
            "items": [
                {
                    "type": "TextBlock",
                    "size": "Medium",
                    "weight": "Bolder",
                    "text": "Pour approbation"
                },
                {
                    "type": "ColumnSet",
                    "columns": [
                        {
                            "type": "Column",
                            "items": [
                                {
                                    "type": "TextBlock",
                                    "weight": "Bolder",
                                    "text": "Patrick Sanouiller",
                                    "wrap": true
                                }
                            ],
                            "width": "stretch"
                        }
                    ]
                }
            ]
        },
        {
            "type": "Container",
            "items": [
                {
                    "type": "TextBlock",
                    "text": "Test adaptive card",
                    "wrap": true
                },
                {
                    "type": "FactSet",
                    "facts": [
                        {
                            "title": "Date limite:",
                            "value": "30/06/2019"
                        }
                    ]
                }
            ]
        }
    ],
    "actions": [        {
            "type": "Action.OpenUrl",
            "title": "Oui",
            "url": "http://url1"
        },        {
            "type": "Action.OpenUrl",
            "title": "Non",
            "url": "http://url2"
        }    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.0"
}

 

4 Replies
best response confirmed by Patrick Sanouiller (Brass Contributor)
Solution

Sorry a big mistake a caracter hidden. I recreated flow and it works

@Patrick Sanouiller 

 

Hi, I am looking to do just this (post an Adaptive card) for now, triggered by a button in a PowerApp. 

 

I wonder, what did you place in your powerapp 'OnSelect' action to trigger the flow?

 

In the 'OnSelect' action of a button, I have NameofFlow.Run( and then the JSON as copied from the Adaptive Card Designer with no amends as yet) and I get the error:

 

Invalid Argument Type (Record). Expecting a text value instead.

 

Any ideas please?

 

 

@Russell Myers have a look on this video if it helps.

Great, thank you!

1 best response

Accepted Solutions
best response confirmed by Patrick Sanouiller (Brass Contributor)
Solution

Sorry a big mistake a caracter hidden. I recreated flow and it works

View solution in original post