> For the complete documentation index, see [llms.txt](https://docs.scanner.dev/scanner/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.scanner.dev/scanner/using-scanner-complete-feature-reference/data-ingestion/sources/slack.md).

# Slack

This guide walks through how to set up Slack as a log source in Scanner Collect, using direct API integration with the [Slack Audit Logs API](https://api.slack.com/admins/audit-logs). Scanner will authenticate using [OAuth 2.0](https://docs.slack.dev/authentication/installing-with-oauth) to pull audit logs from Slack.

Slack audit logs capture security-relevant events across your Slack Enterprise organization, such as user logins, file downloads, channel creation, app installations, and changes to workspace settings. For a general overview of what audit logs are and how they can be used, see [Audit logs in Slack](https://slack.com/help/articles/360000394286-Audit-logs-in-Slack).

We'll assume that you want Scanner to both store the logs in S3 and index them for search and detection.

## Prerequisites

Before you begin, make sure you have:

* **A Slack Enterprise Grid organization.** Audit logs are only available on the Enterprise Grid plan.
* **Organization Owner permissions** in your Slack Enterprise Grid organization. Only organization owners can approve and install apps that access the Audit Logs API.
* Permissions in Scanner to create the integration

## Create a Collect Rule

{% stepper %}
{% step %}

### Bgin Setup

In the Scanner UI, go to the Collect tab.

* From the Overview page click the '+' icon in the upper right corner
* Select create new **Collect Rule**
* Choose **Slack**.
* Select the **Log Type**:
  * **Slack: Audit** Logs - captures security and compliance events from the Slack Audit Logs API
    {% endstep %}

{% step %}

### Configuration

* Set a **Display Name**, such as `my-org-slack-audit-logs-source`.
  {% endstep %}

{% step %}

### Authenticate with Slack

* If you've previously created a Slack connection for audit logs, select it from the list.
* Otherwise, select **New Slack Connection** to authenticate with Slack, allowing the Scanner Slack app to access your Slack organization.
  {% endstep %}

{% step %}

### Logs Destination

* Choose the S3 Bucket where the raw Slack audit logs should be stored.
* (Optional) Enter a Bucket Prefix to organize the data path in your bucket.
  {% endstep %}

{% step %}

### Review and Create

Review all configuration settings. Any errors and/or missing fields must be resolved before completion.
{% endstep %}
{% endstepper %}

## Create an Index Rule

With the Collect Rule created, Scanner will poll the Slack Audit Logs API every **5 minutes**, writing new events to your S3 bucket under the specified prefix.

Create an Index Rule to have Scanner index the logs for fast search and detections.

{% content-ref url="/pages/Gem9jwD4aqayN3OiChpN" %}
[Create an Index Rule](/scanner/using-scanner-complete-feature-reference/data-ingestion/create-an-index-rule.md)
{% endcontent-ref %}

### Slack Defaults

When you create the Index Rule from the Collect Rule, the following defaults are pre-populated:

* **Transformations**: Add Metadata, Parse JSON Columns, ECS Normalization: Slack
* **Timestamp Field**: `.date_create`


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.scanner.dev/scanner/using-scanner-complete-feature-reference/data-ingestion/sources/slack.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
