Skip to content

Connect Slack and Microsoft Teams

View as Markdown

When you connect Slack or Microsoft Teams, Ligament sends notifications there as direct messages to each person, and as posts in the channels your routing rules name. Approval requests come with Approve, Reject and Open in app buttons. A button press counts as the person who pressed it, with the same access rules as in the app.

Only workspace admins can connect a provider and link people.

You create a Slack app in your own Slack workspace, install it, and give Ligament its bot token and signing secret. The app posts the messages and sends button presses back to Ligament.

  1. Go to api.slack.com/apps and select Create New App › From a manifest.

  2. Pick the Slack workspace the app belongs to.

  3. Paste this manifest (YAML). Replace the name if you like; keep the scopes and the request URL.

    display_information:
    name: Ligament
    description: Notifications and approvals from Ligament
    features:
    bot_user:
    display_name: Ligament
    always_online: true
    oauth_config:
    scopes:
    bot:
    - chat:write
    - im:write
    - users:read
    - users:read.email
    settings:
    interactivity:
    is_enabled: true
    request_url: https://app.ligament.ai/api/notify/slack/interactions
    org_deploy_enabled: false
    socket_mode_enabled: false
    token_rotation_enabled: false

    What the scopes are for:

    Scope Used for
    chat:write Posting notifications and updating a message after someone approves
    im:write Direct messages to a person
    users:read, users:read.email Finding each member’s Slack account by their email address
  4. Select Create, then Install to Workspace and allow the app.

  1. In Slack’s app settings, open OAuth & Permissions and copy the Bot User OAuth Token (it starts with xoxb-).

  2. Open Basic Information › App Credentials and copy the Signing Secret.

  3. In Ligament, open Settings › Notifications › Connections › Slack, paste both values and save. Ligament stores them encrypted and never shows them again.

  4. Select Test. You should see your Slack workspace and the app’s name, for example:

    Slack workspace Northwind as @Ligament

    Test also records which Slack workspace this is. Buttons only work after a successful test, so run it again if you install the app in a different Slack workspace.

If Test fails, the message names Slack’s reason: invalid_auth means the token is wrong or was revoked; reinstall the app and copy the token again.

Select Sync people on the same page. Ligament looks up every member’s account email in Slack and links the matching Slack user. The sync reports how many people it matched and how many it couldn’t find.

  • Links you set by hand are kept. Set or change one in the people list when someone uses a different email in Slack.
  • Slack limits how fast an app may look people up. A large workspace may stop part way and say so: run the sync again a minute later to continue.
  • Someone who isn’t linked gets no direct messages. If they press a button in a channel post, Slack shows them a private note that their account isn’t linked, with an Open in app link, and nothing changes.

Each person decides where their notifications go. In Settings › Notifications › Preferences, turn on Slack for the events you want, for example Approval request. Linked people don’t need to type an address. To send to a channel instead, type its ID (for example C0123ABCD) as your Slack address and invite the app to that channel with /invite @Ligament.

  1. Turn on Slack for Approval request in your own preferences.
  2. Start something that asks you for an approval, for example a workflow with an approval step assigned to you.
  3. Within a minute you get a direct message from the app with Approve, Reject and Open in app.
  4. Press Approve. The message updates to show ✅ Approved by @you and the buttons disappear. The approval shows as approved in Ligament.
  5. Press the same button in another copy of the message, or ask a colleague who isn’t linked to press it: Slack shows a private note (Already approved by …, or that the account isn’t linked) and nothing changes.

Every press is recorded in the action log under Settings › Notifications, and each message’s delivery log shows when it was sent, delivered, clicked and acted on.

What you see What to do
No message arrives Check that the person is linked and has Slack turned on for the event. Deliveries shows the Slack error, if any.
channel_not_found or not_in_channel Invite the app to the channel, or check the channel ID.
Buttons answer “This button isn’t valid here” The press came from a Slack workspace that isn’t connected to this Ligament workspace. Run Test again.
Buttons do nothing Check the Interactivity request URL in the Slack app settings and that the signing secret in Ligament matches.

To connect Microsoft Teams you register a bot in Azure, add it to Teams with an app package, and enter the bot’s details in Ligament. You need an Azure subscription where you can create resources, and permission to upload custom apps to Teams (or a Teams admin who can do it for you).

  1. In the Azure portal, create an Azure Bot resource.

  2. Under Type of App, choose Single Tenant. Under Creation type, choose Create new Microsoft App ID.

  3. When the resource is created, open Settings › Configuration and note the Microsoft App ID and the App Tenant ID.

  4. Next to Microsoft App ID, select Manage Password. Under Client secrets, select New client secret, and copy the secret’s Value. Azure shows it only once.

  5. Back in Configuration, set Messaging endpoint to:

    https://app.ligament.ai/api/notify/teams/messages
  6. Open Channels and add the Microsoft Teams channel. Accept the terms and save.

Teams installs bots from an app package: a zip file with a manifest.json and two icons. Start from this manifest. Replace <APP_ID> (twice) with your Microsoft App ID and <HOST> with the host name of your Ligament address, without https://.

{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.17/MicrosoftTeams.schema.json",
"manifestVersion": "1.17",
"version": "1.0.0",
"id": "<APP_ID>",
"developer": {
"name": "<Your organisation>",
"websiteUrl": "https://<HOST>",
"privacyUrl": "https://<HOST>/privacy",
"termsOfUseUrl": "https://<HOST>/terms"
},
"name": { "short": "Ligament", "full": "Ligament notifications" },
"description": {
"short": "Notifications and approvals from Ligament.",
"full": "Get the Ligament notifications you choose in Microsoft Teams, and approve or reject requests from the message."
},
"icons": { "color": "color.png", "outline": "outline.png" },
"accentColor": "#FFFFFF",
"bots": [
{
"botId": "<APP_ID>",
"scopes": ["personal", "team"],
"supportsFiles": false,
"isNotificationOnly": false
}
],
"permissions": ["identity", "messageTeamMembers"],
"validDomains": ["<HOST>"]
}

Add a 192 × 192 pixel colour icon named color.png and a 32 × 32 pixel white outline icon on a transparent background named outline.png. Zip the three files together, with no folder inside the zip.

The personal scope lets each person chat with the bot and get their own notifications. The team scope lets you add the bot to a team so it can post in that team’s channels.

Upload the zip in one of these ways:

  • In Teams, open Apps › Manage your apps › Upload an app › Upload a custom app. This needs custom app upload to be allowed for you.
  • In the Teams admin center, open Teams apps › Manage apps › Upload new app. Then use a setup policy to install it for the people who should get notifications, so nobody has to find it themselves.

To post in a team’s channels, open the team, select Apps, and add the app to that team.

  1. Open Settings › Notifications › Connections › Microsoft Teams.
  2. Enter the App ID, the Tenant ID, and the client secret as the App password.
  3. Select Save Teams, then Test. A working connection shows Azure Bot followed by your App ID. If the test fails, check the App ID, the tenant and that the secret hasn’t expired.

When Microsoft Teams is connected, the Microsoft Teams channel in notification preferences sends cards from the bot instead of plain text.

Ligament needs to know which Teams user is which member before it can message them or accept their button presses. Each person links themselves by opening the Ligament app in Teams once: when the bot is added to their personal chat, Ligament matches their Teams email address to their Ligament account. If someone says hello to the bot later, it tells them whether they’re linked.

You can see who is linked under Settings › Notifications › People. Sync by email refreshes the people already linked, and links the members of teams the bot was added to when their Teams email matches their Ligament email. Teams doesn’t let a bot look people up by email, so anyone else still needs to open the app once. An admin can also link a member by hand with their Microsoft Entra object ID.

People who aren’t linked get no Teams messages. If they press a button in a channel post, nothing changes and the card tells them to open the request in Ligament.

Add the bot to the team first. Then, under Settings › Notifications › Workspace › Team channels, add a rule with the Microsoft Teams channel and the channel’s ID as the target. The channel ID looks like 19:a1b2c3d4e5f6@thread.tacv2. To find it, open the channel’s … menu in Teams, select Get link to channel, and copy the part between /channel/ and the channel name (URL-decoded).

Channel posts are short: the event and the record’s number, with an Open in app button. Anyone in a channel can read them, so they never include field values.

Approval requests sent to a person show Approve, Reject and Open in app. Pressing Approve or Reject decides as the linked member, with the same rules as in the app: if they can’t decide this request, nothing changes and the card says why. When it works, the card changes to show who decided, for example ✅ Approved by Sam Chen. A second press says it’s already decided.

  1. Open the Ligament app in Teams so your account is linked.
  2. In your notification preferences, turn on Microsoft Teams for Approval request.
  3. Start a workflow with an approval step assigned to you.
  4. The card arrives in your chat with the bot within a minute. Press Approve and check the request in Ligament.

The delivery log under Settings › Notifications › Deliveries shows each message and why one failed. If a message fails with “The person has not opened the Ligament bot in Microsoft Teams yet”, ask them to open the app once.

People who typed a Teams incoming webhook URL as their Microsoft Teams address keep getting messages there. A webhook can’t receive button presses, so those messages only have Open in app.