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

# Connecting Slack to your app

> Connect Base44 to Slack to post messages, alert teammates, and read channel data.

Connect your Base44 app to Slack to post messages, alert teammates, and read conversations. Base44 offers two Slack connectors: **Slack User** connects as a person in your workspace, and **Slack Bot** posts as a configurable bot identity.

<Tip>
  **Which type should you use?** Use a **connector for app builders** when everyone shares one Slack connection, for example posting to a company channel. Use a **connector for app users** when each person connects their own Slack account.
</Tip>

<Note>
  You need a [**Builder plan**](https://base44.com/pricing) or higher to use connectors in your app.
</Note>

***

## What you can do

<CardGroup cols={3}>
  <Card title="Post to channels" icon="comment">
    Send updates or announcements to a channel when something happens in your app.
  </Card>

  <Card title="Notify teammates" icon="bell">
    Alert the right people the moment a ticket, deadline, or threshold is hit.
  </Card>

  <Card title="Turn conversations into data" icon="magnifying-glass">
    Read channel history to build digests, dashboards, or searchable views.
  </Card>
</CardGroup>

**Example prompts for the AI chat**

```text theme={null}
Send a Slack alert to #incidents when a deployment fails, including environment and error summary.
```

```text theme={null}
Send a daily summary of completed tasks to #team-updates at 5pm, grouped by assignee.
```

```text theme={null}
Build a dashboard showing where I have been mentioned in Slack and which messages still need a reply.
```

***

## At a glance

<Card>
  <div className="b44-spec">
    <div className="b44-spec-row"><div className="b44-spec-key">Type identifiers</div><div className="b44-spec-val"><code>slack</code> (Slack User), <code>slackbot</code> (Slack Bot)</div></div>
    <div className="b44-spec-row"><div className="b44-spec-key">Auth model</div><div className="b44-spec-val">OAuth</div></div>
    <div className="b44-spec-row"><div className="b44-spec-key">Connector types</div><div className="b44-spec-val">For app builders, For app users</div></div>
    <div className="b44-spec-row"><div className="b44-spec-key">Connection config</div><div className="b44-spec-val">None</div></div>
    <div className="b44-spec-row"><div className="b44-spec-key">Permissions guide</div><div className="b44-spec-val"><a href="#slack-scopes-and-permissions">Slack scopes and permissions</a></div></div>
  </div>
</Card>

<CardGroup cols={2}>
  <Card title="Slack User" icon="user">
    Acts with a connected user's permissions. Best for reading channel history, searching messages, tracking mentions, and building dashboards from Slack data.
  </Card>

  <Card title="Slack Bot" icon="robot">
    Posts as a branded bot you can name and style. Best for incident alerts, release announcements, and scheduled summaries.
  </Card>
</CardGroup>

***

## Connect it

<Tabs>
  <Tab title="For app builders">
    Connect one Slack account that all flows in your app use.

    **To connect Slack:**

    1. Go to your app editor.
    2. Describe what you want to do with Slack in the AI chat.
    3. Review the **Action required** and **Required permissions** in the side panel.
    4. Click the **Connect** button to authorize the required Slack connector.
    5. In the Slack window, select your workspace, review the permissions, and click **Allow**.
    6. Return to the editor and let the AI finish creating the Slack-powered flows.
  </Tab>

  <Tab title="For app users">
    Let each person using your app connect their own Slack account. An admin sets up the connector once at the workspace level, then each person connects their own account inside your app.

    **To prepare your connector details:**

    1. Create a Slack app in [Slack API Applications](https://api.slack.com/apps) to get a Client ID and Client Secret.
    2. Add your Base44 redirect URIs to the Slack app. See the card below.
    3. Note the scopes your app needs.

    <Card title="Redirect URIs" icon="link">
      Open **Connectors** in your workspace settings, click **View redirect URIs for your apps** under **Connectors For App Users**, and select your app. Add every redirect URI shown to your Slack app. Each app has its own set (live, preview, and custom domain), so add all of them.
    </Card>

    **To add the connector:**

    1. In your workspace settings, open **Connectors**.
    2. Under **Connectors For App Users**, add Slack and enter your **Client ID**, **Client Secret**, and **Scopes**.

    You can also add the connector from the AI chat in your app.

    <Warning>
      Treat your Client Secret like a password. Do not share it or include it in screenshots. Only enter it when Base44 asks for it during setup.
    </Warning>

    **To connect an account:**

    Each person connects their own Slack account inside your app. Prompt the AI chat to add a feature where people connect Slack, then each person connects their own account when they use it.
  </Tab>
</Tabs>

<Tip>
  To post as a branded bot, use the `slackbot` connector and prompt the AI chat to set the bot name and icon, for example: `Send messages as "Deploy Bot" with a rocket emoji icon.`
</Tip>

***

## Use it in a backend function

Once Slack is connected, your backend functions can retrieve an access token and call the Slack API directly. Base44 handles the OAuth flow and token storage.

* For a shared connection, use `getConnection()` to retrieve the token.
* For an app user connection, use `getCurrentAppUserConnection()` so each request uses the signed-in person's token.

```javascript theme={null}
// Shared connection: one account the whole app uses
const connection = await base44.asServiceRole.connectors.getConnection("slack");
// Use the connection's access token to call the Slack API.
```

This is a simplified example. The setup and full code patterns are the same for every connector. See the developer guides for the complete pattern:

<CardGroup cols={2}>
  <Card title="Shared connectors" icon="code" href="/developers/backend/resources/connectors/shared-connectors">
    Configure, deploy, and call a shared connection from a backend function.
  </Card>

  <Card title="App user connectors" icon="user" href="/developers/backend/resources/connectors/app-user-connectors">
    Retrieve a per-user token and call the API as the signed-in person.
  </Card>
</CardGroup>

***

## Slack scopes and permissions

When you connect Slack User or Slack Bot, the connector requests permissions (scopes) that control what your app can do in the workspace. Below is the current list of the Slack scopes the connectors may request, grouped by capability.

<Card title="Slack scopes" icon="shield">
  **Channels (public channels)**

  * `channels:read`: Read information about public channels in your workspace, for example names, topics, and basic metadata.
  * `channels:write`: Create and manage public channels, or update channel details.
  * `channels:history`: Read message history from public channels where the app has access.
  * `channels:join`: Allow the app to join public channels in the workspace.

  **Messages and content**

  * `chat:write`: Send and update messages in channels, groups, and DMs where the app has access.
  * `reactions:read`: Read reactions added to messages.
  * `files:read`: Read information about files shared in conversations the app can access.

  **Search and users**

  * `search:read`: Search messages and files the connected account can access.
  * `users:read`: Read basic profile information for people in the workspace.
</Card>

<Note>
  Scope lists may change over time. Always review the permissions shown during the connection flow. Slack Bot must be added to a private channel before it can post there.
</Note>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="The connection fails with a redirect URI error">
    The redirect URI registered in your Slack app must exactly match one shown in **View redirect URIs for your apps** for that app. Each app has its own set of redirect URIs, so add every URI shown for the app you are connecting.
  </Accordion>

  <Accordion title="Some people cannot connect their account">
    If your Slack app is not available to the workspaces the people using your app are in, they cannot connect. Make your Slack app available to those workspaces so anyone using your app can connect their own account.
  </Accordion>
</AccordionGroup>

***

## FAQs

<AccordionGroup>
  <Accordion title="How do I change which Slack account is connected?">
    1. Go to your app dashboard and click **Integrations**.
    2. Click the **My integrations** tab.
    3. Find **Slack** or **Slack Bot** and click the **More Actions** icon <Icon icon="ellipsis" />, then **Switch account**.
    4. Complete the Slack authorization flow for the new workspace.
  </Accordion>

  <Accordion title="Can I customize how messages from my app look in Slack?">
    Yes. When you describe Slack messages in the AI chat, you can specify:

    * The text content and formatting.
    * Whether to include fields like IDs, links, and counts.
    * How often and when messages are sent.

    You can also open the generated backend functions in **Dashboard → Code → Functions** to fine-tune the message payload (for example, using blocks for more complex layouts).
  </Accordion>

  <Accordion title="Why can't Slack Bot post in my private channel?">
    Slack Bot must be explicitly added to private channels before it can post messages there.

    **In your Slack workspace:**

    1. Open the private channel.
    2. Click the channel name.
    3. Go to the **Integrations** tab.
    4. Click **Add apps** and select **Base44**.

    Once added, your app's Slack Bot can post messages in that channel.
  </Accordion>

  <Accordion title="How do I manage the Slack or Slack Bot connector in my app?">
    Click the **More actions** icon on the connector in your app's **Integrations** tab, then choose an option such as switch account, reconnect, or disconnect. [Learn more about managing connectors](/Integrations/Connectors#managing-connectors).
  </Accordion>
</AccordionGroup>
