Examples: Integration with MS Teams

Examples: Integration with MS Teams

When a Request got new Comment in Targetprocess → send message to MS Teams channel
Send mention to MS Teams about new assignment

There are two ways how Integration with MS Teams can be configured:

  1. (Basic) [Using MS Teams Webhook] (doc:examples-integration-with-ms-teams#integration-using-ms-teams-webhook)
  2. (Advanced) [Using MS Teams API] (doc:examples-integration-with-ms-teams#integration-using-ms-teams-api)

Integration Using MS Teams Webhook

🚧

Basic integration via webhook doesn't support mentions. For this purpose please check advanced option using MS Teams API

How to set up MSTeamsURL custom field

  1. Create a text custom field for Projects
  2. Copy Webhook URL from MS Teams Connector setup
  3. Put Webhook URL to MSTeamsURL custom field in Targetprocess

How to generate Webhook URL in MS Teams

In a new or existing channel that will be used for alerts, open “Connectors”:

Create a new Incoming Webhook connector, call it “Targetprocess Notification Center”, upload a logo (feel free to use the below one)

As a result you will get the generated Webhook URL.

Copy MS Teams Webhook URL and paste it into the MSTeamsURL Custom field in Project Details

Integration Using MS Teams API

How to set up MSTeamsID custom field

  1. Create a text custom field MSTeamsID for Users
  2. Open Graph Explorer, log in there with your Microsoft credentials and check needed User Ids with this query https://graph.microsoft.com/v1.0/users
  3. Copy these Ids to MSTeamsID custom field in Targetprocess for your users. This should be done for all users for which mention will be sent in MS Teams

How to get MS Teams API URL

  1. Open Graph Explorer, log in there with your Microsoft credentials and check your team id with the query https://graph.microsoft.com/v1.0/me/joinedTeams
  2. Check your channel Id by using your team Id from previous step and query
    https://graph.microsoft.com/v1.0/teams/{team-id}/channels
  3. The query which you should make POST to will be in the format
    https://graph.microsoft.com/v1.0/teams/{team-id}/channels/{channel-id}/messages

How to get MS Teams API Access Token

  1. Open Graph Explorer, log in there with your Microsoft credentials and check Access Token tab as shown in the screenshot below