The tap-slack extractor pulls data from the Slack API.

Getting Started

Prerequisites

If you haven’t already, follow the initial steps of the Getting Started guide:

  1. Install Meltano
  2. Create your Meltano project

Installation and configuration

Using the Command Line Interface

  1. Add the tap-slack extractor to your project using meltano add:

     meltano add extractor tap-slack
    
  2. Configure the settings below using meltano config.

Using Meltano UI

  1. Start Meltano UI using meltano ui:

     meltano ui
    
  2. Open the Extractors interface at http://localhost:5000/extractors.
  3. Click the “Add to project” button for “Slack”.
  4. Configure the settings below in the “Configuration” interface that opens automatically.

Next steps

Follow the remaining steps of the Getting Started guide:

  1. Select entities and attributes to extract
  2. Add a loader to send data to a destination
  3. Run a data integration (EL) pipeline

If you run into any issues, learn how to get help.

Settings

tap-slack requires the configuration of the following setting:

This and other supported settings are documented below. To quickly find the setting you’re looking for, use the Table of Contents in the sidebar.

Minimal configuration

A minimal configuration of tap-slack in your meltano.yml project file will look like this:

plugins:
  extractors:
  - name: tap-slack
    variant: mashey
      start_date: '2020-10-01T00:00:00Z'

Sensitive values are most appropriately stored in the environment or your project’s .env file:

export TAP_SLACK_API_TOKEN=my_api_token

API Token

Your Slack API Token. To obtain a token for a single workspace you will need to create a Slack App in your workspace and assigning it the relevant scopes. The minimum required scopes for the tap are:

  • channels:history
  • channels:join
  • channels:read
  • files:read
  • groups:read
  • links:read
  • reactions:read
  • remote_files:read
  • remote_files:write
  • team:read
  • usergroups:read
  • users.profile:read
  • users:read

How to use

Manage this setting using Meltano UI, meltano config, or an environment variable:

meltano config tap-slack set api_token <api_token>

export TAP_SLACK_API_TOKEN=<api_token>

Channels

Optionally specify specific channels to sync. By default the tap will sync all channels it has been invited to, but this can be overriden using this configuration. Note that the values need to be channel ID, not the name, as recommended by the Slack API. To get the ID for a channel, either use the Slack API or find it in the URL.

How to use

Manage this setting using Meltano UI, meltano config, or an environment variable:

meltano config tap-slack set channels '["<channelid>", ...]'

export TAP_SLACK_CHANNELS='["<channelid>", ...]'

Private Channels

Specifies whether to sync private channels or not. Default is true.

How to use

Manage this setting using Meltano UI, meltano config, or an environment variable:

meltano config tap-slack set private_channels false

export TAP_SLACK_PRIVATE_CHANNELS=false

Public Channels

Specifies whether to have the tap auto-join all public channels in your ogranziation. Default is false.

How to use

Manage this setting using Meltano UI, meltano config, or an environment variable:

meltano config tap-slack set join_public_channels true

export TAP_SLACK_JOIN_PUBLIC_CHANNELS=true

Archived Channels

Specifies whether the tap will sync archived channels or not. Note that a bot cannot join an archived channel, so unless the bot was added to the channel prior to it being archived it will not be able to sync the data from that channel. Default is false.

How to use

Manage this setting using Meltano UI, meltano config, or an environment variable:

meltano config tap-slack set archived_channels true

export TAP_SLACK_ARCHIVED_CHANNELS=true

Date Window Size

Specifies the window size for syncing certain streams (messages, files, threads). The default is 7 days.

How to use

Manage this setting using Meltano UI, meltano config, or an environment variable:

meltano config tap-slack set date_window_size <integer>

export TAP_SLACK_DATE_WINDOW_SIZE=<integer>