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

# Slack Integration

> Add the Potpie bot to a Slack workspace.

## Prerequisites

Before using the PotpieAI integration for Slack, you need:

* A PotpieAI account with an **API token**
* At least one project that has been [parsed](/concepts/parsing) and is in **ready** status
* The PotpieAI app for Slack installed in your workspace

## Installation

1. <a href="https://potpie-slack-1060968446103.asia-south1.run.app/slack/install" className="mode-link">Install the PotpieAI app for Slack</a>
2. Grant permissions when prompted
3. PotpieAI appears in the workspace apps list

## Authentication

Authenticate with an **API token** before sending the first message.

1. Type `/authenticate` in any channel or direct message
2. A modal opens asking for an API token
3. Enter a PotpieAI API token. Follow the <a href="https://docs.potpie.ai/agents/api-access" className="mode-link">API access documentation</a> to generate one.
4. Click **Submit**

A confirmation message appears after successful authentication.

## Using PotpieAI in Slack

### Starting a Conversation

1. Type `/potpie` in any channel or direct message
2. A modal opens with the following options:
   * Repository selection from [parsed](/concepts/parsing) repositories
   * **Agent** selection
   * Query input
3. Fill in all fields and click **Submit**

PotpieAI creates a new thread and responds based on the codebase.

### Continuing the Conversation

1. Reply to the thread by @mentioning PotpieAI (e.g., `@PotpieAI tell me more about this function`)
2. The **agent** processes the follow-up question within the ongoing conversation context

## Command Reference

| Command                | Description                               |
| ---------------------- | ----------------------------------------- |
| `/authenticate`        | Set up a PotpieAI API token               |
| `/potpie`              | Start a new conversation with an AI agent |
| `@PotpieAI [question]` | Continue a conversation in a thread       |

## Privacy Policy

Review the <a href="https://potpie.ai/privacy-policy" className="mode-link">Privacy Policy</a> for details on data collection and protection.

## Disclaimer

<Warning>
  **AI-Generated Content Notice**: PotpieAI uses Large Language Models (LLMs) to analyze the codebase and generate responses. AI agents strive to provide accurate and helpful information, but:

  * AI-generated responses may contain inaccuracies, errors, or misinterpretations
  * Always verify critical information and code suggestions before implementation
  * The AI's understanding reflects the [parsed](/concepts/parsing) codebase and may not match the current state of the code
  * Complex or ambiguous queries may result in incomplete or incorrect responses

  Treat AI responses as suggestions. Review and validate all generated content.
</Warning>
