ChatBot
4 Topicsauthentication
Our application has two components. The tab and the bot. We did the authentication to our backend service in the tab part. So we can make API calls to our backend service from the tab component. But when we move to bot, we can't make the API calls from there. As we don't have the session ID and other authentication details. Can someone tell what would be a better approach to send the authentication details from tab to the bot side, so we can make API calls from bot env. as well.594Views0likes3CommentsTeams Action Card Action.Submit
const questionCard = require("../adaptiveCards/question.json"); //Code within a method that displays the adaptive card to the user const cardAttachment = { contentType: 'application/vnd.microsoft.card.adaptive', content: questionCard, }; const message = { type: 'message', attachments: [cardAttachment], }; await context.sendActivity(message); //Adaptive Card { "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.5", "body": [ { "type": "TextBlock", "text": "Please enter your question below", "style": "heading" }, { "type": "Input.Text", "id": "question", "placeholder": "Enter question here", "maxLength": 500, "isMultiline": true } ], "actions": [ { "type": "Action.Submit", "title": "OK" "data": } ] } I am trying to read in the users input after they click on the submit button? What information should I put in the data section of my Action.Submit button so that I can get the information that was typed into the input section. as well as how do i create an event listener either in the method I am displaying my card or a seperate method within that file that will process the706Views0likes3CommentsWaterfall Dialog Second step not waiting
//Code within my function that creates the dialog state const memoryStorage = new MemoryStorage(); const conversationState = new ConversationState(memoryStorage); const dialogStateProperty = conversationState.createProperty('dialogState'); const dialogSet = new DialogSet(dialogStateProperty); const textPrompt = new TextPrompt('textPrompt'); dialogSet.add(textPrompt); const waterfallSteps: WaterfallStep[] = [ askQuestion.bind(this), processResponse.bind(this), ]; const waterfallDialog = new WaterfallDialog('waterfallDialog', waterfallSteps); dialogSet.add(waterfallDialog); async function askQuestion(stepContext😞 Promise<DialogTurnResult<any>> { return await stepContext.prompt('textPrompt', 'Please enter your question.'); //return stepContext.next(); } async function processResponse(stepContext😞 Promise<DialogTurnResult<any>> { console.log("hi"); const answer = stepContext.result as string; console.log(answer) } //Code that instantiates the dialog const dialogContext = await dialogSet.createContext(context); await dialogContext.beginDialog('waterfallDialog'); My dialog will start running however after the question is asked to the user and the user inputs something it simply waits and does not execute the rest of the dialog which in this case simply prints to the console what the user typed. Is there something missing in my askQuestion method that is not allowing the waterfall dialog to continue. Thanks637Views0likes2CommentsMicrosft Teams Chatbots
Hi, I am new to developing microsoft teams chatbots and I am trying to ask the user a question and then process the information, however my app simply asks the user a question and then begins processing without waiting for a response from the user. Should I use waterfall dialog to solve this problem and if so is there a link someone could point me to that would be helpful. ThanksSolved544Views0likes1Comment