﻿# Setting up Slack and Microsoft Teams

> Besides e-mail, notification channels can send direct messages in Slack and Microsoft Teams. The application has built-in, shareable step-by-step guides with screenshots of the provider's pages:

Source: https://workwise-solutions.net/docs/guides/slack-and-teams/ · Language: en · Hungarian version: https://workwise-solutions.net/hu/docs/guides/slack-and-teams/

Besides e-mail, notification channels can send direct messages in Slack and Microsoft Teams. The application has built-in, shareable step-by-step guides with screenshots of the provider's pages:

- Slack: `/guides/slack-setup` on your installation (for example `https://wsh.example.com/guides/slack-setup`);
- Microsoft Teams: `/guides/teams-setup`.

The channel dialog links to them (*Útmutató a … beállításához*). Anyone with the link can open them; they need no sign-in.

![Built-in Slack guide](https://workwise-solutions.net/docs/images/guides-slack.png)

## Slack

1. On the Slack API *Your Apps* page, create a new app, name it and choose your Slack workspace.
2. Under **OAuth & Permissions**, add the Bot Token Scope `chat:write`.
3. Request installation (**Request to install**), and after approval click **Install App to Workspace**.
4. Copy the **Bot User OAuth Access Token**.
5. In WorkSmartHub, create a notification channel of type **Slack** and paste the token. Test and save.
6. Optional: change the app's name and logo in Slack (the name users see).

Each user enters their **Slack felhasználónév** (Slack user name) on their **Profil** page to receive messages.

## Microsoft Teams

![Built-in Teams guide](https://workwise-solutions.net/docs/images/guides-teams.png)

1. In the Azure portal create a **Bot Channels Registration** (Azure Bot): name it, choose the subscription and resource group. An app registration with the same name is created.
2. Under the bot's **Channels**, add **Microsoft Teams**.
3. Open the app registration (**App registrations**), copy the **Application (client) ID**, and under **Certificates & secrets** create a client secret.
4. In the Teams desktop app copy the **Link to team** of your team.
5. In WorkSmartHub, create a notification channel of type **Teams** with the Application (client) ID, the secret as **Bot AppPassword**, and the team link. Save.
6. Allow custom apps in the Microsoft Teams admin centre, download the notification app package offered by the guide, import it in Teams, set the bot's App ID in it, and install it to the team.

Each user enters their **Teams email** on their **Profil** page.

The Teams service URL used by the server is `Notifications.Teams.ServiceUrl` in `appsettings.json` (default `https://smba.trafficmanager.net/emea/`).
