feat(slack): launch v2 triggers and backfill custom bots - #6873
feat(slack): launch v2 triggers and backfill custom bots#6873TheodoreSpeaks wants to merge 6 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryHigh Risk Overview Migrates pasted bot tokens into reusable Webhook lookup also caps targets per path/routing key. Docs and integration availability now treat Slack as Reviewed by Cursor Bugbot for commit 5f2a0bb. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThe PR releases Slack v2 with custom-bot triggers, gates native OAuth capabilities behind extended-scope configuration, and adds a bounded backfill for legacy Slack credentials while preserving webhook URLs.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/app/api/webhooks/slack/custom/[credentialId]/route.ts | The custom-bot route now evaluates typed fan-out results, returns a failure when every target fails, and acknowledges queued, filtered, or empty-target deliveries. |
| apps/sim/app/api/webhooks/trigger/[path]/route.ts | The generic path route authenticates migrated Slack credential aliases, replaces their direct dispatch with credential fan-out, and correctly includes filtered legacy results in acknowledgement selection. |
| apps/sim/lib/webhooks/slack-custom-ingress.ts | Centralizes credential-backed Slack signature verification and routing-key fan-out for both dedicated and migrated legacy ingress. |
| packages/db/scripts/migrate-slack-custom-bots.ts | Adds a bounded, dry-run-gated, transactional and idempotent operator backfill that creates reusable custom-bot credentials and links legacy triggers without changing webhook paths. |
| apps/sim/blocks/blocks/slack.ts | Releases Slack v2, hides the legacy block from discovery, and conditionally removes native-app operations and tools when extended scopes are disabled. |
Sequence Diagram
sequenceDiagram
participant Slack
participant Ingress as Slack webhook ingress
participant Credential as Custom-bot credential
participant Targets as Credential-routed webhooks
participant Queue as Webhook execution queue
Slack->>Ingress: Signed event
Ingress->>Credential: Load signing secret
Credential-->>Ingress: Verify signature
Ingress->>Targets: Resolve and fan out by credential ID
loop Each active target
Targets->>Queue: Preprocess and enqueue
Queue-->>Targets: queued / filtered / failed
end
alt At least one queued or intentionally filtered
Ingress-->>Slack: HTTP 200
else Every target failed
Ingress-->>Slack: First failure response
end
Reviews (4): Last reviewed commit: "fix(slack): acknowledge filtered webhook..." | Re-trigger Greptile
83137a3 to
e421379
Compare
|
@cursor review |
e421379 to
8c78e18
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 8c78e18. Configure here.
8c78e18 to
12513cb
Compare
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 12513cb. Configure here.
12513cb to
5f2a0bb
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 5f2a0bb. Configure here.
| }, | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Reaction identity skip when teamId set
High Severity
Reaction deploys only call fetchSlackTeamId when the credential has no teamId. If teamId is present but botUserId is missing, providerConfig.bot_user_id is never set. Reaction self-detection then treats the app’s own reactions as foreign events, so the default self-drop does not apply and workflows that react can loop.
Reviewed by Cursor Bugbot for commit 5f2a0bb. Configure here.


Summary
Type of Change
Testing
Checklist