kdeps-listeners-slack_events
v1.0.0Slack events over Socket Mode (no public URL): runs the workflow once for each message event. The event is the Slack event: input('text'), input('channel'), input('user'). Messages from bots are left out. Reply with the slack_post component (chat.postMessage). Needs SLACK_APP_TOKEN (xapp-) for the connection.
set listeners / shelf workflow
LLM context: none - kdeps uses it without sending it to the model
Where it runs
Part of the listeners set, used in workflow and agent mode. Ready-made event sources for deploy.input.listen: a Telegram poll, Slack Socket Mode and the Discord Gateway, each one transport block in YAML.
- a workflow names a listener under deploy.input.listen
- the listener is read from the listeners set when kdeps run startslisteners/slack_events
- its transport (poll, websocket, ...) starts
- each event runs the workflow once
Loaded by: kdeps (agent loop), kdeps run, kdeps exec
In the code: kdeps (agent loop)listen.WakeAddrslisten.readListenerAsset
Install
A kdeps asset: installed with the first-run profile that includes its set, or the first time a command needs it, and updated without a new release.
Also installs what it requires, when missing or older: tools/slack_socket_open.
Pin a version with kdeps install listeners/slack_events@<version>.
Contents
Slack events over Socket Mode (no public URL): runs the workflow once for each message event. The event is the Slack event: input('text'), input('channel'), input('user'). Messages from bots are left out. Reply with the slack_post component (chat.postMessage). Needs SLACK_APP_TOKEN (xapp-) for the connection.
- kdeps
- >=3.6.0
requires:
tools/slack_socket_open: ""
websocket:
open:
tool: slack_socket_open
url: "{{.open.url}}"
on:
- when: "{{.msg.envelope_id}}"
send: '{"envelope_id":"{{.msg.envelope_id}}"}'
- when: '{{if and (eq .msg.type "events_api") (eq .msg.payload.event.type
"message") (not .msg.payload.event.bot_id)}}y{{end}}'
emit: "{{json .msg.payload.event}}"
- when: '{{if eq .msg.type "disconnect"}}y{{end}}'
reconnect: true
version: 1.0.0
kdeps: ">=3.6.0"
description: 'Slack events over Socket Mode (no public URL): runs the workflow once for each message event. The event is the Slack event: input(''text''), input(''channel''), input(''user''). Messages from bots are left out. Reply with the slack_post component (chat.postMessage). Needs SLACK_APP_TOKEN (xapp-) for the connection.'
requires:
tools/slack_socket_open: ""
websocket:
# apps.connections.open hands out a new wss:// URL for each connection.
open:
tool: slack_socket_open
url: '{{.open.url}}'
on:
# Slack wants each envelope acknowledged within 3 seconds.
- when: '{{.msg.envelope_id}}'
send: '{"envelope_id":"{{.msg.envelope_id}}"}'
- when: '{{if and (eq .msg.type "events_api") (eq .msg.payload.event.type "message") (not .msg.payload.event.bot_id)}}y{{end}}'
emit: '{{json .msg.payload.event}}'
# Slack asks for a new connection before it closes this one.
- when: '{{if eq .msg.type "disconnect"}}y{{end}}'
reconnect: true
Versions
| Version | Published | Status | Source |
|---|---|---|---|
| 1.0.0 | 11/26/2026 | active | GitHub v1.0.0 |
Details
- Author
- kdeps
- License
- Apache-2.0
- Latest Version
- 1.0.0
- Published
- 11/26/2026