当前位置: 首页 > news >正文

n8n Slack credentials(n8n slack凭证配置步骤)(API access token)

https://docs.n8n.io/integrations/builtin/credentials/slack/

https://api.slack.com/apis

文章目录

  • Slack credentials
    • Supported authentication methods
    • Related resources
    • Using API access token(==Is verified==)❤
      • 1. Open your [Slack API Apps](https://api.slack.com/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**. The app details open.
      • 6. In the left menu under **Features**, select **OAuth & Permissions**.
      • 7. In the **Scopes** section, select appropriate scopes for your app. Refer to [Scopes](https://docs.n8n.io/integrations/builtin/credentials/slack/#scopes) for a list of recommended scopes.
      • 8. After you've added scopes, go up to the **OAuth Tokens** section and select **Install to Workspace**. You must be a Slack workspace admin to complete this action.
      • 9. Select **Allow**.
      • 10. Copy the **Bot User OAuth Token** and enter it as the **Access Token** in your n8n credential.
      • 11. If you're using this credential for the [Slack Trigger](https://docs.n8n.io//integrations/builtin/trigger-nodes/n8n-nodes-base.slacktrigger.md), follow the steps in [Slack Trigger configuration](#slack-trigger-configuration) to finish setting up your app.
      • Refer to the Slack API [Quickstart](https://api.slack.com/quickstart) for more information.
      • Slack Trigger configuration
    • Using OAuth2
    • Scopes
    • Common issues
      • Token expired

Slack credentials

You can use these credentials to authenticate the following nodes:

  • Slack
  • Slack Trigger

Supported authentication methods

  • API access token:
    • Required for the Slack Trigger node.
    • Works with the Slack node, but not recommended.
  • OAuth2:
    • Recommended method for the Slack node.
    • Doesn’t work with the Slack Trigger node.

Related resources

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

Using API access token(Is verified)❤

To configure this credential, you’ll need a Slack account and:

  • 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.

see above.

5. Select Create App. The app details open.

see above.

6. In the left menu under Features, select OAuth & Permissions.

在这里插入图片描述

7. In the Scopes section, select appropriate scopes for your app. Refer to Scopes for a list of recommended scopes.

在这里插入图片描述
在这里插入图片描述

Add an OAuth Scope in User Token Scopes.
在这里插入图片描述

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

在这里插入图片描述

9. Select Allow.

在这里插入图片描述

10. Copy the Bot User OAuth Token and enter it as the Access Token in your n8n credential.

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

在这里插入图片描述

11. If you’re using this credential for the Slack Trigger, follow the steps in Slack Trigger configuration to finish setting up your app.

Refer to the Slack API Quickstart for more information.

Slack Trigger configuration

To use your Slack app with the Slack Trigger node:

  1. Go to Your Apps in Slack and select the app you want to use.

  2. Go to Features > Event Subscriptions.

  3. Turn on the Enable Events control.

  4. In n8n, copy the Webhook URL and enter it as the Request URL in your Slack app.

    /// note | Request URL
    Slack only allows one request URL per app. If you want to test your workflow, you’ll need to do one of the following:

    • Test with your Test URL first, then change your Slack app to use the Production URL once you’ve verified everything’s working
    • Use the Production URL with execution logging.
      ///
  5. Once verified, select the bot events to subscribe to. Use the Trigger on field in n8n to filter these requests.

    • To use an event not in the list, add it as a bot event and select Any Event in the n8n node.

Refer to Quickstart | Configuring the app for event listening for more information.

n8n recommends enabling request signature verification for your Slack Trigger for additional security:

  1. Go to Your Apps in Slack and select the app you want to use.
  2. Go to Settings > Basic Information.
  3. Copy the value of Signing.
  4. In n8n, Paste this value into the Signature Secret field for the credential.

Using OAuth2

–8<-- “_snippets/integrations/builtin/credentials/cloud-oauth-button.md”

If you’re self-hosting n8n and need to configure OAuth2 from scratch, you’ll need a Slack account and:

  • 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. The app details open.
  6. In Settings > 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 the left menu under Features, select OAuth & Permissions.
  9. In the Redirect URLs section, select Add New Redirect URL.
  10. Copy the OAuth Callback URL from n8n and enter it as the new Redirect URL in Slack.
  11. Select Add.
  12. Select Save URLs.
  13. In the Scopes section, select appropriate scopes for your app. Refer to Scopes for a list of scopes.
  14. After you’ve added scopes, go up to the OAuth Tokens section and select Install to Workspace. You must be a Slack workspace admin to complete this action.
  15. Select Allow.
  16. At this point, you should be able to 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.

Scopes

Scopes determine what permissions an app has.

  • 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.

Here’s the list of scopes the OAuth credential requires, which are a good starting point:

Scope nameNotes
channels:read
channels:writeNot available as a bot token scope
chat:write
files:read
files:write
groups:read
im:read
mpim:read
reactions:read
reactions:write
stars:readNot available as a bot token scope
stars:writeNot available as a bot token scope
usergroups:read
usergroups:write
users.profile:read
users.profile:writeNot available as a bot token scope
users:read

Common issues

Token expired

–8<-- “_snippets/integrations/builtin/credentials/slack/token-rotation.md”

http://www.lryc.cn/news/612355.html

相关文章:

  • Datawhale AI 夏令营:RAG多模态检索(Baseline解读)
  • 解决启动docker报错Cannot connect to the Docker daemon问题
  • Windows 如何上架 iOS 应用?签名上传全流程 + 工具推荐
  • 使用CRC32爆破ZIP压缩包内小文件内容的技术解析
  • app-3
  • Python面试题及详细答案150道(01-15) -- 基础语法篇
  • 译 | 在 Python 中从头开始构建 Qwen-3 MoE
  • 三轴云台之机械结构篇
  • ubuntu server 工业环境部署手册[2025-08-06]
  • 查看ubuntu server 的基本信息
  • Node.js从入门到精通完整指南
  • 服务器重启后mysql5.7启动失败问题
  • [激光原理与应用-163]:光机械件 - 光机械件的工程技术难点
  • .Net下载共享文件夹中的文件
  • NCD57080CDR2G 安森美onsemi 通用驱动器, SOIC, 8针, 20V电源, 8 A输出NCD57080CDR2电流隔离式栅极驱动器
  • C++11之智能指针
  • harmonyOS学习 - rcp请求
  • 文字转语音tts
  • 鹧鸪云:光伏电站的“智慧中枢”,精准调控逆变器
  • OpenCV校准双目相机并测量距离
  • 10.MTK充电之mt6358-gauge驱动
  • Linux发行版分类与Centos替代品
  • 媒体资产管理系统和OCR文字识别的结合
  • 笔试——Day30
  • 简单介绍cgroups以及在K8s中的应用
  • 小程序中,给一段富文本字符串文案特殊内容加样式监听点击事件
  • 无人机遥控器舵量技术解析
  • cad c#二次开发 图层封装 获取当前层
  • 无人机遥控器波特率技术解析
  • 基于AI的自动驾驶汽车(AI-AV)网络安全威胁缓解框架