page_type | description | products | languages | extensions | contentType | createdDate | ||||
---|---|---|---|---|---|---|---|---|---|---|
sample |
Microsoft Teams sample app for demonstrating deeplink from Bot chat to Tab consuming Subentity ID |
|
|
samples |
07-07-2021 13:38:27 |
This sample displays how to consume SubEntity Id to DeepLink from Bot to Tab and Tab to Tab.
-
Node.js version 10.14 or higher
# determine node version node --version
-
Ngrok (Only for devbox testing) Latest (any other tunneling software can also be used)
# run ngrok locally ngrok http -host-header=localhost 3978
-
Teams Microsoft Teams is installed and you have an account
-
Clone the repository
git clone https://github.com/OfficeDev/Microsoft-Teams-Samples.git
-
In a terminal, navigate to
samples/tab-deeplink/nodejs
cd samples/tab-deeplink/nodejs
-
Install modules
npm install
-
Start the bot
npm start
-
-
If you are using Visual Studio code
- Launch Visual Studio code
- Folder -> Open -> Project/Solution
- Navigate to
samples\DeepLinkBotnode\
folder - Select
DeepLinkBotnode
Folder
-
To run the application required node modules.Please use this command to install modules npm i
-
Run ngrok - point to port 3978 (This is your Base_URL)
ngrok http -host-header=rewrite 3978
-
Create a new Bot by following steps mentioned in Build a bot documentation.
-
Go to .env file and add
MicrosoftAppId
,MicrosoftAppPassword
andBase_URL
information. -
Run your app, either from Visual Studio code with
npm start
or usingRun
in the Terminal. -
Update the manifest.json file with
Microsoft-App-ID
,ContentUrl
,WebsiteUrl
andEntityID
value. -
Install the app in Teams.
Enter text in the emulator. The text will be echoed back by the bot.
- Interact with DeepLink bot by pinging it in personal or channel scope.
- Select the option from the options displayed in the adaptive card. This will redirect to the respective Task in the Tab.
- Click on Back to List to view all the options. User can select an option which will redirect to the respective Task in the Tab.