Teams meeting bot app handling lifecycle events by requesting feedback from the user
This sample is a Teams Bot meeting app created using the Teams Yeoman Generator. It acts on the real end date (not the scheduled ones) and posts an adaptive card requesting user feedback to the meeting's chat once each event is fired. Once voted each (already voted) user sees the overall feedback result from all participating users. App result:
Meeting ended - Feedback request posted |
---|
Feedback given - Refreshed card shows result |
---|
For further details see the author's blog post
-
Node.js version 10.14.1 or higher
-
Gulp CLI
npm install gulp-cli --global
-
ngrok or similar tunneling application is required for local testing
-
Enable Teams Developer Preview in your client via | About | Developer Preview
# determine node version node --version
This sample was created with the Yeoman Generator for Teams. Nearly the same sample was also realized with the using the Teams Toolkit with Visual Studio 2022
Version | Date | Author | Comments |
---|---|---|---|
1.0 | Oct 07, 2021 | Markus Moeller | Initial release |
THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
-
Clone the repository
git clone https://github.com/mmsharepoint/bot-meeting-lifecycle-feedback
-
In a console, navigate to
/bot-meeting-lifecycle-feedback
cd bot-meeting-lifecycle-feedback
-
Install modules
npm install
-
Run ngrok and note down the given url
gulp start-ngrok
-
You will need to register a Bot Channel for this app by executing the following steps
- Go to our Azure portal and Bot Services and click "Create"
- Pick "Azure Bot"
- Once again click the "Create" button inside
- Choose a valid name, subscription and resource group
- Free pricing tier is sufficient in this experimental phase
- Either create a Microsoft App ID on your own or let the Bot create it for you (In the latter case you will get a secret which will be stored in an own Azure Key Vault, pay attention to clean up if you do not use that)
- Having the bot created, open the resource and under "Channels" add a featured "Teams channel".
- Furthermore under Configuration add the following messaging endpoint: https://xxxxx.ngrok.io/api/messages (Later the xxxxx will be exchanged by the real given random ngrok url received)
- On the "Configuration" tab click "Manage" beside the Microsoft App ID and generate a new secret and note this down
- Paste App ID and secret into you local .env file got from .env-sample
- For further explanation see here
-
Enable Teams Developer Preview in your client via | About | Developer Preview
-
Package the app
gulp manifest
-
Start the app
gulp serve --debug
-
Create a new teams meeting with at least one participant
-
Open the meeting in Edit mode
-
At the right end of the tabs click (+) to add a new app and sideload your package
-
Join the meeting and after a while leave the meeting
This is a Teams meeting bot app handling lifecycle events by requesting feedback from the user:
- Microsoft Teams Meeting Apps - Meeting leifecylc
- Adaptive Cards Templating
- Adaptive Cards Universal Action Model (UAM) to refresh cards and show user specific views
You can use the following flags for the serve
, ngrok-serve
and build commands:
--no-linting
or-l
- skips the linting of Typescript during build to improve build times--debug
- builds in debug mode--env <filename>.env
- use an alternate set of environment files--publish
- automatically publish the application to the Teams App store
The solution can be deployed to Azure using any deployment method.
- For Azure Devops see How to deploy a Yo Teams generated project to Azure through Azure DevOps
- For Docker containers, see the included
Dockerfile
To enable logging for the solution you need to add msteams
to the DEBUG
environment variable. See the debug package for more information. By default this setting is turned on in the .env
file.
Example for Windows command line:
SET DEBUG=msteams
If you are using Microsoft Azure to host your Microsoft Teams app, then you can add DEBUG
as an Application Setting with the value of msteams
.