Forum Discussion
AytacBey
Feb 15, 2024Copper Contributor
Adaptive Card to send message to the end user by command / Bot Framework SDK - JavaScript - node.js
For MS Teams chatbot, by adaptive cards, I want the bot to send text message to the client when the client chooses the respective command. What İs want is opposite of Action.Submit - I want user to receive message when the button is clicked.
I try to optimize Action.OpenUrl and Action.Submit but results weren't satisfying.
- ChetanSharma-msftMicrosoftHello AytacBey - Thanks for raising your query.
All you need to do is to submit the button click and send back the message accordingly based on the respective button click.
Could you please refer this sample once: https://github.com/OfficeDev/Microsoft-Teams-Samples/tree/main/samples/bot-all-cards- Dinesh-MSFTMicrosoft
Hi AytacBey - Could you please let us know if your issue is resolved?
- AytacBeyCopper ContributorThanks for support and sorry for the late reply ChetanSharma-msft Dinesh-MSFT.
I do a workaround for my issue. Basically I use "onAdaptiveCardInvoke" method outside the constructor for chatbot class and bind it within the constructor. By this way I was able to catch the events (button clicks).
Furthermore I use Action.Execute for the task, and identify the each button by the "verb" label of respective command.
My issue is resolved, thanks again for the support.