Skip to content

feat(automations): Run event automations for new Slack channel messages - #2119

Merged
dcramer merged 6 commits into
mainfrom
feat/slack-channel-message-automations
Oct 14, 2026
Merged

dcramer merged 6 commits into
mainfrom
feat/slack-channel-message-automations

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

A channel owner can now say "when someone posts a new message in this channel, answer it if you can, otherwise tag me". Junior runs an Event automation for each new top-level message and replies in that message's thread. This is the discuss-channel triage case in #2078.

When Slack ingress drops a channel message (no mention, not a subscribed thread), it now publishes slack / channel / message.posted to ingestEventAutomations. Thread replies and bot posts do not publish. chat/slack/channel-message-events.ts owns the registration, the Event, the channel scope rule, and the reply thread. The slack namespace is core owned, like junior.

The run's Destination adds the source message as threadTs. The stored Destination stays the channel. The event key is channel:ts, so Slack retries do not run twice. The run limit from #2117 still applies.

Guardrails:

  • An automation can watch only its own channel (current_channel). Create and edit reject another channel, so private channel text stays in that channel.
  • Runs always use system credentials, because anyone in the channel writes the message.
  • watchEvents rejects the slack namespace.

pluginEventCatalog is now automationEventCatalog, because it includes a core namespace. createEventAutomation is now always registered for Slack actors.

Not in this PR: Workflow Builder posts (#2034), an "unanswered after N minutes" mode, a behavioral eval, and a check that Junior is a member of the channel.

Refs #2078

via David Cramer.

--

View Junior Session [Sentry]

@vercel

vercel Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
junior-docs Ready Ready Preview Oct 14, 2026 3:18am UTC

Request Review

@sentry-junior
sentry-junior Bot force-pushed the feat/slack-channel-message-automations branch from 8ef8dc8 to 8123801 Compare October 13, 2026 23:08
@sentry-junior
sentry-junior Bot force-pushed the feat/slack-channel-message-automations branch from 8123801 to 3b8a11c Compare October 13, 2026 23:19
@sentry-junior
sentry-junior Bot force-pushed the feat/slack-channel-message-automations branch from 3b8a11c to f8236a5 Compare October 13, 2026 23:21
@sentry-junior
sentry-junior Bot force-pushed the feat/slack-channel-message-automations branch from f8236a5 to 7146ddf Compare October 14, 2026 00:22
@sentry-junior
sentry-junior Bot force-pushed the feat/slack-channel-message-automations branch from 7146ddf to cf6bbe7 Compare October 14, 2026 00:30
@sentry-junior
sentry-junior Bot force-pushed the feat/slack-channel-message-automations branch from cf6bbe7 to f3a95f5 Compare October 14, 2026 00:38
@sentry-junior
sentry-junior Bot force-pushed the feat/slack-channel-message-automations branch from f3a95f5 to 81939f2 Compare October 14, 2026 00:45
@sentry-junior
sentry-junior Bot force-pushed the feat/event-automation-run-limit branch from 9048c64 to 6d308ce Compare October 14, 2026 00:51
@sentry-junior
sentry-junior Bot force-pushed the feat/slack-channel-message-automations branch from 81939f2 to a0486a4 Compare October 14, 2026 00:52
@sentry-junior
sentry-junior Bot force-pushed the feat/slack-channel-message-automations branch from a0486a4 to 8d0b11d Compare October 14, 2026 01:00
@sentry-junior
sentry-junior Bot force-pushed the feat/slack-channel-message-automations branch from 8d0b11d to 430ff9e Compare October 14, 2026 01:07
Base automatically changed from feat/event-automation-run-limit to main October 14, 2026 01:46
@sentry-junior
sentry-junior Bot force-pushed the feat/slack-channel-message-automations branch from 430ff9e to e3a1576 Compare October 14, 2026 02:12
@dcramer
dcramer marked this pull request as ready for review October 14, 2026 02:16
@github-actions github-actions Bot added the risk: high PR risk score: high label Oct 14, 2026

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stale Bugbot comment from a previous run.

sentry-junior Bot and others added 5 commits October 14, 2026 03:08
Slack ingress now publishes slack/channel/message.posted for a new
top-level channel message that no other route handles. Thread replies,
mentions, subscribed threads, bots, and Junior's own messages do not
publish.

An automation can watch only the channel where it posts. The identifier
current_channel names that channel, and create and edit reject other
channels so private channel text cannot reach another channel. Runs
always use system credentials because anyone in the channel writes the
event text. Each run replies in the source message's thread.

Watches cannot select the event. Rename pluginEventCatalog to
automationEventCatalog because it now includes the core slack namespace.

Refs #2078

Co-Authored-By: David Cramer <[email protected]>
Slack app and bot posts can carry a user id, so they passed the
membership and author checks and ran channel-message automations.
Skip events with a bot_id or the bot_message subtype, as the docs say.

Co-Authored-By: David Cramer <[email protected]>
Remove the channel identifier normalizer, the redundant reply-thread
channel check, and the timestamp fallback. Always register
createEventAutomation for Slack actors, because Slack channel messages
are always in the catalog. Shorten comments and README text.

Co-Authored-By: David Cramer <[email protected]>
The removed plugin-disabled test dropped one setPlugins call.

Co-Authored-By: David Cramer <[email protected]>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 999a344. Configure here.

@dcramer
dcramer merged commit 759b19b into main Oct 14, 2026
48 checks passed
@dcramer
dcramer deleted the feat/slack-channel-message-automations branch October 14, 2026 03:27

This branch was successfully deployed

1 active deployment
Preview – junior-docs — df8638da Deployed Oct 14, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant