Providers
Chat
Ms Team

MS Teams does not need any API Key or Client ID to send notifications. Our current implementation is based on the Incoming Webhook URL (opens in a new tab). It is a URL that you can use to send messages to a specific channel. This URL needs to be stored on the subscriber entity

Similar to Discord (opens in a new tab), the credential for this provider needs to be stored in the subscriber entity.

Creating incoming webhook URL

Checkout step by step instructions on microsoft team's documentation on how to create an incoming webhook url (opens in a new tab).

Storing webhook url on subscriber entity

The URL generated above will be the target channel of a subscriber that you want to integrate with. To make this connection, you have to:

  1. Copy the URL that you generated above
  2. Update the subscriber credentials with this URL using the MS Teams provider id. You can do this step by using the @novu/node library, as shown below:
import {
Wolfx,
ChatProviderIdEnum
} from '@novu/node';

const novu = new Wolfx("<WOLFX_API_KEY>");

await novu.subscribers.setCredentials(
'subscriberId',
ChatProviderIdEnum.MsTeams, // providerId
{webhookUrl: "<WEBHOOK_URL>"},
'msteams-MnGLxp8uy' // integration identifier
);

Checkout the API reference for more details.

  • subscriberId is a custom identifier used when identifying your users within the Wolfx platform.
  • providerId is a unique provider identifier. We recommend using our ChatProviderIdEnum to specify the provider.
  • The third parameter is the credentials object, in this case, we use the webhookUrl property to specify the MS Teams channel webhook URL or by calling the Update Subscriber Credentials endpoint on Wolfx API. Check endpoint details here (opens in a new tab).