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

# Slack Integration

> Connect Junis AI to your Slack workspace for seamless team collaboration

## Overview

Junis Slack Integration brings the power of AI directly into your team's Slack workspace. Once connected, you can:

* **Chat with Junis** - Mention `@Junis` in any channel or send direct messages
* **Access Multiple Organizations** - Switch between different Junis organizations using a simple pattern
* **Maintain Conversation Context** - Junis remembers your conversation history within threads
* **Real-time Streaming** - Get instant, streaming responses directly in Slack

***

## Quick Start

### Step 1: Add Junis to Your Workspace

<Steps>
  <Step title="Go to Installation Page">
    Visit [junis.ai/slack](https://junis.ai/slack) while logged into your Junis account.

    <Note>
      You must be logged in and belong to at least one Junis organization to install the Slack app.
    </Note>
  </Step>

  <Step title="Click 'Add to Slack'">
    Click the **Add to Slack** button to begin the OAuth authorization process.
  </Step>

  <Step title="Authorize Permissions">
    Review and approve the requested permissions in the Slack authorization screen:

    * Send messages as Junis
    * View messages in channels where Junis is mentioned
    * Receive direct messages
  </Step>

  <Step title="Link Your API Key">
    After authorization, you'll be redirected to a success page. Enter your **Junis API Key** to complete the setup.

    <Tip>
      Don't have an API key? Go to **Admin → API Keys** in Junis to create one.
    </Tip>
  </Step>
</Steps>

### Step 2: Start Chatting

Once installed, you can interact with Junis in two ways:

<CardGroup cols={2}>
  <Card title="Channel Mentions" icon="at">
    Type `@Junis` followed by your message in any channel where Junis is added.

    ```
    @Junis What's the latest sales report?
    ```
  </Card>

  <Card title="Direct Messages" icon="message">
    Send a direct message to the Junis app for private conversations.

    ```
    Create a summary of our Q4 objectives
    ```
  </Card>
</CardGroup>

***

## Multi-Organization Support

If you belong to multiple Junis organizations, you can specify which organization to use by including the organization name in asterisks:

<CodeGroup>
  ```text Channel Message theme={null}
  @Junis *TooEasy* What are our pending tasks?
  ```

  ```text Direct Message theme={null}
  *MyCompany* Generate a weekly report
  ```
</CodeGroup>

<Info>
  **Format**: `*OrganizationName* your message here`

  The organization name should match exactly as it appears in your Junis account (case-sensitive).
</Info>

### How It Works

1. **No organization specified** → Uses the default organization linked during setup
2. **Organization specified** → Uses the specified organization for that message
3. **Invalid organization** → Falls back to the default organization

***

## Thread Conversations

Junis maintains conversation context within Slack threads. When you reply in a thread:

* **Previous messages are included** - Up to 20 recent messages in the thread
* **Context is preserved** - Follow-up questions work naturally
* **Each thread is independent** - Different threads have separate contexts

<Accordion title="Example Thread Conversation">
  ```
  You: @Junis What's our Q4 revenue?
  Junis: Your Q4 revenue was $2.4M, a 15% increase from Q3...

  You: (in thread) What were the top contributing products?
  Junis: Based on the Q4 data I just mentioned, the top products were...
  ```
</Accordion>

***

## Managing Your Integration

### View Connected Workspaces

1. Go to **Junis Admin Dashboard**
2. Navigate to **Team Settings → Slack Integrations**
3. View all connected Slack workspaces for your organization

### Link or Update API Key

<Steps>
  <Step title="Access Slack Settings">
    In Junis Admin, go to **Team Settings → Slack Integrations**
  </Step>

  <Step title="Find Your Workspace">
    Locate the Slack workspace you want to update
  </Step>

  <Step title="Enter New API Key">
    Click **Link API Key** and enter your new or updated API key
  </Step>
</Steps>

<Warning>
  If you revoke or delete your API key, the Slack integration will stop working. Make sure to link a new valid API key.
</Warning>

### Remove Integration

To disconnect Junis from your Slack workspace:

1. Go to **Team Settings → Slack Integrations** in Junis Admin
2. Click **Remove** next to the workspace you want to disconnect
3. Confirm the removal

<Note>
  Removing the integration will:

  * Stop Junis from responding to mentions and DMs
  * Delete the stored OAuth tokens
  * Keep your conversation history in Junis
</Note>

***

## Best Practices

<AccordionGroup>
  <Accordion title="Be Specific in Your Questions" icon="bullseye">
    Provide context in your questions for better responses:

    ✅ Good: `@Junis What were our top 5 selling products in January 2026?`

    ❌ Less effective: `@Junis What sold well?`
  </Accordion>

  <Accordion title="Use Threads for Follow-ups" icon="comments">
    Reply in threads to maintain context and keep channels organized:

    * Start a new message for unrelated topics
    * Reply in thread for follow-up questions
    * Junis remembers up to 20 messages in the thread
  </Accordion>

  <Accordion title="Specify Organization When Needed" icon="building">
    If you work with multiple organizations, explicitly specify which one:

    ```
    @Junis *ClientCo* What's the status of Project Alpha?
    ```
  </Accordion>

  <Accordion title="Invite Junis to Relevant Channels" icon="door-open">
    Make sure Junis is invited to channels where you want to use it:

    1. Open the channel
    2. Type `/invite @Junis`
    3. Junis can now respond to mentions in that channel
  </Accordion>
</AccordionGroup>

***

## Security & Privacy

<CardGroup cols={2}>
  <Card title="OAuth 2.0 Authentication" icon="shield-check">
    Industry-standard secure authentication protocol with CSRF protection.
  </Card>

  <Card title="AES-256 Encryption" icon="lock">
    All access tokens are encrypted at rest using AES-256 encryption.
  </Card>

  <Card title="Per-Organization Isolation" icon="building-lock">
    Each organization's data is isolated and cannot be accessed by others.
  </Card>

  <Card title="API Key Authorization" icon="key">
    Only messages from workspaces with valid API keys are processed.
  </Card>
</CardGroup>

### Data Handling

| Data Type            | Storage                       | Access                    |
| -------------------- | ----------------------------- | ------------------------- |
| Slack messages       | Not stored by Junis           | Real-time processing only |
| Conversation history | Stored in Junis               | Used for context          |
| OAuth tokens         | Encrypted storage             | Automatic refresh         |
| User identifiers     | Stored for session management | No personal data shared   |

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Junis doesn't respond to mentions" icon="circle-exclamation">
    **Possible causes:**

    * Junis is not invited to the channel
    * API key is not linked or has been revoked
    * The mention format is incorrect

    **Solutions:**

    1. Invite Junis: `/invite @Junis`
    2. Check API key in Admin → Team Settings → Slack Integrations
    3. Use the exact format: `@Junis your message`
  </Accordion>

  <Accordion title="'Organization not found' error" icon="building-circle-exclamation">
    **Cause:** The organization name in `*OrgName*` doesn't match any of your organizations.

    **Solution:** Check the exact organization name in your Junis account settings.
  </Accordion>

  <Accordion title="Responses are slow or timing out" icon="clock">
    **Possible causes:**

    * Complex queries requiring more processing time
    * Network connectivity issues

    **Solutions:**

    1. For complex requests, wait a bit longer (up to 30 seconds)
    2. Check your internet connection
    3. Try breaking down complex questions into simpler ones
  </Accordion>

  <Accordion title="Need to reinstall the app" icon="rotate">
    **Steps:**

    1. Remove the integration from Junis Admin
    2. Visit [junis.ai/slack](https://junis.ai/slack)
    3. Click "Add to Slack" and complete the authorization
    4. Link your API key
  </Accordion>
</AccordionGroup>

***

## API Key Scopes

When linking an API key to your Slack integration, ensure it has the appropriate scopes:

| Scope                 | Description                          | Required |
| --------------------- | ------------------------------------ | -------- |
| `orchestrator:invoke` | Send messages to Junis AI            | ✅ Yes    |
| `orchestrator:stream` | Enable real-time streaming responses | ✅ Yes    |
| `sessions:read`       | View conversation history            | ✅ Yes    |
| `sessions:messages`   | Access session messages              | ✅ Yes    |

<Info>
  When you create an API key in Junis Admin, all required scopes are automatically included.
</Info>

***

## Need Help?

<CardGroup cols={2}>
  <Card title="Contact Support" icon="envelope" href="mailto:contact@junis.ai">
    Email our support team for personalized assistance.
  </Card>

  <Card title="Documentation" icon="book" href="/">
    Browse our full documentation for more guides and tutorials.
  </Card>
</CardGroup>
