> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jinba.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Slack Credentials

Configure your Slack workspace integration to send messages, create channels, and interact with Slack from your Jinba Flow workflows.

## Prerequisites

* A Slack workspace where you have admin permissions
* Ability to install apps in your workspace

## Creating a Slack App

1. Visit the [Slack API website](https://api.slack.com/)
2. Click "Create an app" or "Your apps"
3. Choose "From scratch"
4. Enter your app name and select your workspace
5. Click "Create app"

## Configuring Your Slack App

### Basic Information

1. In your app settings, go to "Basic Information"
2. Note your **Client ID** and **Client Secret** (you'll need these later)
3. Add a short description of your app

### OAuth & Permissions

1. Navigate to "OAuth & Permissions" in the sidebar
2. Add the following scopes to your app:

#### Bot Token Scopes

* `channels:read` - View basic information about public channels
* `channels:write` - Manage public channels
* `chat:write` - Send messages as your app
* `chat:write.public` - Send messages to channels your app isn't in
* `groups:read` - View basic information about private channels
* `groups:write` - Manage private channels
* `im:read` - View basic information about direct messages
* `im:write` - Send direct messages
* `mpim:read` - View basic information about group direct messages
* `mpim:write` - Send messages to group direct messages
* `users:read` - View people in your workspace
* `users:read.email` - View email addresses of people in your workspace

#### User Token Scopes (if needed)

* `channels:read` - View basic information about public channels
* `chat:write` - Send messages as the user

### Event Subscriptions (Optional)

1. Go to "Event Subscriptions"
2. Enable events if you want to receive real-time updates
3. Add relevant events like `message.channels`, `message.im`, etc.

## Setting Up in Jinba Flow

1. Go to your workspace settings in Jinba Flow
2. Navigate to the "Secret" section
3. Find "Slack" in the list of available credentials
4. Click "Configure" or "Add New"
5. Enter your Slack app credentials:
   * **Client ID**: From your Slack app's Basic Information
   * **Client Secret**: From your Slack app's Basic Information
   * **Bot Token**: From OAuth & Permissions (starts with `xoxb-`)
   * **User Token**: From OAuth & Permissions (starts with `xoxp-`) if needed
6. Click "Save" to store your credentials

## Installing Your App

1. Go to "OAuth & Permissions" in your Slack app
2. Click "Install to Workspace"
3. Review the permissions and click "Allow"
4. Copy the **Bot User OAuth Token** (starts with `xoxb-`)
5. Copy the **User OAuth Token** (starts with `xoxp-`) if you requested user scopes

## Usage

Once configured, you can use Slack in your flows to:

* Send messages to channels, direct messages, or group messages
* Create and manage channels
* Read messages and user information
* Upload files and attachments
* Respond to events in real-time

## Accessing your Slack App

Once set up correctly, your app should be able within the selected Workspace(s)
"Apps" section in the "Home" tab (probably at the bottommost part of the list).
You should also be able to access it by "@-mentioning" it from the search bar.

<Note>
  In case you have modified your app's "Display Information" using
  the "Basic Information" app settings page, it is possible that the changes
  are not reflected within the installed workspace(s). To ensure consistency,
  please make sure to visit the "App Home" page within the "Feautures" category
  of your app's settings page.
</Note>
