You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Workspace admins can now configure their own Slack app with workspace-specific OAuth credentials for better isolation and independent management.
7
+
features:
8
+
[
9
+
'Configure workspace-specific Slack app credentials (Client ID and Secret)',
10
+
'Workspace isolation with separate Slack apps per workspace',
11
+
'Independent rate limits per workspace',
12
+
'Automatic fallback to instance-level configuration when not configured',
13
+
'Applies to f/slack_bot/bot_token resource for workspace handlers and Slack approvals',
Copy file name to clipboardExpand all lines: docs/integrations/slack.mdx
+171-1Lines changed: 171 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,12 @@ The Slack integration is done through OAuth. On [self-hosted instances](../advan
42
42
43
43
:::
44
44
45
+
:::tip Workspace-level configuration
46
+
47
+
By default, the OAuth flow uses instance-level Slack app credentials configured by your administrator. Workspace admins can also [configure their own Slack app](#workspace-level-slack-app-configuration) with workspace-specific credentials for better isolation and independent management.
48
+
49
+
:::
50
+
45
51
Slack will ask you to allow Windmill to access your workspace. Click "Allow".
46
52
47
53
<video
@@ -95,7 +101,7 @@ the `/windmill` command in your Slack workspace to trigger the Script. Try it
95
101
out with `/windmill foo` and you should get back `ROGER foo`. Go ahead and
96
102
customize the Script to your needs.
97
103
98
-
In addition to response_url, the script/flow can use the following parameters, simply by having them as inputs with the proper name:
104
+
In addition to `response_url`, the script/flow can use the following parameters, simply by having them as inputs with the proper name:
99
105
100
106
```
101
107
channel_id
@@ -108,6 +114,170 @@ api_app_id
108
114
109
115

110
116
117
+
### Using @mentions
118
+
119
+
In addition to slash commands, you can trigger your Windmill scripts by @mentioning the Windmill bot in any channel, thread, or direct message. @mentions work identically to `/windmill` commands - they use the same handler script configured in your workspace settings and pass the same parameters.
120
+
121
+
When you @mention the bot (e.g., `@Windmill hello world`), the bot mention is automatically stripped from the text before being passed to your handler script, so it receives just `hello world` - identical to how `/windmill hello world` would work.
122
+
123
+
@mentions work in:
124
+
- Public channels (when the bot is invited to the channel)
125
+
- Private channels (when the bot is invited)
126
+
- Direct messages with the bot
127
+
- Message threads (reply to any message and @mention the bot)
128
+
129
+
The `command` parameter will be set to `@mention` for @mention triggers (vs `/windmill` for slash commands), allowing your handler to distinguish between the two if needed.
130
+
131
+
Available parameters for @mention triggers:
132
+
133
+
```
134
+
text // Message text with bot mention stripped
135
+
channel_id // Channel where message was sent
136
+
user_id // Slack user ID who sent the message
137
+
command // Set to "@mention" for @mentions
138
+
event_id // Unique event identifier
139
+
ts // Message timestamp
140
+
thread_ts // Thread timestamp (if in a thread)
141
+
```
142
+
143
+
:::note
144
+
@mentions are delivered via Slack's Events API, which means your handler must respond within 3 seconds. For longer-running operations, launch a job and send updates to Slack asynchronously using the Slack API.
145
+
:::
146
+
147
+
#### Responding to `/` commands vs `@` mentions
148
+
149
+
When handling Slack triggers, the response method differs depending on the trigger type:
150
+
151
+
**For `/windmill` slash commands**: Use the `response_url` parameter (a webhook URL) to send your response back to Slack.
152
+
153
+
**For `@mention` triggers**: Use the Slack Web API with the bot token to post messages to the channel.
By default, workspaces use the instance-level Slack app configured by your Windmill administrator. However, workspace admins can optionally configure their own Slack app for their workspace. This provides:
266
+
267
+
-**Workspace isolation**: Each workspace uses its own Slack app and credentials
268
+
-**Separate rate limits**: Avoid sharing rate limits across workspaces
269
+
-**Independent management**: Workspace admins can manage their own Slack integration
270
+
271
+
To configure a workspace-specific Slack app:
272
+
273
+
1. Navigate to workspace settings → Slack app section
274
+
2. Enter your Slack app's **Client ID** and **Client Secret**
275
+
3. Save the configuration
276
+
277
+
:::note
278
+
The workspace-level Slack app will only apply to the auomatically managed `f/slack_bot/bot_token` resource used for workspace handlers and slack approvals. For general user specific slack oauth tokens, the instance level OAuth connection will be used.
279
+
:::
280
+
111
281
You won't be able to have Slack interact with your [resources](../core_concepts/3_resources_and_types/index.mdx) and [variables](../core_concepts/2_variables_and_secrets/index.mdx) before adding them to the `slack`[group](../core_concepts/8_groups_and_folders/index.mdx#groups) that was automatically created by Windmill after you set up your Slack workspace on Windmill. Tutorial below.
In addition to instance-level configuration, workspace admins can configure their own Slack app with workspace-specific credentials. This provides workspace isolation, separate rate limits, and independent management.
338
+
339
+
To enable workspace-level Slack apps:
340
+
1. Follow the same app manifest setup above to create a Slack app
341
+
2. In workspace settings, navigate to the Slack app section
342
+
3. Enter the workspace-specific Client ID and Client Secret
343
+
344
+
When configured, the workspace will use its own Slack app instead of the instance-level app. See the [Slack integration documentation](../../integrations/slack.mdx#workspace-level-slack-app-configuration) for more details on workspace-level configuration and when to use it.
345
+
326
346
### Microsoft Teams
327
347
- Go to the [Azure Portal](https://portal.azure.com/) and create a new "Bot Service" of type "[Azure Bot](https://portal.azure.com/#create/Microsoft.AzureBot)".
0 commit comments