Skip to content

Slack 节点#

¥Slack node

使用 Slack 节点自动化 Slack 中的工作,并将 Slack 与其他应用集成。n8n 内置支持 Slack 的多种功能,包括创建、归档和关闭通道,获取用户和文件,以及删除消息。

¥Use the Slack node to automate work in Slack, and integrate Slack with other applications. n8n has built-in support for a wide range of Slack features, including creating, archiving, and closing channels, getting users and files, as well as deleting messages.

本页列出了 Slack 节点支持的操作列表以及更多资源的链接。

¥On this page, you'll find a list of operations the Slack node supports and links to more resources.

Credentials

请参阅 Slack 凭据 以了解有关设置身份验证的指导。

¥Refer to Slack credentials for guidance on setting up authentication.

操作#

¥Operations

  • 通道

¥Channel

  • 归档通道

    ¥Archive a channel.

  • 关闭私信或多人私信。

    ¥Close a direct message or multi-person direct message.

  • 创建一个基于公共或私有通道的对话。

    ¥Create a public or private channel-based conversation.

  • 获取通道信息

    ¥Get information about a channel.

  • 获取多个获取 Slack 中的通道列表

    ¥Get Many: Get a list of channels in Slack.

  • 历史记录:获取通道的消息和事件历史记录

    ¥History: Get a channel's history of messages and events.

  • 邀请用户加入通道。

    ¥Invite a user to a channel.

  • 加入现有通道。

    ¥Join an existing channel.

  • Kick:从通道中移除用户

    ¥Kick: Remove a user from a channel.

  • 离开通道。

    ¥Leave a channel.

  • 成员:列出通道成员。

    ¥Member: List the members of a channel.

  • 打开或恢复一条私信或多人私信。

    ¥Open or resume a direct message or multi-person direct message.

  • 重命名通道。

    ¥Rename a channel.

  • 回复:获取发布到通道中的消息线程

    ¥Replies: Get a thread of messages posted to a channel.

  • 设置通道的用途。

    ¥Sets purpose of a channel.

  • 设置通道主题。

    ¥Sets topic of a channel.

  • 取消归档通道。

    ¥Unarchive a channel.

  • 文件

¥File

  • 获取文件。

    ¥Get a file.

  • 获取多个获取并筛选团队文件。

    ¥Get Many: Get and filter team files.

  • 上传:创建或上传现有文件。

    ¥Upload: Create or upload an existing file.

  • 消息

¥Message

  • 删除消息

    ¥Delete a message

  • 获取永久链接获取消息的永久链接

    ¥Get permalink: Get a message's permalink.

  • 搜索消息

    ¥Search for messages

  • 发送消息

    ¥Send a message

  • 发送并等待批准:发送消息后,等待收件人批准后再继续

    ¥Send and Wait for Approval: Send a message and wait for approval from the recipient before continuing.

  • 更新消息

    ¥Update a message

  • 回复

¥Reaction

  • 对消息添加反应。

    ¥Add a reaction to a message.

  • 获取消息的反应

    ¥Get a message's reactions.

  • 从消息中移除回复

    ¥Remove a reaction from a message.

  • 星形

¥Star

  • 为项目添加星标。

    ¥Add a star to an item.

  • 删除项目的星标。

    ¥Delete a star from an item.

  • 获取多个获取已认证用户的星标列表

    ¥Get Many: Get a list of an authenticated user's stars.

  • 用户

¥User

  • 获取用户信息

    ¥Get information about a user.

  • 获取多个获取用户列表。

    ¥Get Many: Get a list of users.

  • 获取用户个人资料

    ¥Get User's Profile.

  • 获取用户状态。

    ¥Get User's Status.

  • 更新用户资料。

    ¥Update User's Profile.

  • 用户组

¥User Group

  • 创建用户组

    ¥Create a user group.

  • 禁用用户组。

    ¥Disable a user group.

  • 启用用户组。

    ¥Enable a user group.

  • 获取多个获取用户组列表。

    ¥Get Many: Get a list of user groups.

  • 更新用户组

    ¥Update a user group.

模板和示例#

¥Templates and examples

Template widget placeholder.

相关资源#

¥Related resources

有关服务的更多信息,请参阅 Slack 文档

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

必填范围#

¥Required scopes

Slack 凭据 创建 Slack 应用后,必须为该节点添加相应的权限范围。从 范围 | Slack 凭据 页面中列出的范围开始。

¥Once you create a Slack app for your Slack credentials, you must add the appropriate scopes to your Slack app for this node to work. Start with the scopes listed in the Scopes | Slack credentials page.

如果以上信息不足,请使用下表查找你要使用的资源和操作,然后点击链接访问 Slack 的 API 文档以查找正确的范围。

¥If those aren't enough, use the table below to look up the resource and operation you want to use, then follow the link to Slack's API documentation to find the correct scopes.

资源 操作 Slack API 方法
通道 归档 conversations.archive
通道 关闭 conversations.close
通道 创建 conversations.create
通道 获取 conversations.info
通道 获取多个 conversations.list
通道 历史记录 conversations.history
通道 邀请 conversations.invite
通道 加入 conversations.join
通道 Kick conversations.kick
通道 离开 conversations.leave
通道 成员 conversations.members
通道 打开 conversations.open
通道 重命名 conversations.rename
通道 回复 conversations.replies
通道 设置用途 conversations.setPurpose
通道 设置主题 conversations.setTopic
通道 取消归档 conversations.unarchive
文件 获取 files.info
文件 获取多个 files.list
文件 上传 files.upload
消息 删除 chat.delete
消息 获取永久链接 chat.getPermalink
消息 搜索 search.messages
消息 Send chat.postMessage
消息 发送并等待批准 chat.postMessage
消息 更新 chat.update
回复 添加 reactions.add
回复 获取 reactions.get
回复 移除 reactions.remove
星形 添加 stars.add
星形 删除 stars.remove
星形 获取多个 stars.list
用户 获取 users.info
用户 获取多个 users.list
用户 获取用户个人资料 users.profile.get
用户 获取用户状态 users.getPresence
用户 更新用户资料 users.profile.set
用户组 创建 usergroups.create
用户组 禁用 usergroups.disable
用户组 启用 usergroups.enable
用户组 获取多个 usergroups.list
用户组 更新 usergroups.update

What to do if your operation isn't supported#

If this node doesn't support the operation you want to do, you can use the HTTP Request node to call the service's API.

You can use the credential you created for this service in the HTTP Request node:

  1. In the HTTP Request node, select Authentication > Predefined Credential Type.
  2. Select the service you want to connect to.
  3. Select your credential.

Refer to Custom API operations for more information.