> For the complete documentation index, see [llms.txt](https://docs.coupler.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coupler.io/sources/category/project-management/slack.md).

# Slack

Export Slack messages, channels, and user profiles to Google Sheets, Excel, or BigQuery with Coupler.io for auditing and team activity analysis.

Slack is a team messaging platform used for real-time communication, project collaboration, and internal announcements. With Coupler.io, you can pull Slack data — messages, channels, and users — into spreadsheets, databases, or AI tools for analysis and reporting.

## Why connect Slack to Coupler.io?

* **Audit and archive messages** by exporting channel conversations to Google Sheets, Excel, or BigQuery on a schedule.
* **Track team activity** by analyzing message volume, user participation, and channel growth over time.
* **Combine Slack data with other sources** using Join or Append transformations — for example, match users to HR data or append messages from multiple channels.
* **Feed Slack data to AI tools** like ChatGPT, Claude, or Gemini to summarize conversations, classify messages, or surface insights.

## Prerequisites

* A Slack account with access to the workspace you want to export.
* A **Slack API token** (User OAuth Token or Bot Token) with the appropriate scopes: `channels:read`, `channels:history`, `users:read`, and `search:read` for message search.
* Admin or member access to the channels you want to pull data from.

{% hint style="warning" %}
Slack's `search:read` scope is required for the Messages entity. Bot tokens do not support `search:read` — you need a **User token** to export messages.
{% endhint %}

## Quick start

{% hint style="success" %}
Start with the **Messages** entity and a simple search query like `in:#general` to validate your connection before setting up more complex exports.
{% endhint %}

{% stepper %}
{% step %}
**Create a new data flow in Coupler.io.** Log in to your Coupler.io account, go to the Data Flows section, and click **Add data flow**. Choose Slack as your source.
{% endstep %}

{% step %}
**Enter your Slack API token.** In the source settings, paste your Slack User OAuth Token into the API token field. You can generate this token in your Slack app configuration at api.slack.com under **OAuth & Permissions**.
{% endstep %}

{% step %}
**Select an entity.** Choose one of the available entities: Messages, Channels, or Users.
{% endstep %}

{% step %}
**Set a search query (Messages only).** If you selected Messages, enter a search query to filter which messages to pull. Use Slack search modifiers like `in:#channel-name` or `from:@username` to narrow results. This field is required for the Messages entity.
{% endstep %}

{% step %}
**Choose your destination.** Select where you want the data to go — Google Sheets, Excel, BigQuery, Looker Studio, or an AI destination like ChatGPT or Claude.
{% endstep %}

{% step %}
**Run your data flow.** Click **Run** to execute the data flow manually. Review the results in your destination to confirm the data looks correct.
{% endstep %}
{% endstepper %}

## Available entities

| Entity   | Description                                                             |
| -------- | ----------------------------------------------------------------------- |
| Messages | Exported messages matching a Slack search query (requires a User token) |
| Channels | List of public channels in your workspace, including metadata           |
| Users    | List of workspace members with profile and account details              |

## Slack data overview

Coupler.io pulls three types of data from Slack: messages from channels or searches, channel metadata, and user profiles. Here's what's available in each entity.

## Entities

| Entity   | What it contains                                                                         |
| -------- | ---------------------------------------------------------------------------------------- |
| Messages | Text content, timestamps, authors, and reactions for messages matching your search query |
| Channels | Channel names, IDs, member counts, topics, and creation dates                            |
| Users    | User profiles including name, email, role, timezone, and status                          |

## Messages

#### Message fields

| Field         | Description                                        |
| ------------- | -------------------------------------------------- |
| `ts`          | Timestamp of the message (Unix format)             |
| `text`        | Full text content of the message                   |
| `user`        | User ID of the message author                      |
| `username`    | Display name of the author                         |
| `channel`     | Channel where the message was posted               |
| `type`        | Message type (e.g., `message`)                     |
| `permalink`   | Direct link to the message in Slack                |
| `reactions`   | Emoji reactions attached to the message            |
| `reply_count` | Number of thread replies                           |
| `attachments` | Metadata about file attachments (not file content) |

{% hint style="warning" %}
Coupler.io exports attachment **metadata** (file name, type, URL) but not the actual file content or images. Thread replies are not automatically included — use a focused search query to capture threaded messages.
{% endhint %}

## Channels

#### Channel fields

| Field         | Description                     |
| ------------- | ------------------------------- |
| `id`          | Unique channel ID               |
| `name`        | Channel name                    |
| `is_private`  | Whether the channel is private  |
| `num_members` | Current member count            |
| `topic`       | Channel topic text              |
| `purpose`     | Channel purpose/description     |
| `created`     | Channel creation timestamp      |
| `is_archived` | Whether the channel is archived |

## Users

#### User fields

| Field         | Description                              |
| ------------- | ---------------------------------------- |
| `id`          | Unique user ID                           |
| `name`        | Slack username (handle)                  |
| `real_name`   | Full display name                        |
| `email`       | User email address                       |
| `is_admin`    | Whether the user is a workspace admin    |
| `is_bot`      | Whether the user is a bot account        |
| `tz`          | User's timezone                          |
| `title`       | Job title from profile                   |
| `status_text` | Current status message                   |
| `deleted`     | Whether the account has been deactivated |

## Common field combinations

* **Message activity dashboard:** `channel`, `username`, `ts`, `text`, `reply_count`, `reactions`
* **Channel health report:** `name`, `num_members`, `topic`, `is_archived`, `created`
* **Team directory:** `real_name`, `email`, `title`, `tz`, `is_admin`, `is_bot`
* **Bot vs. human breakdown:** `is_bot`, `name`, `deleted` from the Users entity

## Use cases by role

{% tabs %}
{% tab title="Team leads" %}

* Export messages from project channels to review discussion history or create searchable archives.
* Track reply counts and reactions to identify high-engagement messages or team blockers.
* Use the Append transformation to combine messages from multiple channels into a single report.
  {% endtab %}

{% tab title="HR & People Ops" %}

* Pull the Users entity to maintain an up-to-date team directory in Google Sheets.
* Filter out bot accounts using the `is_bot` field to get accurate headcount numbers.
* Join Users data with HR system exports to cross-reference Slack handles with employee records.
  {% endtab %}

{% tab title="Analysts" %}

* Use message timestamps and channel data to analyze communication volume over time.
* Send Slack conversation exports to ChatGPT or Claude for AI-powered summarization or sentiment tagging.
* Aggregate message counts by channel or user to build activity dashboards in Looker Studio or BigQuery.
  {% endtab %}
  {% endtabs %}

## Platform-specific notes

* The Messages entity requires a **User OAuth token** — bot tokens do not support `search:read` and will not return message data.
* Slack's search API returns results in relevance order by default; use modifiers like `before:` and `after:` with the date picker to define time ranges.
* Private channel messages are only accessible if the token owner is a member of that channel.
* Bot-posted messages may not appear in search results depending on how the bot posted them (e.g., using `chat.postMessage` vs. webhooks).
* The `attachments` field contains link and metadata information — Coupler.io does not download or store actual files or images from Slack.

## Slack common issues

### Connection issues

<details>

<summary>My Slack API token is not being accepted</summary>

Double-check that you're using a **User OAuth Token** (starts with `xoxp-`), not a Bot Token (`xoxb-`). Bot tokens lack the `search:read` scope required for the Messages entity. Generate a new user token at api.slack.com under **OAuth & Permissions** and make sure the following scopes are added: `channels:read`, `channels:history`, `users:read`, and `search:read`.

</details>

<details>

<summary>The data flow connects but returns no data</summary>

For the Messages entity, this usually means your search query returned no results. Test the same query directly in Slack's search bar to verify it returns messages. Also confirm your token has access to the channels referenced in the query.

</details>

### Missing data

<details>

<summary>Bot messages are missing from my export</summary>

Slack's search API does not reliably index messages posted by bots, especially those sent via incoming webhooks or the `postMessage` API without a linked user identity. This is a Slack platform limitation. If you need bot messages, consider exporting the full channel history using a bot token with `channels:history` scope — though this requires a different approach than the search-based Messages entity.

</details>

<details>

<summary>Thread replies are not showing up</summary>

Thread replies are separate messages in Slack's data model and may not surface in a general channel search. Try a more targeted search query using the `in:#channel` modifier combined with keywords from the thread. Full thread export is not natively supported by Slack's search API.

</details>

<details>

<summary>I can't see messages from private channels</summary>

Private channel messages are only accessible if the user whose token you're using is a **member of that channel**. Ask a channel member to generate the token, or have a workspace admin add the token owner to the channel.

</details>

<details>

<summary>File attachments and images are not in my export</summary>

Coupler.io exports attachment **metadata** — the file name, type, and Slack-hosted URL — but does not download or transfer the actual files or images. This is by design and reflects how Slack's API exposes attachment data.

</details>

### Permission errors

<details>

<summary>I get a "missing_scope" error</summary>

This means your token is missing one or more required OAuth scopes. Go to your Slack app settings at api.slack.com, navigate to **OAuth & Permissions**, and add the missing scope. Then reinstall the app to your workspace to generate a new token with the updated permissions.

</details>

### Data discrepancies

<details>

<summary>Message counts in Coupler.io don't match what I see in Slack</summary>

Slack's search API has a result limit and returns messages in relevance order, not strict chronological order. Very large result sets may be paginated or capped. To reduce discrepancies, narrow your search query with specific date ranges using `before:` and `after:` modifiers and break large exports into smaller time windows.

</details>

<details>

<summary>User list includes deactivated accounts</summary>

The Users entity includes all workspace members, including deactivated ones. You can identify deactivated accounts using the `deleted` field — filter your destination sheet to show only rows where `deleted` is `false`.

</details>

### Rate limits

<details>

<summary>The data flow is slow or times out on large workspaces</summary>

Slack applies rate limits on its search and users APIs (typically Tier 2: \~20 requests/minute). For large workspaces or broad search queries, exports may take longer. Narrow your search query to a specific channel and date range to reduce the volume of requests and speed up the export.

</details>

## Slack FAQ

<details>

<summary>Which Slack token type should I use — User or Bot?</summary>

Use a **User OAuth Token** (starts with `xoxp-`). The Messages entity relies on Slack's search API, which requires the `search:read` scope — and that scope is only available to user tokens, not bot tokens. For Channels and Users, a bot token with the right scopes would technically work, but using a user token keeps things consistent across all three entities.

</details>

<details>

<summary>Can I export messages from private channels?</summary>

Yes, but only if the user whose token you're using is a **member of that private channel**. If your token belongs to someone outside the channel, Slack won't return those messages. Ask a channel member to generate the token or have an admin add the token owner to the channel first.

</details>

<details>

<summary>Why are bot-posted messages missing from my export?</summary>

Slack's search API doesn't reliably index messages posted by bots, particularly those sent via webhooks or automated integrations. This is a Slack platform limitation, not a Coupler.io issue. Currently, there's no workaround within the search-based Messages entity — bot messages may simply not appear in search results.

</details>

<details>

<summary>Can I export files and images shared in Slack?</summary>

Coupler.io exports attachment **metadata** — the file name, type, and Slack-hosted URL — but does not download or transfer the actual files or images. If you need the files themselves, you'd need to access them directly via the URLs provided in the export using Slack's file download API.

</details>

<details>

<summary>How do I export thread replies?</summary>

Thread replies are separate messages in Slack's data model and may not surface in standard channel search results. Try using a targeted search query with keywords from the thread combined with the `in:#channel` modifier. Full thread-level export is not directly supported by Slack's search API at this time.

</details>

<details>

<summary>Can I count messages per day or per channel automatically?</summary>

Yes — export your messages to Google Sheets or BigQuery, then use the Aggregate transformation in Coupler.io to group by channel or date and count message rows. You can also use Looker Studio or a pivot table in Sheets to visualize message volume over time.

</details>

<details>

<summary>Can I combine messages from multiple Slack workspaces?</summary>

Yes. Create a separate data source for each workspace (each with its own API token), then use the **Append** transformation in your data flow to merge them into a single output. Add a workspace label to each source so you can distinguish records in your destination.

</details>

<details>

<summary>Can I transfer Slack messages to another chat tool like Google Chat?</summary>

Coupler.io exports Slack data to destinations like Google Sheets, BigQuery, or AI tools — it doesn't write data back into chat platforms. If you need to migrate messages to Google Chat or another tool, you'd need a dedicated migration service for that purpose.

</details>

<details>

<summary>How do I filter out deactivated users from the Users export?</summary>

The Users entity includes deactivated accounts with a `deleted` field set to `true`. In your destination (e.g., Google Sheets), filter the `deleted` column to show only `false` values. You can also use the Aggregate transformation to separate active and inactive users before sending data to your destination.

</details>

{% hint style="info" %}
For details on what fields are available in each entity, see the [Data Overview](#slack-data-overview) article. If your export is returning unexpected results or missing data, check [Common Issues](#slack-common-issues) for solutions.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.coupler.io/sources/category/project-management/slack.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
