> For the complete documentation index, see [llms.txt](https://docs.erathos.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.erathos.com/connectors/apis/slack.md).

# Slack

Connect your Slack workspace to your data warehouse. Sync messages, channels, users, and files to BigQuery, Redshift, Postgres, Databricks, and more.

## Using the Erathos platform

When selecting Slack as a new connector on the Erathos platform, you will need to name your connection and fill in the following form:

* **Token** — your Slack Bot User OAuth Token (starts with `xoxb-`), used to authenticate all requests to the Slack Web API

With this connection created you can seamlessly move your Slack data to your BigQuery, Redshift or Postgres data warehouse.

### How to find my token?

To generate a Slack token, go to <https://api.slack.com/apps> and click **Create New App** (or select an existing app). Under **OAuth & Permissions**, add the bot token scopes required by the endpoints you want to sync — for example `channels:read`, `channels:history`, `groups:read`, `groups:history`, `im:read`, `im:history`, `mpim:read`, `mpim:history`, `users:read`, `files:read`, `emoji:read`, `pins:read`, `reactions:read`, `bookmarks:read`, `reminders:read`, `dnd:read`, `search:read`, `team:read` and `usergroups:read` — then click **Install to Workspace** (or **Reinstall to Workspace**).

On the same **OAuth & Permissions** page, copy the **Bot User OAuth Token** shown under *Tokens for your workspace*. It starts with `xoxb-`.

Paste the token into the **Token** field on the Erathos platform and click **Save and close** to complete the setup. Erathos validates the credentials against Slack's `auth.test` endpoint before saving the connection.

## Endpoints and fields

### conversations

Sync type availability: Full-refresh

Parent of [conversation\_members](#conversation-members), [messages](#messages), [bookmarks](#bookmarks), [pins](#pins)

| Field                         | Type      |
| ----------------------------- | --------- |
| id                            | text      |
| name                          | text      |
| name\_normalized              | text      |
| is\_channel                   | boolean   |
| is\_group                     | boolean   |
| is\_im                        | boolean   |
| is\_mpim                      | boolean   |
| is\_private                   | boolean   |
| is\_archived                  | boolean   |
| is\_shared                    | boolean   |
| is\_org\_shared               | boolean   |
| is\_ext\_shared               | boolean   |
| is\_default\_shared           | boolean   |
| is\_member                    | boolean   |
| is\_pending\_ext\_shared      | boolean   |
| pending\_shared               | json      |
| pending\_connected\_team\_ids | json      |
| unlinked                      | integer   |
| num\_members                  | integer   |
| priority                      | integer   |
| user                          | text      |
| created                       | timestamp |
| creator                       | text      |
| topic                         | json      |
| purpose                       | json      |
| previous\_names               | json      |
| locale                        | text      |
| conversation\_host\_id        | text      |

### conversation\_members

Sync type availability: Full-refresh

Child of [conversations](#conversations)

| Field    | Type |
| -------- | ---- |
| user\_id | text |

### messages

Sync type availability: Full and incremental refresh

[Cursor](https://docs.erathos.com/platform/connections/sync-types#understanding-cursors): `ts`

Child of [conversations](#conversations)

Parent of [thread\_replies](#thread-replies)

| Field               | Type      | Cursor |
| ------------------- | --------- | ------ |
| type                | text      |        |
| subtype             | text      |        |
| text                | text      |        |
| user                | text      |        |
| ts                  | timestamp | ✓      |
| thread\_ts          | timestamp |        |
| reply\_count        | integer   |        |
| reply\_users        | json      |        |
| reply\_users\_count | integer   |        |
| latest\_reply       | timestamp |        |
| blocks              | json      |        |
| attachments         | json      |        |
| reactions           | json      |        |
| edited              | json      |        |
| permalink           | text      |        |
| is\_locked          | boolean   |        |
| subscribed          | boolean   |        |
| bot\_id             | text      |        |
| app\_id             | text      |        |
| files               | json      |        |
| upload              | boolean   |        |
| display\_as\_bot    | boolean   |        |
| client\_msg\_id     | text      |        |
| hidden              | boolean   |        |

### thread\_replies

Sync type availability: Full and incremental refresh

[Cursor](https://docs.erathos.com/platform/connections/sync-types#understanding-cursors): `ts`

Child of [messages](#messages)

| Field               | Type      | Cursor |
| ------------------- | --------- | ------ |
| type                | text      |        |
| subtype             | text      |        |
| text                | text      |        |
| user                | text      |        |
| ts                  | timestamp | ✓      |
| thread\_ts          | timestamp |        |
| parent\_user\_id    | text      |        |
| reply\_count        | integer   |        |
| reply\_users        | json      |        |
| reply\_users\_count | integer   |        |
| latest\_reply       | timestamp |        |
| blocks              | json      |        |
| attachments         | json      |        |
| reactions           | json      |        |
| edited              | json      |        |
| is\_locked          | boolean   |        |
| subscribed          | boolean   |        |
| permalink           | text      |        |

### bookmarks

Sync type availability: Full-refresh

Child of [conversations](#conversations)

| Field                       | Type      |
| --------------------------- | --------- |
| id                          | text      |
| channel\_id                 | text      |
| date\_created               | timestamp |
| date\_updated               | timestamp |
| type                        | text      |
| title                       | text      |
| link                        | text      |
| user\_id                    | text      |
| last\_updated\_by\_user\_id | text      |

### pins

Sync type availability: Full-refresh

Child of [conversations](#conversations)

| Field       | Type      |
| ----------- | --------- |
| type        | text      |
| channel     | text      |
| created     | timestamp |
| created\_by | text      |
| message     | json      |
| file        | json      |
| comment     | json      |

### conversation\_connect\_invites

Sync type availability: Full-refresh

| Field               | Type      |
| ------------------- | --------- |
| id                  | text      |
| date\_created       | timestamp |
| date\_expires       | timestamp |
| inviting\_team\_id  | text      |
| inviting\_channel   | json      |
| invite\_type        | text      |
| recipient\_user\_id | text      |

### conversation\_connect\_invite\_requests

Sync type availability: Full-refresh

| Field                       | Type      |
| --------------------------- | --------- |
| id                          | text      |
| date\_created               | timestamp |
| date\_expires               | timestamp |
| date\_denied                | timestamp |
| date\_last\_updated         | timestamp |
| status                      | text      |
| requesting\_user\_id        | text      |
| requesting\_team\_id        | text      |
| recipient\_channel\_id      | text      |
| channel\_names\_to\_approve | json      |

### users

Sync type availability: Full-refresh

Parent of [users\_get\_presence](#users-get-presence)

| Field                          | Type      |
| ------------------------------ | --------- |
| id                             | text      |
| team\_id                       | text      |
| name                           | text      |
| deleted                        | boolean   |
| color                          | text      |
| real\_name                     | text      |
| tz                             | text      |
| tz\_label                      | text      |
| tz\_offset                     | integer   |
| profile                        | json      |
| is\_admin                      | boolean   |
| is\_owner                      | boolean   |
| is\_primary\_owner             | boolean   |
| is\_restricted                 | boolean   |
| is\_ultra\_restricted          | boolean   |
| is\_bot                        | boolean   |
| is\_app\_user                  | boolean   |
| is\_email\_confirmed           | boolean   |
| updated                        | timestamp |
| who\_can\_share\_contact\_card | text      |
| Favorite programming language  | text      |
| Start date                     | date      |

In addition to the fields above, workspace-specific custom profile fields (defined in Slack and listed in the [users\_profile\_fields](#users-profile-fields) endpoint) are appended to this table.

### users\_get\_presence

Sync type availability: Full-refresh

Child of [users](#users)

| Field             | Type      |
| ----------------- | --------- |
| presence          | text      |
| online            | boolean   |
| auto\_away        | boolean   |
| manual\_away      | boolean   |
| connection\_count | integer   |
| last\_activity    | timestamp |

### users\_conversations

Sync type availability: Full-refresh

| Field                         | Type      |
| ----------------------------- | --------- |
| id                            | text      |
| name                          | text      |
| name\_normalized              | text      |
| is\_channel                   | boolean   |
| is\_group                     | boolean   |
| is\_im                        | boolean   |
| is\_mpim                      | boolean   |
| is\_private                   | boolean   |
| is\_archived                  | boolean   |
| is\_shared                    | boolean   |
| is\_org\_shared               | boolean   |
| is\_ext\_shared               | boolean   |
| is\_default\_shared           | boolean   |
| is\_member                    | boolean   |
| is\_pending\_ext\_shared      | boolean   |
| pending\_shared               | json      |
| pending\_connected\_team\_ids | json      |
| unlinked                      | integer   |
| num\_members                  | integer   |
| priority                      | integer   |
| user                          | text      |
| created                       | timestamp |
| creator                       | text      |
| topic                         | json      |
| purpose                       | json      |
| previous\_names               | json      |
| locale                        | text      |
| conversation\_host\_id        | text      |

### users\_profile\_fields

Sync type availability: Full-refresh

| Field            | Type    |
| ---------------- | ------- |
| id               | text    |
| team\_id         | text    |
| ordering         | integer |
| label            | text    |
| hint             | text    |
| type             | text    |
| possible\_values | json    |
| is\_hidden       | boolean |
| is\_protected    | boolean |
| is\_global       | boolean |

### files

Sync type availability: Full and incremental refresh

[Cursor](https://docs.erathos.com/platform/connections/sync-types#understanding-cursors): `created`

Parent of [file\_comments](#file-comments)

| Field                  | Type      | Cursor |
| ---------------------- | --------- | ------ |
| id                     | text      |        |
| created                | timestamp | ✓      |
| timestamp              | timestamp |        |
| name                   | text      |        |
| title                  | text      |        |
| mimetype               | text      |        |
| filetype               | text      |        |
| pretty\_type           | text      |        |
| user                   | text      |        |
| user\_team             | text      |        |
| editable               | boolean   |        |
| size                   | integer   |        |
| mode                   | text      |        |
| is\_external           | boolean   |        |
| external\_type         | text      |        |
| is\_public             | boolean   |        |
| public\_url\_shared    | boolean   |        |
| display\_as\_bot       | boolean   |        |
| url\_private           | text      |        |
| url\_private\_download | text      |        |
| permalink              | text      |        |
| comments\_count        | integer   |        |
| shares                 | json      |        |
| channels               | json      |        |
| groups                 | json      |        |
| ims                    | json      |        |
| has\_rich\_preview     | boolean   |        |
| file\_access           | text      |        |

### file\_comments

Sync type availability: Full-refresh

Child of [files](#files)

| Field     | Type      |
| --------- | --------- |
| id        | text      |
| created   | timestamp |
| timestamp | timestamp |
| user      | text      |
| comment   | text      |
| is\_intro | boolean   |
| reactions | json      |

### files\_remote

Sync type availability: Full and incremental refresh

[Cursor](https://docs.erathos.com/platform/connections/sync-types#understanding-cursors): `created`

| Field          | Type      | Cursor |
| -------------- | --------- | ------ |
| id             | text      |        |
| created        | timestamp | ✓      |
| timestamp      | timestamp |        |
| name           | text      |        |
| title          | text      |        |
| mimetype       | text      |        |
| filetype       | text      |        |
| pretty\_type   | text      |        |
| user           | text      |        |
| url            | text      |        |
| permalink      | text      |        |
| is\_external   | boolean   |        |
| external\_type | text      |        |
| app\_id        | text      |        |
| app\_name      | text      |        |
| size           | integer   |        |

### usergroups

Sync type availability: Full-refresh

Parent of [usergroup\_members](#usergroup-members)

| Field                   | Type      |
| ----------------------- | --------- |
| id                      | text      |
| team\_id                | text      |
| name                    | text      |
| description             | text      |
| handle                  | text      |
| is\_external            | boolean   |
| date\_create            | timestamp |
| date\_update            | timestamp |
| date\_delete            | timestamp |
| auto\_type              | text      |
| enterprise\_subteam\_id | text      |
| created\_by             | text      |
| updated\_by             | text      |
| deleted\_by             | text      |
| prefs                   | json      |
| user\_count             | integer   |

### usergroup\_members

Sync type availability: Full-refresh

Child of [usergroups](#usergroups)

| Field    | Type |
| -------- | ---- |
| user\_id | text |

### team\_info

Sync type availability: Full-refresh

| Field             | Type    |
| ----------------- | ------- |
| id                | text    |
| name              | text    |
| url               | text    |
| domain            | text    |
| email\_domain     | text    |
| icon              | json    |
| avatar\_base\_url | text    |
| is\_verified      | boolean |
| enterprise\_id    | text    |
| enterprise\_name  | text    |

### auth\_teams

Sync type availability: Full-refresh

| Field             | Type    |
| ----------------- | ------- |
| id                | text    |
| name              | text    |
| url               | text    |
| domain            | text    |
| avatar\_base\_url | text    |
| is\_verified      | boolean |
| enterprise\_id    | text    |
| icon              | json    |

### team\_preferences

Sync type availability: Full-refresh

| Field                          | Type    |
| ------------------------------ | ------- |
| allow\_message\_deletion       | boolean |
| disable\_file\_editing         | boolean |
| disable\_file\_pasting         | boolean |
| display\_real\_names           | boolean |
| log\_to\_channels              | boolean |
| who\_can\_manage\_integrations | json    |
| who\_can\_manage\_channels     | json    |
| default\_channels              | json    |

### team\_billable\_info

Sync type availability: Full-refresh

| Field    | Type    |
| -------- | ------- |
| user\_id | text    |
| billable | boolean |

### team\_access\_logs

Sync type availability: Full-refresh

| Field       | Type      |
| ----------- | --------- |
| user\_id    | text      |
| username    | text      |
| date\_first | timestamp |
| date\_last  | timestamp |
| count       | integer   |
| ip          | text      |
| user\_agent | text      |
| isp         | text      |
| country     | text      |
| region      | text      |

### team\_integration\_logs

Sync type availability: Full-refresh

| Field         | Type      |
| ------------- | --------- |
| user\_id      | text      |
| user\_name    | text      |
| service\_id   | integer   |
| service\_type | text      |
| date          | timestamp |
| change\_type  | text      |
| app\_type     | text      |
| app\_id       | text      |
| scope         | text      |
| channel       | text      |
| rss\_feed     | json      |

### team\_external\_teams

Sync type availability: Full-refresh

| Field             | Type      |
| ----------------- | --------- |
| id                | text      |
| name              | text      |
| url               | text      |
| domain            | text      |
| avatar\_base\_url | text      |
| is\_verified      | boolean   |
| date\_created     | timestamp |
| date\_updated     | timestamp |

### apps\_activities

Sync type availability: Full and incremental refresh

[Cursor](https://docs.erathos.com/platform/connections/sync-types#understanding-cursors): `created`

| Field        | Type      | Cursor |
| ------------ | --------- | ------ |
| id           | text      |        |
| app\_id      | text      |        |
| team\_id     | text      |        |
| user\_id     | text      |        |
| created      | timestamp | ✓      |
| entity\_type | text      |        |
| entity\_id   | text      |        |
| event\_type  | text      |        |
| source       | json      |        |

### apps\_event\_authorizations

Sync type availability: Full-refresh

| Field                   | Type    |
| ----------------------- | ------- |
| enterprise\_id          | text    |
| team\_id                | text    |
| user\_id                | text    |
| is\_bot                 | boolean |
| is\_enterprise\_install | boolean |

### apps\_datastore\_query

Sync type availability: Full-refresh

| Field   | Type      |
| ------- | --------- |
| id      | text      |
| created | timestamp |
| updated | timestamp |
| name    | text      |

### emoji

Sync type availability: Full-refresh

| Field | Type |
| ----- | ---- |
| name  | text |
| url   | text |

### reactions

Sync type availability: Full-refresh

| Field   | Type |
| ------- | ---- |
| type    | text |
| channel | text |
| user    | text |
| message | json |
| file    | json |
| comment | json |

### stars

Sync type availability: Full-refresh

| Field        | Type      |
| ------------ | --------- |
| type         | text      |
| channel      | text      |
| date\_create | timestamp |
| message      | json      |
| file         | json      |
| comment      | json      |

### reminders

Sync type availability: Full-refresh

| Field        | Type      |
| ------------ | --------- |
| id           | text      |
| creator      | text      |
| user         | text      |
| text         | text      |
| recurring    | boolean   |
| time         | timestamp |
| complete\_ts | timestamp |

### scheduled\_messages

Sync type availability: Full and incremental refresh

[Cursor](https://docs.erathos.com/platform/connections/sync-types#understanding-cursors): `post_at`

| Field         | Type      | Cursor |
| ------------- | --------- | ------ |
| id            | text      |        |
| channel\_id   | text      |        |
| text          | text      |        |
| post\_at      | timestamp | ✓      |
| date\_created | timestamp |        |
| thread\_ts    | timestamp |        |

### search\_messages

Sync type availability: Full-refresh

| Field         | Type      |
| ------------- | --------- |
| score         | float     |
| type          | text      |
| user          | text      |
| ts            | timestamp |
| text          | text      |
| permalink     | text      |
| channel       | json      |
| attachments   | json      |
| blocks        | json      |
| no\_reactions | boolean   |

### search\_files

Sync type availability: Full-refresh

| Field          | Type      |
| -------------- | --------- |
| score          | float     |
| id             | text      |
| created        | timestamp |
| timestamp      | timestamp |
| name           | text      |
| title          | text      |
| mimetype       | text      |
| filetype       | text      |
| pretty\_type   | text      |
| user           | text      |
| size           | integer   |
| mode           | text      |
| is\_external   | boolean   |
| external\_type | text      |
| is\_public     | boolean   |
| permalink      | text      |
| channels       | json      |
| groups         | json      |
| ims            | json      |

### search\_all

Sync type availability: Full-refresh

| Field         | Type      |
| ------------- | --------- |
| score         | float     |
| type          | text      |
| user          | text      |
| ts            | timestamp |
| text          | text      |
| permalink     | text      |
| channel       | json      |
| attachments   | json      |
| blocks        | json      |
| no\_reactions | boolean   |

### assistant\_search\_context

Sync type availability: Full-refresh

| Field    | Type |
| -------- | ---- |
| query    | text |
| messages | json |
| files    | json |
| channels | json |
| users    | json |

### list\_items

Sync type availability: Full-refresh

| Field         | Type      |
| ------------- | --------- |
| id            | text      |
| list\_id      | text      |
| date\_created | timestamp |
| created\_by   | text      |
| date\_updated | timestamp |
| updated\_by   | text      |
| archived      | boolean   |
| fields        | json      |

### workflows\_featured

Sync type availability: Full-refresh

| Field         | Type      |
| ------------- | --------- |
| id            | text      |
| name          | text      |
| date\_created | timestamp |
| date\_updated | timestamp |
| channel\_ids  | json      |

### functions\_workflows\_steps

Sync type availability: Full-refresh

| Field    | Type |
| -------- | ---- |
| step\_id | text |
| version  | text |
| inputs   | json |
| outputs  | json |

### dnd\_team\_info

Sync type availability: Full-refresh

| Field                | Type      |
| -------------------- | --------- |
| user\_id             | text      |
| dnd\_enabled         | boolean   |
| next\_dnd\_start\_ts | timestamp |
| next\_dnd\_end\_ts   | timestamp |

## Entity Relationships

```mermaid
erDiagram
    conversations ||--o{ conversation_members : "id = channel"
    conversations ||--o{ messages : "id = channel"
    conversations ||--o{ bookmarks : "id = channel"
    conversations ||--o{ pins : "id = channel"
    messages ||--o{ thread_replies : "ts = thread_ts"
    files ||--o{ file_comments : "id = file_id"
    usergroups ||--o{ usergroup_members : "id = usergroup_id"
    users ||--o{ users_get_presence : "id = user_id"
    users ||--o{ apps_activities : "id = user_id"
    users ||--o{ apps_event_authorizations : "id = user_id"
    users ||--o{ bookmarks : "id = user_id"
    users ||--o{ conversation_members : "id = user_id"
    users ||--o{ dnd_team_info : "id = user_id"
    users ||--o{ team_access_logs : "id = user_id"
    users ||--o{ team_billable_info : "id = user_id"
    users ||--o{ team_integration_logs : "id = user_id"
    users ||--o{ usergroup_members : "id = user_id"

    conversations { text id PK }
    bookmarks { text id PK }
    messages { timestamp ts PK }
    thread_replies { timestamp ts PK }
    pins { timestamp created PK }
    files { text id PK }
    file_comments { text id PK }
    usergroups { text id PK }
    users { text id PK }
```
