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 請求。
瞭解傳入的 Webhook。如需相關指引,請參閱 Slack API 說明文件 ,或向團隊中的開發人員求助。
注意: 擁有者與管理員可以限制能夠以 Webhook 建立工作流程的人員 。如果你沒有在「工作流程建立」中看到此選項,請向擁有者或管理員 尋求協助。
工作流程設定
Webhook 工作流程基本資訊
選擇以 Webhook 開始工作流程 時,就需設定讓 Webhook 在第三方應用程式或服務傳送網址網路請求時開始你的工作流程。例如,你可以建立一個工作流程,讓它在你的網站出現問題時,在特定頻道中張貼一則訊息,方便你的工程團隊展開調查。
設定 Webhook
你用於建立和設定 Webhook 的外部服務必須允許你在特定事件發生時向 Slack 提出 HTTP POST 請求。Slack 會在你發布工作流程之後產生工作流程專屬的請求網址,你可以將 Webhook 設定為在 HTTP 請求主體中向 Slack 傳遞資訊。透過建立變數的方式,Webhook 傳送給 Slack 的任何資料都可以供你新增至工作流程的步驟參照。
提示: 如果您不確定該如何設定 Webhook,我們建議您向團隊中的開發人員尋求協助,或是參考目前使用之服務所提供的支援文件,例如 Postman 或 Zapier 。
建立自訂變數
將資料從其他服務傳遞至 Slack,並在新增至工作流程的步驟 中納入特定 Slack 資訊 (例如顯示名稱 或電子郵件地址) 時,你最多可新增 20 個變數。
若要建立自訂變數,可以將一組成對的金鑰值新增到工作流程建立中的 Webhook 設定,方法是選取下列其中一種資料類型:頻道識別碼、使用者識別碼、使用者電子郵件,或者是文字。新增變數之後,你就會看見 HTTP 本文預覽內容。確認本文中的值確實符合你以 Webhook 連接到 Slack 的服務中的 JSON 輸出值。請留意,目前無法在工作流程變數中使用巢狀 JSON 結構。
在下方的例子中,如果使用者、嚴重性和 incident_description 沒有透過 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!