Slack
Slack is a business communication platform for team messaging and collaboration.
Overview
Slack is a team messaging platform organised around channels, threads, and direct messages. It is widely used as the operational nerve centre of a business: alerts land in channels, decisions happen in threads, and integrations push events from every other system into shared visibility.
In Spojit, Slack is the most common notification destination. Workflows post order alerts, failure notifications, schedule changes, and customer message routings into channels with send-message. Slack also acts as an interactive surface: workflows can read replies via get-thread-replies or react to messages with add-reaction to mark them processed.
What You Can Do
The Slack connector exposes these tools:
add-bookmark- bookmark a link inside a channel.add-reaction- add an emoji reaction to a message.create-channel- create a public or private channel.delete-message- delete a message posted by the bot.get-channel-history- fetch recent messages from a channel.get-channel-info- fetch channel metadata.get-thread-replies- fetch all replies in a message thread.get-user-info- fetch a user's profile by id.invite-to-channel- invite one or more users to a channel.list-channels- list channels the bot can access.list-pins- list pinned messages in a channel.list-users- list workspace members.lookup-user-by-email- resolve a user id from an email address.pin-message- pin a message to a channel.raw-api-call- call any Slack Web API method directly.remove-reaction- remove an emoji reaction.search-messages- search the workspace for messages matching a query.send-message- post a message to a channel, thread, or DM.set-channel-topic- set the topic for a channel.unpin-message- remove a pin from a message.update-message- edit a message posted by the bot.
Authentication
Slack uses a bot token plus a signing secret. Create a Slack app at api.slack.com -> Your Apps, configure the OAuth scopes you need (typical workflow scopes: chat:write, channels:read, channels:history, users:read, users:read.email, reactions:write, pins:write), then install the app into your workspace. Copy the Bot User OAuth Token (starts with xoxb-) from OAuth & Permissions and the signing secret from Basic Information.
Setting Up Your Connection
- At api.slack.com/apps, create a new app for your workspace.
- Under OAuth & Permissions, add the bot scopes you need and install the app.
- Copy the bot token (
xoxb-...) and the signing secret from Basic Information. - In Spojit, go to Connections from the sidebar.
- Click + Add Connection and search for Slack.
- Paste the bot token and signing secret, name the connection (for example,
Slack - Ops) and click Save. - Invite the bot to every channel it needs to post in with
/invite @your-app.
Using in a Workflow
Use Direct Mode for predictable notifications: send-message with a fixed channel id and templated body. Use Agent Mode when an AI step decides which channel, who to mention, and how to phrase the message based on context. For thread-based conversations, capture the ts returned by send-message and pass it as thread_ts on follow-up calls.
Tips
- Pre-resolve channel ids once at workflow start instead of calling
list-channelson every send. - Use
lookup-user-by-emailto mention users by their corporate email rather than hardcoding Slack ids. - Slack's rate limits are tier-based;
send-messagesits at roughly one per second per channel. - For rich layouts, use the
blocksfield onsend-messageinstead of plain text. - Use
add-reactionwith a checkmark emoji to mark a message as processed, instead of editing or deleting it.
Common Pitfalls
- The bot must be a member of a channel before it can post; private channels need an explicit invite.
- Slack token scopes are not retroactive; adding a scope requires reinstalling the app.
- Message
tsvalues are strings (e.g.1700000000.123456); do not coerce to a number. search-messagesrequires a user token, not a bot token; useget-channel-historywith bot tokens instead.- Threads do not bubble new replies to the channel by default; set
reply_broadcast: trueif visibility matters.
Common Use Cases
- How to Set Up Slack Alerts for Workflow Failures
- How to Send Slack Notifications When Workflows Fail
- How to Send Slack Alerts for New E-commerce Orders
- How to Route Front Messages to Slack
- How to Send Tracking Notifications via Slack When Orders Ship
- How to Send Slack Notifications for Schedule Changes
Related Articles
For technical API details and field specifications, see the Slack connector documentation.