Apr 11 2024 02:56 AM
I want to use adaptive metadata store some data in teams bot, and get the data in
Apr 15 2024 12:17 PM
Hi @Jason1395 - Thanks for raising the query.
We will look into it and let you know the updates.
Apr 18 2024 03:05 AM
Hi @Jason1395,
Dialogs with Adaptive Cards work similarly to the HTML or JavaScript case. The major difference is that, because there's no JavaScript when you're using Adaptive Cards, there's no way to call submit(). Instead, Teams takes the data
object from Action.Submit
and returns it as the payload of the task/submit
event.
In your adaptive card JSON, include an Action.Submit
action and place the metadata you want to pass within the data
property of the action.In your bot's code, implement the handleTeamsTaskModuleFetch
function. This function will be called when the user interacts with the adaptive card. Within the handleTeamsTaskModuleFetch
function, you can access the metadata sent from the adaptive card by reading the taskModuleRequest.data
property. Then use the extracted metadata to populate the task module dialog that you want to present to the user.
Ref: Use dialogs in Microsoft Teams bots - Teams | Microsoft Learn
Apr 18 2024 11:32 PM
Hi @Dinesh-MSFT ,
Thanks for your reply.
I know this solution. The problem is that the adaptive card size has a limitation, but the data is very large which I want to store in the adaptive card. Which will raise an error "MessageSizeTooBig" when I create the adaptive card with the large data.
So, I want to try metadata ( https://adaptivecards.io/explorer/Metadata.html ). But I do not know how to use it.
Apr 25 2024 07:03 AM
Hi @ray2408 - We are checking this issue internally. We get back to you.