简体   繁体   中英

Azure Logic App Post adaptive card and wait for response

I'm trying to grab the input text from a Teams Adaptive Card and use that in my logic app. Currently the response is not recorded in the logic app.

Any help would be appreciated!

{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "actions": [
        {
            "id": "Yes",
            "title": "Create Ticket",
            "type": "Action.Submit"
        },
        {
            "style": "positive",
            "title": "View in SentinelOne Portal",
            "type": "Action.OpenUrl",
            "url": "@{replace(outputs('URL'), '[', '')}"
        }
    ],
    "body": [
        {
            "size": "Large",
            "text": "@{triggerBody()?['subject']}",
            "type": "TextBlock",
            "wrap": true
        },
        {
            "items": [
                {
                    "text": "@{outputs('Compose_9')}",
                    "type": "TextBlock",
                    "wrap": true
                }
            ],
            "type": "Container"
        },
        {
            "type": "TextBlock",
            "text": "Ticket Info",
            "wrap": true
        }
    ],
    "msteams": {
        "width": "Full"
    },
    "type": "AdaptiveCard",
    "version": "1.5",
    "verticalContentAlignment": "Top"
}

Thanks, Jeremy

Managed to resolve this myself, the output of 'Post adaptive card and wait for response' doesn't give any output options so you have to format it yourself

Parse json, enter input in the expression field: @Outputs('adaptivecardname')?[body]

There are two similar actions to send an Adaptive Card in Power Automated - "Post adaptive card in a chat or a channel" and also "Post adaptive card and wait for a response". You need to use the 2nd one if you expect a response from the card.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM