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

  1. At api.slack.com/apps, create a new app for your workspace.
  2. Under OAuth & Permissions, add the bot scopes you need and install the app.
  3. Copy the bot token (xoxb-...) and the signing secret from Basic Information.
  4. In Spojit, go to Connections from the sidebar.
  5. Click + Add Connection and search for Slack.
  6. Paste the bot token and signing secret, name the connection (for example, Slack - Ops) and click Save.
  7. 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-channels on every send.
  • Use lookup-user-by-email to mention users by their corporate email rather than hardcoding Slack ids.
  • Slack's rate limits are tier-based; send-message sits at roughly one per second per channel.
  • For rich layouts, use the blocks field on send-message instead of plain text.
  • Use add-reaction with 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 ts values are strings (e.g. 1700000000.123456); do not coerce to a number.
  • search-messages requires a user token, not a bot token; use get-channel-history with bot tokens instead.
  • Threads do not bubble new replies to the channel by default; set reply_broadcast: true if visibility matters.

Common Use Cases

Related Articles

For technical API details and field specifications, see the Slack connector documentation.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.