Have the right access rights on the Teams application
To install a new application in your Teams space, you have two options:
- If you have the rights to do so, follow the procedure below,
- If you don't have the rights to do this, you need to find a Teams administrator in your organization and go through the procedure below with him.
The administrator must also enable the Load Custom Applications option.
Attention, you must wait 24 hours for the changes to take effect on the user's account.
This option will allow you to install your own application and control its distribution in your workspace.
Create an application on your Teams space
Login to your Teams space
Add the App Studio application, by clicking on the 3 dots circled in red on the image below, search for AppStudio and click Add
- On the Manifest tab, click Create a new app
- Fill in the name of your chatbot and its description, then click on Generate.
- Fill in the Package Name and version as below
- Fill in the legal information as below
- Add logos and choose the main color of your chatbot
Now you have to set up the chatbot.
- Click on the Bots part on the left side of the screen, then on Set up.
Choose a name for your chatbot (it will be its name in the conversations), check the options of your chatbot as below then click on Create bot.
Click on Generate a new password (note well the password which will be provided to you, it will be used to parameterize the chatbot in Vizir).
Add the following url: https://developers.vizir.co/microsoftteams/messages in Messaging Endpoint
Connect your Vizir chatbot to your new Teams application
- Retrieve the password you just generated and the Id application which is present just above, at the level of the name of your bot.
- Go to the dashboard of your application: dashboard.vizir.co
- Click on Share in the navigation bar on the left of the screen
- In the Teams part, paste the appId and the password in the appSecret part.
Publish your chatbot on your Teams workspace
- Publish your chatbot to test it. Click Test and distribute, then click Install.
- Click on Add
The conversation then opens in your Teams mailbox and you should receive the first message from your chatbot.
If you do not receive any messages, it is probably because you forgot to publish your application on Vizir once you have entered the appID and appSecret.
That's no big deal. Go back to Vizir, click on Publish.
Then back on your chatbot, type /reboot to tell it to start the conversation again at 0.
Microsoft Teams offers you the possibility to add a menu of quick actions to help your users, as in the image below.
To do this, you must edit your application and add Commands.
In the Bot part of your application you can add quick actions.
For these to be effective, you must add in Vizir (parameter-> actions) these same actions with the appropriate logic.
Information retrieved by the chatbot
Basically, we retrieve information about the user that is stored in the user's attributes.
name: 'John Doe',
Share your Teams application with your entire organization :
You must be administrator of your company's Teams organization.
Microsoft reference documentation: https://docs.microsoft.com/en-us/microsoftteams/manage-apps#manage-org-wide-app-settings
First, in app studio > manifest editor, go to your application then in "test and distribute" and click on download. This allows you to download the zip file of your application.
Click Load New Application and select the zip file for your application.
Then click on Organization-Wide Application Settings.
Make sure you allow custom applications.
Have fun !