Skip to content

Slack credentials#

You can use these credentials to authenticate the following nodes:

Prerequisites#

  • Create a Slack account.
  • Create a Slack app. Refer to the Slack API Quickstart for more information.

Supported authentication methods#

  • API access token
  • OAuth2

Refer to Slack's API documentation for more information about the service.

Using API access token#

To configure this credential, you'll need:

  • An Access Token

To generate an access token, create a Slack app:

  1. Open your Slack API Apps page.
  2. Select Create New App > From scratch.
  3. Enter an App Name.
  4. Select the Workspace where you'll be developing your app.
  5. Select Create App.
  6. In Basic Information > Building Apps for Slack, select Add features and functionality.
  7. Select Permissions.
  8. In the Scopes section:

    • If you want your app to act on behalf of users who authorize the app, add the required scopes under the User Token Scopes section.
    • If you're building a bot, add the required scopes under the Bot Token Scopes section.

    Scopes

    Scopes determine what permissions an app has. Refer to Slack's Permission scopes documentation for a list of scopes.

  9. After you've added scopes, go up to the OAuth Tokens for Your Workspace section and select Install to Workspace. You must be a Slack workspace admin to complete this action.

  10. Select Allow.
  11. You'll return to the OAuth Tokens for your Workspace section, which now displays a Bot User OAuth Token.
  12. Copy that token and enter it into the n8n credential.

Refer to the Slack API Quickstart for more information.

Using OAuth2#

Note for n8n Cloud users

Cloud users don't need to provide connection details. Select Connect my account to connect through your browser.

If you need to configure OAuth2 from scratch, you'll need:

  • A Client ID
  • A Client Secret

To get both, create a Slack app:

  1. Open your Slack API Apps page.
  2. Select Create New App > From scratch.
  3. Enter an App Name.
  4. Select the Workspace where you'll be developing your app.
  5. Select Create App.
  6. In Basic Information, open the App Credentials section.
  7. Copy the Client ID and Client Secret. Paste these into the corresponding fields in n8n.
  8. In Basic Information > Building Apps for Slack, select Add features and functionality.
  9. Select Permissions.
  10. In the Redirect URLs section, select Add New Redirect URL.
  11. Copy the OAuth Callback URL from n8n and enter it as the new Redirect URL in Slack.
  12. Select Add.
  13. Select Save URLs.
  14. In the Scopes section:

    • If you want your app to act on behalf of users who authorize the app, add the required scopes under the User Token Scopes section.
    • If you're building a bot, add the required scopes under the Bot Token Scopes section.

    Scopes

    Scopes determine what permissions an app has. Refer to Slack's Permission scopes documentation for a list of scopes.

  15. After you've added scopes, go up to the OAuth Tokens for Your Workspace section and select Install to Workspace. You must be a Slack workspace admin to complete this action.

  16. Select Allow.
  17. At this point, you should be able select the OAuth button in your n8n credential to connect.

Refer to the Slack API Quickstart for more information. Refer to the Slack Installing with OAuth documentation for more details on the OAuth flow itself.