Slack

Slack logo

Slack

Connect your Slack data to Airweave

Overview

The Slack connector allows you to sync data from Slack into Airweave, making it available for search and retrieval by your agents.

Configuration

SlackSource

Slack source implementation.

This connector retrieves data from Slack such as Channels, Users, and Messages, then yields them as entities using their respective Slack entity schemas.

Authentication

This connector uses OAuth 2.0 authentication flow.

You can connect through the Airweave UI, which will guide you through the OAuth flow.

Entities

The following data models are available for this connector:

Schema for Slack channel entities.

FieldTypeDescription
channel_idstrUnique identifier for the channel
nameOptional[str]Human-readable name of the channel
is_channelboolWhether this is a public channel
is_groupboolWhether this is a private channel/group
is_imboolWhether this is a direct message (IM)
is_mpimboolWhether this is a multi-person direct message
is_archivedboolWhether the channel has been archived
createdOptional[datetime]Timestamp when the channel was created
creatorOptional[str]User ID of the channel creator
membersList[str]List of user IDs who are members of this channel
topicOptional[Dict]Information about the channel topic including value and creator
purposeOptional[Dict]Information about the channel purpose including value and creator

Schema for Slack user entities.

FieldTypeDescription
user_idstrUnique identifier for the user
team_idOptional[str]Identifier for the team/workspace the user belongs to
nameOptional[str]The username/handle of the user
real_nameOptional[str]The user’s real/full name
display_nameOptional[str]The display name set by the user
is_botboolWhether the user is a bot
is_adminboolWhether the user has admin privileges
is_ownerboolWhether the user is an owner of the workspace
is_primary_ownerboolWhether the user is the primary owner of the workspace
is_restrictedboolWhether the user is a restricted user (guest)
is_ultra_restrictedboolWhether the user is an ultra-restricted user (single-channel guest)
updatedOptional[datetime]Timestamp when the user profile was last updated

Schema for Slack message entities.

FieldTypeDescription
channel_idstrID of the channel the message was posted in
user_idOptional[str]ID of the user who sent the message
textOptional[str]The message text content
tsOptional[str]Unique timestamp identifier for the message (format: ‘1664998373.018700’)
thread_tsOptional[str]Timestamp of the parent message in a thread
teamOptional[str]Team/workspace ID the message belongs to
attachmentsList[Dict]Legacy message attachments
blocksList[Dict]Block Kit blocks in the message
filesList[Dict]Files attached to the message
reactionsList[Dict]Emoji reactions added to the message
is_botboolWhether the message was sent by a bot
subtypeOptional[str]Message subtype for special messages (like joins, leaves)
editedOptional[Dict]Information about message edits including timestamp and user

Integrate with Slack on localhost

This guide will walk you through connecting your Slack workspace to Airweave when run locally. Slack does not allow OAuth2 flows for http://localhost, so this is a workaround.

Prerequisites

  • Access to a Slack workspace where you have permissions to add apps
  • Administrator access to your Airweave instance

Steps to Connect

1. Create a Slack App

  1. Go to https://api.slack.com/apps
  2. Click the “Create New App” button
  3. Choose “From scratch”
  4. Enter a name for your app (e.g., “Airweave”)
  5. Select the workspace you want to connect
  6. Click “Create App“‘
Create app in Slack

2. Configure OAuth Permissions

  1. In your Slack app settings, navigate to “OAuth & Permissions” in the sidebar
  2. Scroll down to the “Scopes” section
  3. Under “User Token Scopes”, add the following scopes:
    • channels:history
    • channels:read
    • groups:read
    • im:read
    • mpim:read
    • users:read
User Token Scopes

3. Install the App to Your Workspace

  1. Scroll back to the top of the “OAuth & Permissions” page
  2. Click the Install to Workspace button
  3. Review the permissions and click “Allow”
  4. After installation, you’ll be redirected back to the app settings
  5. Copy the “User OAuth Token” (it starts with xoxp-)
OAuth2 User token in Slack

4. Add the Token to Airweave

  1. In your Airweave application, navigate to the integrations section
  2. Select “Slack” from the available integrations
  3. Paste the Bot User OAuth Token you copied in the previous step
  4. Complete any additional configuration required by Airweave
  5. Save your changes
Add Slack token in Airweave

Verification

After completing these steps, Airweave should be connected to your Slack workspace. You can verify this by checking the status of the integration in Airweave’s dashboard.

Troubleshooting

  • If you encounter permission errors, ensure you’ve added all required scopes to your Slack app
  • If the connection fails, verify that the token was copied correctly and hasn’t expired
  • For workspace connection issues, ensure you have the appropriate admin permissions in your Slack workspace