cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amkeller16
Regular Visitor

Adaptive Card: Response is empty when received from trigger "When someone responds to an adaptive card."

Hi all, 

 

Our company has regular live-stream presentations and learning events. Often they are a hybrid of in-person and virtual, in that some will gather in one of 3 offices to watch the stream in a meeting room, while some will stream remotely. 

 

People will respond via an Outlook event, but this does not tell me where they will be attending, which is important for room reservations, timing, snacks, supplies, etc.

 

  1. I set up a flow to send an HTTP request to the Outlook event and get the responses, then pass that info to a sharepoint list. This part works great. 
  2. Next, I set up a test so that I'll be able to send an adaptive card to those who have accepted the invite to confirm which location they will be using. This will need to be sent to multiple users in an "Apply to each" loop, so "waiting for a response" is not an option.
    • Test flow 1 successfully posts a card in chat with flow bot 
    • PROBLEM: Test flow 2 kicks off with the "When someone responds to an adaptive card" trigger. The flow "succeeds," but no usable information is passed. 
      • Same JSON is used for flows 1 and 2 
      • Card type ID is the same

Any ideas, suggestions, or commiserations to be had? Thanks in advance!

 

Here's the JSON for inputs on both flows:

 

 

{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "TextBlock",
            "size": "Large",
            "weight": "Bolder",
            "text": "Event Status"
        },
        {
            "type": "ColumnSet",
            "columns": [
                {
                    "type": "Column",
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "test",
                            "weight": "Bolder",
                            "wrap": true
                        },
                        {
                            "type": "TextBlock",
                            "spacing": "None",
                            "text": "test",
                            "isSubtle": true,
                            "wrap": true
                        }
                    ],
                    "width": "stretch"
                }
            ]
        },
        {
            "type": "TextBlock",
            "text": "Hey there! You recently accepted an invitation to a hybrid Learning Event. To get an accurate headcount, can you click one of the options below?",
            "wrap": true
        }
    ],
    "actions": [
        {
            "type": "Action.Submit",
            "title": "I'll be attending in-office - Office 1",
        },
        {
            "type": "Action.Submit",
            "title": "I'll be attending in-office - Office 2",
        },
        {
            "type": "Action.Submit",
            "title": "I'll be attending in-office - Office 3",
        },
        {
            "type": "Action.Submit",
            "title": "I'll be attending remotely",
        }
    ],
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "version": "1.3"
}

 

 

 

 

Here is the output after the user responds:

 

 

//Inputs//
{
    "schema": {
        "type": "object",
        "properties": {},
        "required": []
    },
    "host": {
        "connection": {
            "name": "@parameters('$connections')['shared_teams_1']['connectionId']"
        },
        "api": {
            "runtimeUrl": "https://flow-apim-unitedstates-002-westus-01.azure-apim.net/apim/teams"
        }
    },
    "operationId": "TeamsCardTrigger",
    "parameters": {
        "inputsAdaptiveCard": "{\n    \"type\": \"AdaptiveCard\",\n    \"body\": [\n        {\n            \"type\": \"TextBlock\",\n            \"size\": \"Large\",\n            \"weight\": \"Bolder\",\n            \"text\": \"Event Status\"\n        },\n        {\n            \"type\": \"ColumnSet\",\n            \"columns\": [\n                {\n                    \"type\": \"Column\",\n                    \"items\": [\n                        {\n                            \"type\": \"TextBlock\",\n                            \"text\": \"test\",\n                            \"weight\": \"Bolder\",\n                            \"wrap\": true\n                        },\n                        {\n                            \"type\": \"TextBlock\",\n                            \"spacing\": \"None\",\n                            \"text\": \"test\",\n                            \"isSubtle\": true,\n                            \"wrap\": true\n                        }\n                    ],\n                    \"width\": \"stretch\"\n                }\n            ]\n        },\n        {\n            \"type\": \"TextBlock\",\n            \"text\": \"Hey there! You recently accepted an invitation to a hybrid Learning Event. To get an accurate headcount, can you click one of the options below?\",\n            \"wrap\": true\n        }\n    ],\n    \"actions\": [\n        {\n            \"type\": \"Action.Submit\",\n            \"title\": \"I'll be attending in-office - Office 1\",\n        },\n        {\n            \"type\": \"Action.Submit\",\n            \"title\": \"I'll be attending in-office - Office 2\",\n        },\n        {\n            \"type\": \"Action.Submit\",\n            \"title\": \"I'll be attending in-office - Office 3\",\n        },\n        {\n            \"type\": \"Action.Submit\",\n            \"title\": \"I'll be attending remotely\",\n        }\n    ],\n    \"$schema\": \"http://adaptivecards.io/schemas/adaptive-card.json\",\n    \"version\": \"1.3\"\n}",
        "CardTypeId": "test2"
    }
}

 

 

 

 

//Outputs//

"body": {
        "entity": {
            "teamsFlowRunContext": {
                "MessagePayload": {
                    "Id": "1660854805557",
                    "From": {
                        "Application": null,
                        "Conversation": null,
                        "Device": null,
                        "User": {
                            "DisplayName": "Automate",
                            "Id": "981122ad-da9a-4be9-a1d4-b9a7f910034f"
                        }
                    },
                    "Body": {
                        "ContentType": null,
                        "Content": null
                    },
                    "Subject": null,
                    "LinkToMessage": "https://teams.microsoft.com/l/message/19:981122ad-da9a-4be9-a1d4-b9a7f910034f_358f0194-6b0e-4dd3-af35-c24fe8a9ec87@unq.gbl.spaces/1660854805557?context=%7B%22contextType%22:%22chat%22%7D"
                },
                "Id": null,
                "ChannelData": null,
                "From": {
                    "Id": "28:358f0194-6b0e-4dd3-af35-c24fe8a9ec87",
                    "Name": "Flow",
                    "Role": null,
                    "AadObjectId": null,
                    "Properties": null
                },
                "Conversation": {
                    "Id": "19:981122ad-da9a-4be9-a1d4-b9a7f910034f_358f0194-6b0e-4dd3-af35-c24fe8a9ec87@unq.gbl.spaces",
                    "Name": null,
                    "IsGroup": null
                },
                "Locale": "en-US",
                "CommandContext": null,
                "LocalTimezone": null
            },
            "cardOutputs": {}
        }

 

 

0 REPLIES 0

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.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Users online (3,866)