Retrieve data from MS Teams Input via Submit button Adaptive card

Hi everyone,

Below is what i intent to do:

image

Allow the user to type their idea into the box, and click “Submit” so i can capture the complete sentence by them.

My question is, how can we retrieve the complete data in custom action from the Input textbox?

Thank you.

2 Likes

I haven’t used MS Teams, but it looks like this blog post walks through how to use adaptive cards w/ Rasa.

1 Like

This doesn’t show how to get data from ms teams message blocks in rasa.

Hey Jeff! I’ve run into similar issue! Can you please tell if you’ve worked with this, how to handle ‘INTENTS’ from Buttons in Custom_json_payload from Rasa actions? To rephrase how to record the ‘Intent’, when a user presses the buttons in the Adaptive cards in Teams!

I could easily do that with defining ‘Intent’ value to ‘payload’ using below code-

 dispatcher.utter_message(text="Please make your selection-", buttons = [
               {type: 'messageBack', **"payload": "/Intent1",** "title": "Button1"},
               {type: 'messageBack', **"payload": "/CIntent2"**, "title": "Button2"},
           ])

But as we know, to render these adaptive cards in Teams API , one needs to pass custom_json_payload in the actions.py, the one in my case is-

dispatcher.utter_message(json_message = nm)
 nm = {
        "attachments": [
             {
            "contentType": "application/vnd.microsoft.card.adaptive",
            "content": {
                "type": "AdaptiveCard",
                 "version": "1.0",
                "body": [
                 {
                    "type": "TextBlock",
                     "text": "So, would you like to programme?",
                },
                 "actions": [
                {
                     "type": "Action.Submit",
                     "title": "Button1",
                 },
                 {
                     "type": "Action.Submit",
                     "title": "Button2"
                 }

Please suggest any solutions! Thanks in advance!

HI @rctatman , please help me out with the query, been stuck for over days now!

Thanks in advance, appreciate your time!

Hi @jefftung1991 Have you found a solution to this problem ? Trying to implement the same thing at the moment

Hi @jefftung1991 …! Trying to achieve same thing. Please post a solution if have found any. Thanks in advance.!