AhmedVali
AhmedVali

Reputation: 195

Creating a Deep Link to Tab from Notification in Activity Feed

I am developing a MS Team app which has a Tab and a Notification only Bot.

How can i add a deep link to my tab when the user clicks on the Notification from the Activity Feed.

Sending the notification like below.

const activity = {
                attachments: [card],
                text: 'Notification Text',
                summary: 'Notification Summary',
                channelData: {
                    notification: {
                        alert: true
                    }
                }
            };
            await turnContext.sendActivity(activity);

Upvotes: 0

Views: 787

Answers (1)

Hilton Giesenow
Hilton Giesenow

Reputation: 10854

The slighly tricky part is figuring out the syntax for the deeplink, it's a little confusing the first time you do it, but have a look at the docs for Create Deep Links. Once you have the link url itself, then you can send it to the user in the notification, as a regular message, or a card (e.g. Adaptive Card) or similar.

Some Deep Link parts that can be tricky:

  1. the "App id" is the TEAMS app id (from your Teams Manifest, or from App Studio), NOT the "Microsoft App Id" from the bot itself
  2. The "entity ID" is the "entity id" you registered for your Tab in the Teams manifest (or in App Studio if you used that)

Upvotes: 1

Related Questions