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
{{ message }}
Repository navigation
Commit 9317aad
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/channels/slack.md
+28Lines changed: 28 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1784,6 +1784,7 @@ Same-chat `/approve` also works in Slack channels and DMs that already support c
1784
1784
- Thread broadcasts ("Also send to channel" thread replies) are processed as normal user messages.
1785
1785
- Reaction add/remove events are mapped into system events.
1786
1786
- Member join/leave, channel created/renamed, and pin add/remove events are mapped into system events.
1787
+
- Optional presence polling can map an observed human participant's `away` to `active` transition into the participant's most recently active eligible Slack session. The default is off.
1787
1788
-`channel_id_changed` can migrate channel config keys when `configWrites` is enabled.
1788
1789
- Channel topic/purpose metadata is treated as untrusted context and can be injected into routing context.
1789
1790
- Thread starter and initial thread-history context seeding are filtered by configured sender allowlists when applicable.
@@ -1795,6 +1796,32 @@ Same-chat `/approve` also works in Slack channels and DMs that already support c
1795
1796
1796
1797
Define global or message shortcuts in your Slack app configuration and use any non-empty callback ID. OpenClaw acknowledges matching shortcut payloads, applies the same DM/channel sender policy as other Slack interactions, and queues the sanitized event for the routed agent session. Trigger IDs and response URLs are redacted from agent context.
1797
1798
1799
+
### Presence events
1800
+
1801
+
Slack does not send presence changes through the Events API or Socket Mode. OpenClaw can instead poll [`users.getPresence`](https://docs.slack.dev/reference/methods/users.getPresence/) for human participants whose messages passed normal Slack access and routing checks.
1802
+
1803
+
```json5
1804
+
{
1805
+
channels: {
1806
+
slack: {
1807
+
presenceEvents: { mode:"auto" },
1808
+
channels: {
1809
+
C0123456789: { presenceEvents: { mode:"on" } },
1810
+
C0987654321: { presenceEvents: { mode:"off" } },
1811
+
},
1812
+
},
1813
+
},
1814
+
}
1815
+
```
1816
+
1817
+
-`off` (default): no presence timer or Slack API calls.
1818
+
-`auto`: monitor DMs, MPIMs, and Slack threads active in the last 24 hours with at most 8 observed human participants. Top-level channel sessions are excluded.
1819
+
-`on`: monitor the same conversations without the participant cap and include top-level channel sessions. Use a per-channel override to force or suppress one channel.
1820
+
1821
+
OpenClaw polls at most 45 unique users per minute per Slack account, seeds the first result without waking the agent, and only wakes on an observed `away` to `active` transition. A durable 8-hour cooldown applies per Slack account and user, even if that person participates in several threads. The event routes only to that person's most recently active eligible conversation and tells the agent to consult memory/wiki and known timezone context before deciding whether to send one short greeting. The agent may stay silent.
1822
+
1823
+
The bot token needs `users:read`, which is already included in the recommended manifest. Presence events are unavailable for Enterprise Grid org-wide installs.
- unfurls: `unfurlLinks` (default: `false`), `unfurlMedia` for `chat.postMessage` link/media preview control; set `unfurlLinks: true` to opt back into link previews
help: "Slack-native exec approval routing and approver authorization. When unset, OpenClaw auto-enables DM-first native approvals if approvers can be resolved for this workspace account.",
104
104
},
105
+
presenceEvents: {
106
+
label: "Slack Presence Events",
107
+
help: 'Poll observed human participants and wake the routed agent on away-to-active transitions. Default: "off".',
108
+
},
109
+
"presenceEvents.mode": {
110
+
label: "Slack Presence Event Mode",
111
+
help: '"off" disables polling; "auto" covers DMs, MPIMs, and recent threads with up to 8 observed people; "on" also covers larger threads and top-level channels.',
112
+
},
113
+
"channels.*.presenceEvents.mode": {
114
+
label: "Slack Channel Presence Event Mode",
115
+
help: 'Override presence events for one Slack channel. Use "on" to include large threads or top-level channel sessions.',
116
+
},
105
117
"execApprovals.enabled": {
106
118
label: "Slack Exec Approvals Enabled",
107
119
help: 'Controls Slack native exec approvals for this account: unset or "auto" enables DM-first native approvals when approvers can be resolved, true forces native approvals on, and false disables them.',
0 commit comments