adaptive-cards

Adding an adaptive card to bot framework with python

依然范特西╮ 提交于 2019-12-05 02:06:58
问题 I am playing a little bit with the samples of the bot framework in python from here https://github.com/Microsoft/botbuilder-python Now I want to add a simple adaptive card to the response which I believe it is the part where it says await context.send_activity(response) but I can not attach the card. I grabbed the card from the docs sample: { "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.0", "body": [ { "type": "Container", "items": [ {

Adaptive Cards in Carousel Layout in Facebook Messenger using Bot Framework

旧巷老猫 提交于 2019-12-04 17:19:08
I was trying to use Adaptive Cards for my chatbot using Bot Framework, to use in FB Messenger, with a carousel layout. But apparently FB doesn't support Adaptive Cards, and renders them into an image + buttons. So what I wanted to know, as a way to go around it, was if it's possible to manually render the adaptive cards Json code into images, and use those images for the layout. I've tried simply adding the cards as they were and setting the layout, but Facebook simply lists them, not in carousel. I'm building with .NET. You have more flexibility if you use the facebook messenger native

How to retrieve user entered input in adaptive card to the c# code and how to call next intent on submit button click

与世无争的帅哥 提交于 2019-12-04 05:45:54
问题 I have a date picker adaptive card which I call during an intent call. I am not getting as to how can I get value entered by the user and pass it to my bot luis where I will be having an intent which will get triggered with those values I have tried parsing the adaptive card json but I want the updated json with user entered values in it on submit button click. private Attachment CreateAdaptiveCardAttachment() { // combine path for cross platform support string[] paths = { ".", "Cards",

Adding an adaptive card to bot framework with python

六眼飞鱼酱① 提交于 2019-12-03 17:26:05
I am playing a little bit with the samples of the bot framework in python from here https://github.com/Microsoft/botbuilder-python Now I want to add a simple adaptive card to the response which I believe it is the part where it says await context.send_activity(response) but I can not attach the card. I grabbed the card from the docs sample: { "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.0", "body": [ { "type": "Container", "items": [ { "type": "TextBlock", "text": "Publish Adaptive Card schema", "weight": "bolder", "size": "medium" }, {

Microsoft Teams Webhook Generating 400 for Adaptive Card

こ雲淡風輕ζ 提交于 2019-12-03 13:55:11
I have a functioning webhook to a Teams channel to which I can successfully post messages. I am now trying to post an adaptive card to the webhook. Using Postman and performing a Post to https://outlook.office.com/webhook/xyz , with Content-Type set to application/json in the header and the following adaptive card set in the body. { "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.0", "speak": "Nothing to say.", "body": [ { "type": "TextBlock", "text": "Hello Teams' user" } ] } With this I receive a 400 Bad Request and "Summary or Text is

Capture values submitted by Adaptive Card in waterfall dialog

江枫思渺然 提交于 2019-12-02 13:10:22
I have followed the advice of this question , the comment on this issue and also this answer . Inside my Waterfall Dialog: Displaying the adaptive card Sending a text prompt right after displaying an adaptive card Inside my main bot class: Setting the Text property of the Activity to that of the extracted value from the Value property of the activity if the activity is a message that contains postback data. I have tried using a AdaptiveTextInput or AdaptiveDateInput as the control to submit the value but it doesn't make a difference. I feel like it's going to be something really silly.. I am

How to retrieve user entered input in adaptive card to the c# code and how to call next intent on submit button click

巧了我就是萌 提交于 2019-12-02 10:07:51
I have a date picker adaptive card which I call during an intent call. I am not getting as to how can I get value entered by the user and pass it to my bot luis where I will be having an intent which will get triggered with those values I have tried parsing the adaptive card json but I want the updated json with user entered values in it on submit button click. private Attachment CreateAdaptiveCardAttachment() { // combine path for cross platform support string[] paths = { ".", "Cards", "AddingLeaveDetails.json" }; string fullPath = Path.Combine(paths); var adaptiveCard = File.ReadAllText

MS Chat Bot --How to access custom adaptive card properties from my C# code

时光总嘲笑我的痴心妄想 提交于 2019-12-02 07:49:10
问题 How to dynamically change my custom adaptive card's text property value from within my C# code? Here is my C# code public static Attachment CreateMySearchCardAttachment() { // combine path for cross platform support string[] paths = { ".", "Resources", "MySearchCard.json" }; var MySearchCardJson = File.ReadAllText(Path.Combine(paths)); var adaptiveCardAttachment = new Attachment() { ContentType = "application/vnd.microsoft.card.adaptive", Content = JsonConvert.DeserializeObject

'AdaptiveCard' does not contain a definition for 'FromJson'--Microsoft Bot Framework

99封情书 提交于 2019-12-02 07:27:22
问题 I have tried creating an adaptive card, parsing it from json. As mentioned in https://docs.microsoft.com/en-us/adaptive-cards/create/libraries/net#example-parse-from-json, I have installed AdaptiveCards package and tried using that function, but it throws a error like 'AdaptiveCard' does not contain a definition for 'FromJson'. 回答1: As there is a Breaking changes from v0.5: Package renamed from Microsoft.AdaptiveCards to AdaptiveCards It seems that you have installed Microsoft.AdaptiveCards

How to update an adaptive card which is already sent to user from BOT?

 ̄綄美尐妖づ 提交于 2019-12-02 05:26:26
I have already sent the card with capturing the details and with buttons.After clicking on submit from task module which will save details through http API here the activity type is Invoke. Now i have to update the existing adaptive Card. I have the code to update the message, but how to update the card or resend the card again. connector = new ConnectorClient(new Uri(activity.ServiceUrl)); reply = activity.CreateReply($"You sent {activity.Text} which was {activity.Text.Length} characters"); var msgToUpdate = await connector.Conversations.ReplyToActivityAsync(reply); Activity updatedReply =