# Add your AI agent to Slack > Put your QwryAI agent in a Slack workspace so your team can mention it in any channel and get an answer in the thread The Slack integration adds your QwryAI agent to a Slack workspace. Anyone in a channel the app belongs to can @mention it and get an answer in a thread, drawn from the agent's data sources. It suits internal use, such as answering your team's questions from your help center, policies and product docs, without anyone leaving Slack. > [!NOTE] > > Images and PDFs work too: the agent reads JPEG, PNG and PDF files of up to 5 MB from the thread. See [Attachments](#attachments). > [!NOTE] > > This page covers putting your agent *into* Slack so people can talk to it. Slack does more in QwryAI: > > * To have your agent *notify* a Slack channel when a customer mentions a topic, use the [Slack Action](/docs/user-guides/chatbot/actions/slack). > * To discuss and answer Helpdesk tickets from Slack, see [Slack ticket threads](/docs/user-guides/chatbot/help-desk/slack-ticket-threads). > * To manage your agent by direct message, see [Backstage on Slack](/docs/user-guides/chatbot/backstage/backstage-on-slack). ## Before you start * A QwryAI account with an agent. If you haven't built one yet, follow [Your first AI agent](/docs/user-guides/quick-start/your-first-agent). * A Slack workspace you're allowed to install apps into. * A Slack workspace that isn't connected to another QwryAI agent yet. Each Slack workspace connects to one agent. ## How to connect Slack You can start from either of two places. Both run the same Slack authorization: * **Integrations**: the **Slack** card (*Manage your Slack conversations.*) has a **Connect** button, which reads **Connected** afterwards. * **Channels**: the **Slack** card shows **Setup**, and **Manage** once Slack is connected. ![Authorizing QwryAI in Slack: selecting Connect on the Slack card, choosing the workspace in the Slack window, selecting Allow, and returning to QwryAI where the card reads Connected.](walkthroughs/slack-authorize.gif) **1. Open your agent** In your [QwryAI dashboard](https://www.qwryai.com), select the agent you want to add to Slack. **2. Select Connect on the Slack card** Open **Integrations** in the sidebar and select **Connect** on the **Slack** card. The button reads **Connecting...** while the Slack window is open. ![The Slack card on the Integrations page, Manage your Slack conversations., with the pointer on Connect.](annotated/01-integrations-card.webp "Integrations › Slack › Connect.") Prefer Channels? Select **Setup** on the **Slack** card there instead. ![The Slack card on the Channels page, Connect your agent to Slack, mention it, and have it reply to any message., with the pointer on Setup.](annotated/02-channels-card.webp "Channels › Slack › Setup runs the same connection.") **3. Authorize QwryAI in Slack** A Slack window opens. Pick the workspace in the top-right corner, review the permissions the QwryAI app asks for, and select **Allow**. The window closes, QwryAI confirms the connection, and the card shows **Connected**. > [!NOTE] > > If you select **Cancel** in Slack, QwryAI reports *Slack authorization was declined.* and nothing is connected. If the workspace already belongs to another agent, connecting fails with *This Slack workspace is already connected to another agent. Disconnect it there first.* **4. Invite the agent to a channel** In Slack, open the channel where your team should reach the agent and @mention the QwryAI app with a question. If the app isn't a member yet, Slack offers to add it: select **Invite Them**. Private channels work the same way, once the app is a member. > [!TIP] > > Ask a question your data sources cover, such as `@QwryAI what's our refund window?`, and check that the answer arrives in the thread. ![In a Slack channel, a teammate mentions the QwryAI app with a question, selects Invite Them when Slack offers to add the app, and the agent's answer appears as a reply in the thread.](walkthroughs/slack-mention.gif) The Slack card in **Create Action** depends on the same connection. Until Slack is connected, selecting it shows **Connect Slack** instead of the Action's settings. ## How the AI agent works in Slack * **It answers @mentions only.** The agent replies to messages that mention the QwryAI app in a public or private channel. It doesn't answer other channel messages. Direct messages to the app go to [Backstage](/docs/user-guides/chatbot/backstage/backstage-on-slack), not to your agent, and group direct messages are ignored. * **It replies in the thread.** A mention in the main channel gets its answer as a thread reply under that message. A mention inside a thread gets its answer in the same thread. * **Each thread is one conversation.** Earlier turns in the thread are part of the conversation, so people can ask follow-up questions there. * **It reads the thread for context.** On each mention, the agent reads the thread replies posted since its last answer (or every earlier reply, the first time it's mentioned) and adds them, with who wrote them, ahead of the question. Channel messages outside the thread aren't read. * **Conversations appear in Inbox.** Slack conversations are listed in your agent's [Inbox](/docs/user-guides/chatbot/activity) like any other channel, with Slack as the channel. For example, in a thread where one teammate wrote "Acme says their export fails on large files" and another replied "Same on the Growth plan", a message saying `@QwryAI what's the file size limit for exports?` gets an answer that takes both earlier replies into account. ### Attachments The agent looks at files attached to the message that mentions it, and to the thread replies it reads: | File type | What happens | | - | - | | JPEG, PNG and PDF, up to 5 MB each | Passed to the agent's model, which reads them and answers from their content. Up to 5 files per mention. | | Anything else, or a larger file | Skipped | ### Credits Each reply in Slack uses credits at your agent's [model](/docs/user-guides/chatbot/models-comparison) cost, the same as a reply on any other channel. ## Settings Once Slack is connected, open **Channels** and select **Manage** on the **Slack** card. The Slack page has the tabs **Overview**, **Connections**, **Actions** and **Extra Settings**. ![The connected Slack card on the Integrations page with its Manage Slack connection menu open, showing Reconnect and Disconnect.](connected/annotated/c01-integrations-connected.webp "A connected Slack card and its menu.") ### Message appearance Replies show in Slack under the QwryAI app's own name and icon. The preview on the Slack page uses your agent's name and picture, but Slack always posts as the installed app. ### Mention name People mention the agent by the QwryAI app's name in your workspace. Slack stores that name, so you change it in Slack, not in QwryAI. **1. Open Manage apps in Slack** Select your workspace name in the Slack sidebar, then **Tools & settings**, then **Manage apps**. **2. Open the QwryAI app** Under **Installed Apps**, find **QwryAI** and open **App Details**. **3. Rename the bot user** On the **Configuration** tab, find **Bot user**, edit the name and save. A Workspace Owner can limit who manages apps; if you don't see these options, ask one. After the rename, people mention the new name and the agent answers as before. The rename applies to that Slack workspace only. ### Connected workspace The **Connections** tab shows the **Connected workspace** card. Your agent connects to one Slack workspace at a time. Open the card's menu and select **Disconnect** to remove it. QwryAI lists any [Slack Actions](/docs/user-guides/chatbot/actions/slack) that use the connection and deletes them when you confirm. ![The Connections tab, Your chatbot can be connected to one Slack workspace., with the Connected Workspace heading and the connected Slack workspace marked Active.](connected/annotated/c02-connections.webp "Connections › Connected workspace.") ### Ignore bot messages On the **Extra Settings** tab, turn on **Ignore bots** under **Bot messages** (*Ignore messages from other bots.*). The agent then ignores mentions posted by other Slack bots and apps, and leaves their messages out of the thread it reads. Use it when automation bots or other AI agents post in your channels, to prevent bot-to-bot loops. ![The Extra Settings tab with the Ignore bots switch under Bot messages.](connected/annotated/c03-extra-settings.webp "Extra Settings › Bot messages › Ignore bots.") ## Limitations * **One workspace per agent, and one agent per workspace.** The Connections tab notes *Your chatbot can be connected to one Slack workspace.* A workspace that's already connected elsewhere can't be connected again until it's disconnected there. * **No direct messages to the agent.** It answers only when mentioned in a channel or thread; direct messages go to Backstage. * **Images and PDFs only.** Other file types and files over 5 MB are skipped. * **Uninstalling the app disconnects Slack.** Removing the QwryAI app from your Slack workspace, or revoking its token, disconnects Slack from your agent. ## Troubleshooting > [accordion] The AI agent doesn't reply in a channel > > Check that the QwryAI app is a member of the channel (mention it and select **Invite Them** when Slack asks) and that your message mentions the app. If **Ignore bots** is on, mentions posted by bots or apps are ignored. > [accordion] The AI agent doesn't reply to direct messages > > That's expected. Your agent answers mentions in channels and threads. A direct message to the app is a [Backstage](/docs/user-guides/chatbot/backstage/backstage-on-slack) request. > [accordion] Connecting fails with "This Slack workspace is already connected to another agent" > > Each Slack workspace connects to one agent. Disconnect it from the other agent's **Integrations** page first, or connect a different workspace. > [accordion] The AI agent ignored a file > > Only JPEG, PNG and PDF files up to 5 MB are read, up to 5 per mention. Other file types and larger files are skipped. ## Backstage Slack is also one of the places you can talk to Backstage, QwryAI's assistant for managing your agent: send the QwryAI app a direct message. See [Backstage on Slack](/docs/user-guides/chatbot/backstage/backstage-on-slack). ## Frequently asked questions > [accordion] Does the agent in Slack use credits? > > Yes. Each reply uses credits at your agent's model cost, like any other channel, and Slack conversations appear in your agent's **Inbox**. > [accordion] Can I mention the agent by a different name? > > Yes. Rename the QwryAI bot user from **Manage apps** in your Slack workspace. See [Mention name](#mention-name). > [accordion] Can I connect several agents to one Slack workspace? > > No. A Slack workspace connects to one agent, and an agent connects to one Slack workspace. > [accordion] Does the agent work in private channels? > > Yes. Add the QwryAI app to the private channel, then mention it. > [accordion] Can the agent read the rest of the thread? > > Yes. When mentioned in a thread, it reads the replies posted since its last answer and uses them as context. Turn on **Ignore bots** to leave other bots' messages out. It doesn't read channel messages outside the thread. > [accordion] Can I send files to the agent in Slack? > > Yes. Attach JPEG, PNG or PDF files of up to 5 MB to your message or to the thread. Other file types are skipped. ## Support Need help with the Slack app? [Contact us](/contact). ## Next steps > [card] Slack Action | /docs/user-guides/chatbot/actions/slack | Have your agent post to a Slack channel when a customer mentions a topic you care about. > [card] Backstage on Slack | /docs/user-guides/chatbot/backstage/backstage-on-slack | Manage your agent conversationally, from Slack.