
@mentions
) the bot to initiate interaction in the channel. For direct messaging scenarios, where users can interact with the bot in a one-on-one chat without the need for @mentions
, use the Azure Bot Services Endpoint.
Prerequisites
- A Microsoft Teams account with permissions to manage Microsoft Teams and create outgoing webhooks.
Restrictions
- The postback functionality, for example
messageBack
, isn’t supported by the Microsoft Teams Endpoint. For postback support, use the Azure Bot Services Endpoint instead.
Generic Endpoint Settings
- Endpoints Overview
- NLU Connectors
- Data Protection & Analytics
- Real-Time Translation Settings
- Transformer Functions
Specific Endpoint Settings
Microsoft Teams Settings
Microsoft Teams Settings
Parameter | Description |
---|---|
Security Token | A token from the Microsoft Teams webhook setup. |
Empty Message Fallback Text | A message sent if no output is provided, as Microsoft Teams requires a non-empty message. |
How to Set Up
1. Configure a Microsoft Teams Endpoint
1. Configure a Microsoft Teams Endpoint
- In the left-side menu of your Project, click Deploy > Endpoints.
- On the Endpoints page, click + New Endpoint.
- In the New Endpoint section, do the following:
- Select the Microsoft Teams Endpoint type.
- Add a unique name.
- Select a relevant Flow from the list. Save changes.
- Copy the URL from the Endpoint URL field and save it for later use.
2. Create a Webhook in Microsoft Teams
2. Create a Webhook in Microsoft Teams
- Open Microsoft Teams and find the team where you want to add the bot. To do this, in the Chat panel, go to Microsoft Teams and channels > More Options > You Your Microsoft Teams and channels.
- Hover over the team, click the menu next to the team name and select Manage team.
- Access the Apps tab, go to Upload an app > Create an outgoing webhook. If the Create an outgoing webhook option isn’t available, follow the Microsoft Outgoing Webhooks guide to configure your Office 365 tenant.
- In the Create an outgoing webhook window, fill in the following fields:
- Name – enter the name for the webhook. This name will be used as the bot’s name in Microsoft Teams.
- Callback URL – enter the Endpoint URL from your Microsoft Teams Endpoint.
- Description - enter a clear and concise description that explains the bot’s purpose and helps users distinguish it from other bots in Microsoft Teams.
- Click Create to generate the webhook. A pop-up will display a security token. Copy and save it for later use. If the token is lost, you’ll need to create a new webhook.
3. Finish the Integration
3. Finish the Integration
- In the Cognigy.AI interface, go to the Microsoft Teams Endpoint that you configured previously.
- In the Security Token field, paste the security token that you copied and saved previously. Save changes.
- To test the bot, go to the Microsoft Teams channel related to the team for which the bot was created, mention the bot, for example,
@Bot
, to send a message. The message will be routed to your Cognigy.AI Flow. Always mention the bot to ensure that messages are sent to the Flow.
Example
Send a Response in the Adaptive Card Format
- In the Cognigy.AI interface, create a Flow and add a Say Node.
- In the Node editor, select the Microsoft Teams channel, then Adaptive Card from the Output Type list.
-
In the code editor, enter the following script:
Adaptive Card
- Save changes and go to the channel in Microsoft Teams to call your bot.