Extras
Supplemental Slack info for you and your team.
Slack Guides
Tips and tools for beginners and experts alike.
Slack Enterprise Grid
Get familiar with Slack Enterprise Grid for large organizations.
Changelog
If you're curious about what's new in Slack — and what's changed — you're in the right place.
Slack Certification
Develop your skills and prepare to become Slack Certified!
Getting Started
Launching a new team or joining one for the first time?
Our easy-to-read guides help your team work better, together, from day one.
Getting More Out of Slack
Ready to level up? Browse our time-saving tricks and practical tips for
making Slack work for you.
Department Playbooks
All kinds of teams thrive with Slack — take a look at our department-specific guides.
More coming soon!
Using Slack
Learn how Slack works, from top to bottom!
Workspace Administration
Want to learn more about setting up your team? Look no further!
Getting Started
Welcome to Slack! We're so glad you're here. Let's get started!
Your Profile and Preferences
Adjust your profile and preferences to make Slack work just for you!
Add Tools to Your Workspace
Simplify your daily work with apps and tools.
Tips, tricks, & More
Tips and tools for beginners and experts alike.
Next
Previous
Next Video
Previous Video
Actions, activity, access logs, accessibility, add, add an app, add-in, add-on, Add members, add on, Add to Slack, administrators, all passwords, analytics, android, announcement, announcements, App Directory, app icon, Apple Watch, approving apps, archive, Asana, Atlassian, Automation apps, badge, billing details, billing, Bitbucket, bot user, box, browse, Calendar, calls, Calls !pobeta!pc, cancel, changes, channels, channel instantly, channel management, channel notification, channel suggestions, claim domains, close, company culture, compliance exports, compose, computers, conversations, convert, connect, connected accounts, connection, connecting, copy messages, create, customization, customize, custom SAML, custom, customer support teams, dark mode, data exports, data security, deactivate, default channels, delete, deletion, deploy slack, desktop, direct messages, directory, disable, discover and join, Discovery APIs, display name, DMs, Do Not Disturb, domain, domains, downgrade, dropbox, duplicate accounts, edit, editing, education, email address, email, emoji, emoticons, Enterprise Grid, Enterprise Key Management, Enterprise Mobility Management, executives, export, failed payments, Fair Billing, faqs, features, finding, format, formatting, framework for apps, free trials, general, getting started, giphy, github integration, github organization, github, glossary, Gmail add-on, google apps, google calendar, google drive, guests, highlights, hipchat, human resources, IFTTT, import, Incoming WebHooks, integrations, ios, invite, invited, IT teams, JIRA, join, Keep up, keyboard layout, keyboard shortcuts, Keychain Access, keyword notifications, language, languages, leave, link previews, loading, limits, links, linux, mac, manage a workspace, manage apps, manage members, marketing, mention, merge, message actions, messages are displayed, message display, microsoft products, mobile, mobile push, move channels, moving workspaces, multiple, mute, name, names, noise, nonprofits, notify, OneDrive, onboard, Outlook Calendar, owners, password, payment, payments, pending, permissions, phones, pin, plan, plans, plus plan, polls, posts, privacy policies, prioritize tasks, private, private channel, private notes and files, project management, public channel, purpose, quick start guide, Quick Switcher, quote, reactivate, read, recruitment, referrer information, reminder, remove, rename, retention, Request a new workspace, role, roles, RSS, sales, Salesforce, SAML, SCIM, SCIM provisioning, screen reader, search, send, session duration, share messages, share, shared channel, shared channels, sidebar, sign in, sign out, signup mode, single sign-on, Slack Day, Slack for Teams, Slack notifications, Save notes and files, Service Level Agreements, ServiceNow, sign up, slack status, slackbot, slash commands, snippet, snooze, software developers, star, statistics, Stride, sync, tablets, tax, threads, time zone, tips, to-do lists, topic, triage channels, Terms of Service, transfer ownership, Transport Layer Security, Trello, troubleshoot, trouble receiving, tour, twitter, two-factor authentication, unread messages, updates, upgrade, upload, users, username, user groups, URL, vacation, Vendor and remittance, video, voice call, voice, what is, what's important, whitelist, whitelisting, windows phone, windows, Workflow Builder, workflows, working in, workspace apps, workspace creation requests, workspace discovery, work hours, workspace's settings, wunderlist, your actions, Zapier, zoom
Slack is experiencing some connectivity issues — please stand by.
Check
Status
构建工作流程:建立在 Slack 外部启动的工作流程
通过 webhook ,你可以从 Slack 外部启动工作流程 ,并使用自定义变量向 Slack 发布包含外部服务信息的消息。
开始使用须知
熟悉如何使用命令行或其他工具来发送 HTTP 申请。
了解 incoming webhook。如需获取指导,请阅读关于 Slack API 的文档 ,或向你团队中的开发人员寻求帮助。
注意: 拥有者和管理员可以限制能够使用 webhook 建立工作流程的人员 。如果你在工作流程构建器中看不到此选项,请向拥有者或管理员 求助。
工作流程设置
Webhook 工作流程基础知识
选择使用 webhook 启动工作流程 时,你将配置 webhook,以便在第三方应用或服务向你的网址发送网络请求时启动工作流程。例如,你可以创建这种工作流程:在网站出现问题后在特定频道中发布消息,以便工程团队检查相应故障。
配置你的 webhook
你用来创建和配置 webhook 的外部服务必须允许你在某些事件发生时向 Slack 发出 HTTP POST 请求。你的工作流程一旦发布,Slack 将为其生成唯一的请求网址,你可以配置 webhook 以通过 HTTP 请求主体将信息传递至 Slack。你的 webhook 发送至 Slack 的任何数据都可以通过创建变量,以供添加到工作流程中的步骤引用。
小窍门: 如果你不确定如何配置你的 webhook,我们建议你向团队中的开发人员寻求帮助,或参考由所用服务提供的支持文档,如 Postman 或 Zapier 。
创建自定义变量
你可以添加最多 20 个变量,以从另一项服务将数据传递给 Slack,并在添加到你的工作流程的 步骤 中包含特定于 Slack 的信息(例如显示名 或电子邮件地址)。
要创建自定义变量,你可以通过选择以下数据类型之一将键值对添加到工作流程构建器中的 webhook 配置:频道 ID、用户 ID、用户电子邮件或文本。添加变量后,你将看到 HTTP 正文的预览。确保正文中的值匹配你使用 webhook 连接到 Slack 的服务中的 JSON 输出。请注意,工作流程变量中目前还不能使用嵌套的 JSON 结构。
在下面的示例中,如果用户、严重程度和事件说明没有与你的 webhook 请求一起发送,工作流程就会失败。
获取你的网络请求网址
复制网络请求网址后,你可以将其添加到 webhook,以确保其将你的 HTTP POST 发送到正确的对话。申请网址均以 https://hooks.slack.com/triggers 作为开头,后接随机字符串。
创建完变量后,单击完成 ,然后单击继续 以生成唯一的网络请求网址并返回到工作流程构建器。
单击从 webhook 旁边的 铅笔图标 。
保证你的申请网址的安全 ,因为任何拥有此链接的人员都可以启动你的工作流程。
注意: webhook 工作流程每秒只能接受一个申请。了解更多关于 Slack API 速率限制的信息 。
添加步骤来结束工作流程
增加步骤
一旦你配置了 webhook 并创建了任何你想使用的变量,你就可以为你的工作流程添加步骤了 。
在工作流程构建器中打开你的工作流程。
单击添加步骤 。
选择你要添加的步骤类型(例如,向频道发送消息 )。然后,按照提示自定义步骤。
单击插入变量 并选择变量,以便在工作流程发送到频道的消息中包含来自 webhook 的数据。
测试你的工作流程
在发布工作流程之前,你可以设置第一步以发布到测试频道。
向你的工作流程的请求网址发送一个 POST,并执行所有步骤来确保一切正常工作。
回到工作流程构建器,更新工作流程的第一步,将其发布到你喜欢的频道,然后发布更改 。
Awesome!
Thanks so much for your feedback!
Got it!
Thanks for your feedback.
If you’d like a member of our support team to respond to you, please send a note to feedback@slack.com .
Oops! We're having trouble. Please try again later!