Slack

Communication OAuth (bot or user token), or a token you paste Windmill docs

Post, edit and react to messages, upload and download files, list channels and their members, manage channels and user groups, set statuses and reminders, read channels and threads, search the workspace and route approvals through Slack from any Windmill script, flow or app. Connect once — as the Slack app (bot) or as yourself (user) — then reuse the same resource everywhere, and let Slack events, slash commands and interactive buttons trigger your flows back.

What you can do with Slack

Complete, deployable projects built around Slack — the fastest way to get something real running.

Set up in 2 steps

1

Connect from the Resources page

Open Resources, click Add a resource/API and pick slack from the OAuth APIs list. Choose a bot token to act as the Slack app, or a user token to act as yourself, click Connect and allow access. You are redirected to the Slack workspace your browser is signed in to.

2

Run your first script

Fork any script below and run it against a test channel. With a bot token, messages are posted by the app and only public channels it has joined can be read. With a user token, scripts see and post exactly what you can — including private channels, DMs and search.

Scripts

Building blocks, if none of the projects above fit. Fork one, run it, or call it as a step inside your own flow.

Submit a script →

Flows

Multi-step workflows that already wire Slack to something else.

All flows →

Trigger flows from Slack

Slack is not only a destination. These inbound paths are supported today.

Slash commands

A command like /deploy staging hits a webhook and starts a flow with the arguments as inputs.

Events API: create the route

Fork the Slack Events API handler script below and add an HTTP route trigger on it: method POST, request type Sync, authentication Signature with the Slack provider and your app's Signing Secret (Slack app settings, Basic Information, App Credentials). Windmill rejects any request Slack did not sign before the script runs. The script answers Slack's verification challenge, then handles message, reaction_added, app_mention and member_joined_channel events, skipping messages posted by apps and Slack's timeout retries.

Events API: subscribe in Slack

In the Slack app, open Event Subscriptions, turn it on and paste the route URL as the Request URL; it shows Verified once the script has answered. Under Subscribe to bot events add message.channels (scope channels:history), reaction_added (reactions:read), app_mention (app_mentions:read) or member_joined_channel (channels:read), save, and reinstall the app so the new scopes apply. The app must be in a channel to receive its messages. Slack waits 3 seconds for the reply and retries otherwise, so keep the handler short or start a second job for long work. The script's header has the same setup as an app manifest snippet.

Interactive blocks

Buttons and modals resume a suspended flow step.

Resource type

The shape of the credential every script on this page expects.

FieldTypeRequiredWhat it is
tokenstringNoThe slack token

Questions

Bot token or user token?

A bot token acts as the Slack app: it posts under the app's name and reads only public channels it has joined. Its default scopes cover posting, joining channels, uploading files, reading public channels and looking up users. A user token acts as the person who connected: it reads their private channels, DMs and group DMs, and is the only kind that can search messages. Both are stored in the same slack resource, so scripts work with either — the ones that need a user token say so.

A script fails with missing_scope or not_allowed_token_type

not_allowed_token_type means the script needs the other kind of token — Search Messages, Set User Status, Update User Profile and Create Reminder only work with a user token. missing_scope means the connection lacks a scope the script names in its description, such as reactions:write, usergroups:read or, for a bot, files:read: connect again and tick that scope in the connect dialog. A resource connected before the current defaults also needs reconnecting.

Do I need a paid Slack plan?

No. A free workspace covers everything the scripts here do.

Is my token stored on the hub?

Never. It lives only in your own Windmill workspace, encrypted at rest.

There is no Connect button on my instance

Self-hosted instances need an OAuth client configured once by an admin before the tile appears. Until then, use a bot token.