MS Teams
MS Teams is a Microsoft business platform that combines a project collaboration chat, a teamwork hub, notes and attachments within a single workspace.
MS Teams allows using chatbots for notifications, polls, and fun. Microsoft has an article on how bots work in the MS Teams messenger.
How to publish a bot in MS Teams
Of course before publishing the bot, you have to create it.
We’ve described how to create a bot in quick start instruction, and you can find info on how to write a good script in script writing instruction.
Publish your bot
To publish your bot, go to the Channels tab and choose MS Teams from the list. You can rename the channel if you want. The name is only used for your convenience. Click the Connect button.
It usually takes a few moments to connect the channel. After it’s connected, click Get webhook to copy the webhook to clipboard.
Get data from Azure
To publish an Aimylogic bot in MS Teams, you have to use the Azure Bot service.
Create a Microsoft Azure account.
In the Azure services section choose Bot Services.
On the top panel, click Add, choose the Bot Channels Registration option and click Create.
Fill in the required fields:
Bot handle — unique bot ID
Subscription — subscription option
Resource group — choose a group or create a new one
Location — location
Messaging endpoint — the webhook you got from Aimylogic after connecting to the MS Teams channel
Other fields are not required, but you can fill them in if you want
- Click Create
- On the main Microsoft Azure page in the Recent resources section choose the created bot and click Settings in the sidebar
- You’ll need the value from the Microsoft App ID field when setting up the channel in Aimylogic
- Click Manage near the Microsoft App ID and choose New client secret
- Fill in the fields:
- Description — description of your secret key
- Expires — “best before” of your secret key. After this date, you’ll need a new key
- Value has a key. You’ll need it to finish the setup process
Finish the setup
Go back to the browser tab where you have opened Aimylogic and open the MS Teams channel settings. To do this, press the gear icon near the MS Teams channel.
Fill in the fields in the popup:
- paste the Microsoft App ID from your Microsoft Azure profile into the Microsoft App ID field
- paste Value value you got earlier into the Password field
Click Save.
You’re good to go!
Test your bot
To test the bot, you should add MS Teams channel on the Azure portal. On the resource page choose Channels from the sidebar. Pick MS Teams from the channel list:
Click Save:
MS Teams will be displayed in the channel list. Click Get bot embed code:
Copy the URL from the block of HTML code:
Paste the URL you copied into the address bar and choose the MS Teams application (either a desktop or a web application). When the application launches, the bot will be displayed as a contact and the chat will be opened.
Now you can test your bot. Greet it with the phrase you set while creating the script.