Forum Discussion
Send details from adaptive card to task module
ray2408 - Could you please refer this doc and let us know if it helps?
Use dialogs in Microsoft Teams bots - Teams | Microsoft Learn
Prasad_Das-MSFT I didn't find a way to send the data from the adaptive card to the task module which I am opening through the action button of it. Can you please guide me on this
- Prasad_Das-MSFTMar 20, 2024
Microsoft
ray2408 - Your adaptive card should have an
Action.ExecuteorAction.Submitbutton that, when clicked, sends aninvokerequest to your bot with the action details. Your bot receives theinvokerequest and extracts the necessary information from the adaptive card. The bot responds to theinvokerequest with a task module dialog that includes the information from the adaptive card. The user fills out the task module dialog, and upon submission, the information is sent back to the bot for processing.Thanks,
Prasad Das
------------------------------------------------------------------------------------------
If the response is helpful, please click "**Mark as Best Response**" and like it. You can share your feedback via Microsoft Teams Developer Feedback link. Click here to escalate.
- ray2408Apr 05, 2024Brass Contributor
In this interface, there is no variable to add json object, which I can send to the dialog.
Without using this interface for taskInfo, if I do thisHow to catch the testData in the dialog?
- Prasad_Das-MSFTMay 23, 2024
Microsoft
1. Include an
Action.Submitaction in your adaptive card JSON and place the information you want to pass within thedataproperty of the action. In your bot's code, implementhandleTeamsTaskModuleFetchfunction. This function will be called when the user interacts with the adaptive card. Extract the necessary information from thedataproperty sent with the invoke request. 2. Respond to the invoke request with a task module dialog that includes the information from the adaptive card. The user can then interact with the task module dialog, and upon submission, the information is sent back to the bot for processing.