Teams Message Card Input Value Substitution does not provide the inputs
Hello,
I am working on integrating a MS Teams Actionable messages via the Webhook with our App.
As part of this I need to collect several inputs from the user and then send the data using the HttpPOST
action. As described in https://learn.microsoft.com/en-us/outlook/actionable-messages/message-card-reference#input-value-substitution I want to send the inputs as part of the body. For this I am specifying the following payload for the Actionable Message:
{
"summary": "Elbonians are coming!",
"themeColor": "006400",
"@type": "MessageCard",
"potentialAction": [
{
"@type": "OpenUri",
"name": "See what they are up to",
"@context": "http://schema.org/extensions",
"targets": [
{
"os": "default",
"uri": "https://dilbert.fandom.com/wiki/Elbonia"
}
]
},
{
"@type": "ActionCard",
"name": "Send them a message",
"@context": "http://schema.org/extensions",
"inputs": [
{
"isMultiSelect": "false",
"@type": "MultichoiceInput",
"id": "messageType",
"isRequired": "true",
"title": "What kind of message?",
"choices": [
{
"display": "Nice",
"value": "nice_message"
},
{
"display": "Nasty",
"value": "nasty_message"
}
]
}
],
"actions": [
{
"@type": "HttpPOST",
"name": "Send",
"target": "https://target.company.com",
"body": "messageType={{messageType.value}}",
"headers": [
{
"name": "CARD-ACTION-STATUS",
"value": "TestValue"
}
]
}
]
}
],
"@context": "http://schema.org/extensions",
"sections": [
{
"activitySubtitle": "ElboCo",
"activityTitle": "Elbonians are coming",
"activityImage": "https://static.wikia.nocookie.net/dilbert/images/5/5b/Elbonia.jpg/revision/latest?cb=20150622164352",
"markdown": true
}
]
}
This produces a nice message exactly as expected:
The problem is that after filling in the value and executing the HttpPOST
action the input field is not injected and the body looks like this, while I would expect the body to be messageType=nasty_value
I have tried many time different formats of the value injection, however I have always received just the text around, never the value.
Thanks for looking at this.
Jan