Forum Discussion
How to include button to channel tab in an adaptive card
When you add a tab to a channel, you can optionally "Post to the channel about this tab," which includes a button that opens the tab.
How can I include a button like this in an adaptive card sent by my bot? I was able to send a deeplink to the tab using the format
https://teams.microsoft.com/l/entity/ <APP_ID>/<TAB_ENTITY_ID>
, but that opens a personal tab instead of a channel tab.
To include a button in an adaptive card that opens a channel tab, you can use a deep link that targets the specific channel tab. The format you mentioned is correct, but it needs to be adjusted to point to the channel tab instead of a personal tab.
Use the following format to create a deep link to the channel tab:https://teams.microsoft.com/l/entity/{appId}/{entityId}?webUrl={webUrl}&label={label}
{appId}
: The app ID of the tab.{entityId}
: The entity ID of the tab.{webUrl}
: The URL of the tab content.{label}
: The label for the button.
Example:
https://teams.microsoft.com/l/entity/fe4a8eba-2a31-4737-8e33-e5fae6fee194/tasklist123?webUrl=https://tasklist.example.com/123/456&label=Task 456&context={"subEntityId": "task456","channelId": "19:cbe3683f25094106b826c9cada3afbe0@thread.skype"}
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.
- Nivedipa-MSFTMicrosoft
To include a button in an adaptive card that opens a channel tab, you can use a deep link that targets the specific channel tab. The format you mentioned is correct, but it needs to be adjusted to point to the channel tab instead of a personal tab.
Use the following format to create a deep link to the channel tab:https://teams.microsoft.com/l/entity/{appId}/{entityId}?webUrl={webUrl}&label={label}
{appId}
: The app ID of the tab.{entityId}
: The entity ID of the tab.{webUrl}
: The URL of the tab content.{label}
: The label for the button.
Example:
https://teams.microsoft.com/l/entity/fe4a8eba-2a31-4737-8e33-e5fae6fee194/tasklist123?webUrl=https://tasklist.example.com/123/456&label=Task 456&context={"subEntityId": "task456","channelId": "19:cbe3683f25094106b826c9cada3afbe0@thread.skype"}
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.