Closed samueleorfei closed 4 years ago
Hi @samueleorfei, can you provide an example adaptive card for repro?
This is the adaptive card in the bot chat emulator
This is Telegram's error
@samueleorfei could you please select that card in the emulator and paste the JSON here
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"contentType": "application/vnd.microsoft.card.adaptive",
"content": {
"type": "AdaptiveCard",
"version": "1.0",
"body": [{
"type": "Container",
"items": [{
"type": "Container",
"items": [{
"type": "ColumnSet",
"columns": [{
"type": "Column",
"width": "auto",
"items": [{
"type": "TextBlock",
"weight": "bolder",
"size": "large",
"text": "Name:",
"wrap": true
}]
},
{
"type": "Column",
"width": "stretch",
"items": [{
"type": "Input.Text",
"id": "Name",
"placeholder": "Name"
}]
}
]
},
{
"type": "ColumnSet",
"columns": [{
"type": "Column",
"width": "auto",
"items": [{
"type": "TextBlock",
"weight": "bolder",
"size": "large",
"wrap": true,
"text": "Surname:"
}]
},
{
"type": "Column",
"width": "stretch",
"items": [{
"type": "Input.Text",
"id": "Surname",
"placeholder": "Surname"
}]
}
]
},
{
"type": "ColumnSet",
"columns": [{
"type": "Column",
"width": "auto",
"items": [{
"type": "TextBlock",
"weight": "bolder",
"size": "large",
"wrap": true,
"text": "Email:"
}]
},
{
"type": "Column",
"width": "stretch",
"items": [{
"type": "Input.Text",
"id": "Email",
"placeholder": "Contact email"
}]
}
]
},
{
"type": "ColumnSet",
"columns": [{
"type": "Column",
"width": "auto",
"items": [{
"type": "TextBlock",
"text": "Title:",
"wrap": true,
"weight": "bolder",
"size": "large"
}]
},
{
"type": "Column",
"width": "stretch",
"items": [{
"type": "Input.Text",
"id": "Title",
"placeholder": "Problem's title"
}]
}
]
},
{
"type": "ColumnSet",
"columns": [{
"type": "Column",
"width": "auto",
"items": [{
"type": "TextBlock",
"text": "Description:",
"wrap": true,
"weight": "bolder",
"size": "large"
}]
},
{
"type": "Column",
"width": "stretch",
"items": [{
"type": "Input.Text",
"isMultiline": true,
"id": "Description",
"placeholder": "Problem's description"
}]
}
]
},
{
"type": "ColumnSet",
"columns": [{
"type": "Column",
"width": "auto",
"items": [{
"type": "TextBlock",
"text": "Priority:",
"wrap": true,
"weight": "bolder",
"size": "large"
}]
},
{
"type": "Column",
"width": "stretch",
"items": [{
"type": "Input.ChoiceSet",
"id": "Priority",
"style": "compact",
"value": "Low",
"isMultiSelect": false,
"choices": [{
"title": "High",
"value": "High"
},
{
"title": "Medium",
"value": "Medium"
},
{
"title": "Low",
"value": "Low"
}
]
}]
}
]
},
{
"type": "ColumnSet",
"columns": [{
"type": "Column",
"width": "auto",
"items": [{
"type": "TextBlock",
"text": "Company:",
"wrap": true,
"weight": "bolder",
"size": "large"
}]
},
{
"type": "Column",
"width": "stretch",
"items": [{
"type": "Input.ChoiceSet",
"id": "Company",
"style": "expanded",
"value": "",
"isMultiSelect": false,
"choices": [{
"title": "Val1",
"value": "Val1"
},
{
"title": "Val2",
"value": "Val2"
},
{
"title": "Val3",
"value": "Val3"
}
]
}]
}
]
},
{
"type": "ColumnSet",
"columns": [{
"type": "Column",
"width": "auto",
"items": [{
"type": "TextBlock",
"text": "Specify:",
"wrap": true,
"weight": "bolder",
"size": "large"
}]
},
{
"type": "Column",
"width": "stretch",
"items": [{
"type": "Input.Text",
"id": "Specify",
"placeholder": "Specify Company"
}]
}
]
}
]
}]
}],
"actions": [{
"type": "Action.Submit",
"title": "Next"
}]
}
}```
Thanks @samueleorfei. I'll post back here after some investigation.
@samueleorfei your Adaptive Card JSON has some errors. You can edit and validate your JSON using the Adaptive Card visualizer: http://adaptivecards.io/visualizer/index.html.
I wonder if correcting these errors will allow it to render in Telegram.
No action on this one in a long time. Please reactivate if your issue isn't resolved.
Hi Im experiencing the same issue. Where my Adaptive Card renders fine in the Emulator and Web Chat
bot doesn't seem to work in Telegram.
{ "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.3", "body": [ { "type": "Image", "url": "https://i.ibb.co/b2xtqWX/SIMONLOGO.png", "size": "Stretch" }, { "type": "TextBlock", "size": "Large", "weight": "Bolder", "text": "Welcome to Simon", "wrap": true, "maxLines": 0, "horizontalAlignment": "Center" } ], "actions": [ { "type": "Action.OpenUrl", "title": "Homepage", "url": "https://adaptivecards.io/designer/", "style": "positive" } ] }
Hi @LinusUngerer, Bot Framework channels are currently on version 1.2 of the Adaptive Card Schema. Can you change your version
property to 1.2
.
This can also be changed in the Designer in the top right
Hi @matthidinger I have done so and have gotten some cards working now however any cards I try with any clickable buttons be that on an image or open URL button. Doesn't seem to work. It doesn't come through on the chat and the bot then ends up hanging and crashing. Is there a reason for this or something I could fix?
I am also facing the same issue in the telegram channel for the simple adaptive cards. Its rendered as an Image in version 1.2.
When the bot send the adaptive card (with textbox, text input, choice set and submit buttons), the Telegram channel returns "can't parse inline keyboard button: Text buttons are unoallowed in the inline keyboard".