Print

Import Slack Data to Google Sheets

In this guide, we’ll walk through how to pull data from the Slack API directly into Google Sheets, using the API Connector add-on for Sheets.

We'll first get an API token from Slack, and then set up a request to pull in channel data from Slack to your spreadsheet.

Contents

Before You Begin

Click here to install the API Connector add-on from the Google Marketplace.

Part 1: Get Your Slack API Token

  1. Navigate to https://api.slack.com/ and click Your Apps > Create your first app
    slack-yourapps
  2. On the Apps page, click Create an App. You'll be asked whether to create your app from scratch or from a manifest file; we'll create it from scratch.
    slack-createapp
  3. Enter an app name and select a workspace. Click Create App
    slack-create
  4. Now scroll down the page and click Permissions. This will open the OAuth & Permissions page.
    slack-permissions
  5. Scroll down to Bot Token Scopes and select the scopes you'd like to have access to (you can change this later).
    slack-scopes
  6. Now scroll up and click Install to Workspace.
    slack-install
  7. You'll be prompted to approve the scopes you selected above. Click Allow.
    slack-approve
  8. You should now see your token in the Bot User OAuth Token section.
    slack-token
  9. Congrats, you have your token! Keep it handy as we'll need it shortly. You're now ready to access the Slack Web API.

Part 2: Pull Slack API Data into Sheets

For this example, we'll get a list of channels in your Slack workspace. Substitute in your own token where it says your_token.

  1. Open up Google Sheets and click Extensions > API Connector > Open > Create request.
  2. In the request form enter the following:
    • ApplicationCustom
    • MethodGET
    • Request URLhttps://slack.com/api/conversations.list
    • Headers:
      • AuthorizationBearer your_token
  3. Create a new tab and click Set current to use that tab as your data destination.
  4. Name your request and click Run. A moment later you’ll see a list of channels populate your sheet.
    slack-response

The documentation lists over a hundred methods that can be used to search conversations, send messages, retrieve information about the channel, and more.

Part 3: API Documentation

Official API documentation: https://api.slack.com/web

Leave a Comment

Jump To