# Slack

This guide walks you through setting up a Slack app and configuring it for your **on-premise Nected** deployment so users can connect Slack as an integration from the Nected UI.

### Prerequisites

* Access to your on-premise Nected deployment (Helm values and cluster)
* A **Slack account** (workspace where you can create apps)
* Access to [Slack API](https://api.slack.com) to create and configure the app
* **Requires Garuda.** Enable the Garuda service before adding Slack. See How to enable integrations in the [Overview](https://docs.nected.ai/nected-docs/self-hosting/additional-configuration/additional-integrations/..#how-to-enable-integrations).

### Step 1: Sign Up for a Slack Account

If you don’t already have one, sign up for a Slack account and create or join a workspace where you want to use the Nected Slack integration.

### Step 2: Create a Slack App

1. Go to <https://api.slack.com/app>.<br>

   <figure><img src="https://4290782554-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLg716fCfV8IUwXQygkTG%2Fuploads%2FwAvw2mo1bWN04hBvfwnM%2Fimage.png?alt=media&#x26;token=9ad78aff-d93b-498c-ae1e-b21ab46084b0" alt=""><figcaption></figcaption></figure>
2. Create a new app:
   * Use **“Create New App”** → **“From scratch”** (or “From manifest” if you prefer).
   * Choose your **App Name** and **Workspace**.
   * Complete the app creation flow.

<figure><img src="https://4290782554-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLg716fCfV8IUwXQygkTG%2Fuploads%2F9WfSKhKnXrjtsLdfg3vk%2Fimage.png?alt=media&#x26;token=8761d8f9-f19d-4d25-8ebc-06e6c9fa1288" alt=""><figcaption></figcaption></figure>

***

### Step 3: Configure OAuth Redirect URL

1. In your Slack app, open the **OAuth & Permissions** tab.
2. Under **Redirect URLs**, add your Nected UI redirect URL:
   * **Format:** `https://<your-nected-ui-domain>/auth/redirect`
3. Save the changes.

<figure><img src="https://4290782554-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLg716fCfV8IUwXQygkTG%2Fuploads%2FAJh4YfRD9LMhvaZ8G2Kj%2Fimage.png?alt=media&#x26;token=1c186602-b1cc-40b3-a132-8b78ac1f5883" alt=""><figcaption></figcaption></figure>

### Step 4: Add Bot Scopes

1. Stay in **OAuth & Permissions**.
2. Scroll to **Scopes** → **Bot Token Scopes**.
3. Add the following bot scopes:
   * `chat:write`
   * `chat:write.public`
   * `channels:read`
   * `groups:read`
   * `mpim:read`
   * `im:read`
   * `users:read`

<figure><img src="https://4290782554-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLg716fCfV8IUwXQygkTG%2Fuploads%2Fl8ClLFhVuPqO24tQy1i5%2Fimage.png?alt=media&#x26;token=540cd441-e071-461f-b119-19a6fd6ffd8d" alt=""><figcaption></figcaption></figure>

### Step 5: Add User Scopes

1. In the same **OAuth & Permissions** page, scroll to **User Token Scopes**.
2. Add the following user scopes:
   * `chat:write`
   * `channels:read`
   * `groups:read`
   * `mpim:read`
   * `im:read`
   * `users:read`

<figure><img src="https://4290782554-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLg716fCfV8IUwXQygkTG%2Fuploads%2Fs3NGoH9E6NNsee1tn6cg%2Fimage.png?alt=media&#x26;token=850b0c93-bb19-4189-b0c8-e3ca17231cd0" alt=""><figcaption></figcaption></figure>

### Step 6: Get Client ID and Client Secret

From your Slack app’s **Basic Information** (or **OAuth & Permissions**) page, copy:

* **Client ID**
* **Client Secret**

<figure><img src="https://4290782554-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FLg716fCfV8IUwXQygkTG%2Fuploads%2FoM1PCenZG7CyCoFkIUBZ%2Fimage.png?alt=media&#x26;token=254cbc9d-2e93-425b-b663-4e261c1aff29" alt=""><figcaption></figcaption></figure>

You will use these in `nected-values.yaml` in the next step.

### Step 7: Update `nected-values.yaml` — CREDENTIAL\_CONFIG\_MAP

In `nected-values.yaml`, **CREDENTIAL\_CONFIG\_MAP** and **SYNC\_PLUGINS** are set under the integration service section (`envVars`).&#x20;

{% hint style="info" %}

1. They are not present in the file by default—copy the default values from the Overview and append your integration entries.&#x20;

2. Both must be single-line (no newlines); do not remove existing values.
   {% endhint %}

3. Open your **`nected-values.yaml`** file.

4. Under the `nalanda` section, under `envVars` locate or add **`CREDENTIAL_CONFIG_MAP`**.

**Slack config to add** (merge into the existing `CREDENTIAL_CONFIG_MAP` value). Required fields: `clientId`, `clientSecret` (and other values like `scopes`, in case required).

**Example**:s

```yaml
nalanda:
  envVars:
    CREDENTIAL_CONFIG_MAP: '{"slack":{"clientId":"<<YOUR-APP-CLIENT-ID>>","clientSecret":"<<YOUR-APP-SECRET>>"},"gheet":{...}}'
```

* Replace **`<<YOUR-APP-CLIENT-ID>>`** with your Slack app’s Client ID.
* Replace **`<<YOUR-APP-SECRET>>`** with your Slack app’s Client Secret.
* If you already have other integrations (e.g. `gsheet`), keep them in the same object; only **append** the `slack` key.

### Step 8: Update `nected-values.yaml` — SYNC\_PLUGINS

1. In the same **`nected-values.yaml`**, under the `nalanda` **envVars** section, locate or add **`SYNC_PLUGINS`**.
2. `SYNC_PLUGINS` is a **single-line** comma-separated list. **Append** `slack` to the existing list; do not remove existing plugins. For example:

```yaml
nalanda:
  envVars:
    SYNC_PLUGINS: mysql,mongodb,postgres,sqlserver,redshift,oracle,snowflake,restAPI,anthropic,googleai,openai,vertex,sagemaker,slack
```

Use your current plugin list and add `slack` at the end (or after the last plugin you use).

### Step 9: Apply Changes with Helm

From your machine (or CI), where Helm and `kubectl` are configured for your cluster:

```bash
helm repo update
helm upgrade -i nected nected/nected -f nected-values.yaml
```

This applies the updated values (including Slack config and `SYNC_PLUGINS`) to your on-premise Nected release.

### Step 10: Restart Nalanda (If Needed)

If the Helm chart does not redeploy the Nalanda services automatically, trigger a rollout restart:

```bash
kubectl rollout restart deploy nected-nalanda
```

Wait for the rollout to complete, then verify the Nected UI and integrations.

### Step 11: If Slack Does Not Appear Under Integrations

If Slack does not show up under the **Integrations** tab in the Nected app, sync plugins from inside the Nalanda pod:

1. Get the Nalanda pod name:

   ```bash
   kubectl get pods -l app=nected-nalanda
   ```
2. Run the plugin sync inside the pod:

   ```bash
   kubectl exec -it <<nalanda-pod-name>> -- /bin/bash
   ./nalanda sync plugin
   exit
   ```

Replace **`<<nalanda-pod-name>>`** with the actual pod name (e.g. `nected-nalanda-7d8f9c-xyz12`).

After the sync completes, refresh the Nected UI and check **Integrations** again; Slack should be available to connect.

### Summary Checklist

1. Sign up for Slack.
2. Create app at [api.slack.com/app](https://api.slack.com/app).
3. Set redirect URL: `https://<nected-ui-domain>/auth/redirect`.
4. Add bot scopes: `chat:write`, `chat:write.public`, `channels:read`, `groups:read`, `mpim:read`, `im:read`, `users:read`.
5. Add user scopes: `chat:write`, `channels:read`, `groups:read`, `mpim:read`, `im:read`, `users:read`.
6. Copy Client ID and Client Secret.
7. Add Slack config to `CREDENTIAL_CONFIG_MAP` in `nected-values.yaml`.
8. Add `slack` to `SYNC_PLUGINS` in `nected-values.yaml`.
9. Run `helm repo update` and `helm upgrade -i nected nected/nected -f nected-values.yaml`.
10. If needed: `kubectl rollout restart deploy nected-nalanda`.
11. If Slack missing in UI: `kubectl exec -it <nalanda-pod> -- /bin/bash` then `./nalanda sync plugin`.

### Troubleshooting

* **Slack not in Integrations list:** Ensure `slack` is in `SYNC_PLUGINS` and run `./nalanda sync plugin` inside the Nalanda pod (Step 11).
* **OAuth errors:** Confirm the redirect URL in Slack exactly matches your Nected UI domain and path (`/auth/redirect`), and that Client ID and Client Secret in `CREDENTIAL_CONFIG_MAP` are correct.
* **Missing scopes:** Reinstall the app to your workspace after adding bot and user scopes so new permissions are granted.
