Forum Discussion
sowmyaseetha
Sep 29, 2023Copper Contributor
bot message limitation and alternative for that limitation
hi team,
i have a problem in showing a tabular form which has content of 10 to 15 rows and columns
but in bot there is a limitation of 40KB
(The bot message size limit is 40 KB. If the bot message size limit exceeds 40 KB, bot receives a 413 status code)
what can i do and is there any alternative ?
Yes, you're correct that the bot message size limit is 40 KB. If your message, including the tabular data, exceeds this limit, you will receive a
413
status code (RequestEntityTooLarge
).Here are a few alternatives you can consider:
-
Pagination: If your table has too many rows to fit within the size limit, consider implementing pagination. You can send a subset of the data in each message and provide buttons or other interactive elements to navigate between pages.
-
Adaptive Cards: You can use Adaptive Cards to display tabular data. Adaptive Cards are a platform-agnostic way to present rich, interactive content. They can contain text, images, buttons, and even input forms. However, keep in mind that the total payload of the Adaptive Card must still be within the 40KB limit.
-
Deep Linking to a Tab: If the data is too large to fit within a bot message, you can consider creating a tab to display the data. You can then send a message with a deep link to this tab. This way, users can click on the link to view the data in a full tab.
-
External Link: If the data is hosted on an external website, you can simply send a link to that website in your bot message.
Remember to always optimize your bot messages to ensure an optimal user experience and to prevent your messages from appearing as spam to your users.
Here's an example of how you can use an Adaptive Card to display tabular data:
{ "type": "AdaptiveCard", "body": [ { "type": "TextBlock", "text": "Your Table Title", "weight": "Bolder", "size": "Medium" }, { "type": "FactSet", "facts": [ { "title": "Column 1:", "value": "Row 1 Data" }, { "title": "Column 2:", "value": "Row 1 Data" }, // Add more rows as needed ] } ], "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.2" }
In this example, we're using a
FactSet
to display tabular data. EachFact
represents a row in the table. Thetitle
is the column name and thevalue
is the data in that row for that column. You can add as manyFact
objects as you need to represent your data.For more information on Adaptive Cards, you can refer to the Adaptive Cards documentation.
Thanks,
Nivedipa
-------------------------------------------------------------------------
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.-
4 Replies
Sort By
- Nivedipa-MSFT
Microsoft
Yes, you're correct that the bot message size limit is 40 KB. If your message, including the tabular data, exceeds this limit, you will receive a
413
status code (RequestEntityTooLarge
).Here are a few alternatives you can consider:
-
Pagination: If your table has too many rows to fit within the size limit, consider implementing pagination. You can send a subset of the data in each message and provide buttons or other interactive elements to navigate between pages.
-
Adaptive Cards: You can use Adaptive Cards to display tabular data. Adaptive Cards are a platform-agnostic way to present rich, interactive content. They can contain text, images, buttons, and even input forms. However, keep in mind that the total payload of the Adaptive Card must still be within the 40KB limit.
-
Deep Linking to a Tab: If the data is too large to fit within a bot message, you can consider creating a tab to display the data. You can then send a message with a deep link to this tab. This way, users can click on the link to view the data in a full tab.
-
External Link: If the data is hosted on an external website, you can simply send a link to that website in your bot message.
Remember to always optimize your bot messages to ensure an optimal user experience and to prevent your messages from appearing as spam to your users.
Here's an example of how you can use an Adaptive Card to display tabular data:
{ "type": "AdaptiveCard", "body": [ { "type": "TextBlock", "text": "Your Table Title", "weight": "Bolder", "size": "Medium" }, { "type": "FactSet", "facts": [ { "title": "Column 1:", "value": "Row 1 Data" }, { "title": "Column 2:", "value": "Row 1 Data" }, // Add more rows as needed ] } ], "$schema": "http://adaptivecards.io/schemas/adaptive-card.json", "version": "1.2" }
In this example, we're using a
FactSet
to display tabular data. EachFact
represents a row in the table. Thetitle
is the column name and thevalue
is the data in that row for that column. You can add as manyFact
objects as you need to represent your data.For more information on Adaptive Cards, you can refer to the Adaptive Cards documentation.
Thanks,
Nivedipa
-------------------------------------------------------------------------
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.- sowmyaseethaCopper Contributor
hiNivedipa-MSFT , I have a query related to deeplink,
using this deep link can create a temporary tab right like popup ?
if so can i send adaptive card to that tab so that user can see the adaptive card and close that tab?
is this possible ?
actually i want to display a table with 10 columns and 10 rows so it takes more space to display so i want to show it in tab
@Nivedipa-MSFT , could you please reply to the above question as early as possible- Nivedipa-MSFT
Microsoft
sowmyaseetha - Please track this further query here: https://techcommunity.microsoft.com/t5/teams-developer/send-adaptive-card-to-the-tab-deep-link/m-p/3945273#M8503
- Nivedipa-MSFT
Microsoft
sowmyaseetha -
Could you please share your valuable feedback via Microsoft Teams Developer Feedback link.
-