Uh oh!
There was an error while loading. Please reload this page.
feat(triggers): add Resend webhook triggers with auto-registration - #3986
Conversation
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview Introduces a new Updates webhook subscription recreation logic to treat Reviewed by Cursor Bugbot for commit f4365a7. Configure here. |
Uh oh!
There was an error while loading. Please reload this page.
Greptile SummaryAdds full Resend webhook trigger support — 8 event-specific triggers (
Confidence Score: 5/5PR is safe to merge; all prior security concerns (Svix signature verification, replay protection, event-type filtering, credential visibility) have been resolved All P0/P1 issues from prior review rounds are fixed. The only open finding is a P2 maintainability suggestion (duplicated event-type map) that does not affect correctness today. The implementation faithfully follows established patterns. apps/sim/lib/webhooks/providers/resend.ts — minor duplication between matchEvent and createSubscription event maps worth addressing before the trigger count grows Important Files Changed
Sequence DiagramsequenceDiagram
participant U as User
participant S as Sim (save trigger)
participant R as Resend API
participant W as Sim Webhook Endpoint
participant WF as Workflow Engine
U->>S: Save trigger config (apiKey, triggerId)
S->>R: POST /webhooks {endpoint, events}
R-->>S: {id, signing_secret}
S->>S: Store externalId + signingSecret in providerConfig
Note over R,W: On email event
R->>W: POST /webhook {svix-id, svix-timestamp, svix-signature, body}
W->>W: verifySvixSignature (HMAC-SHA256 + staleness check)
W->>W: matchEvent (check payload.type vs triggerId)
W->>W: formatInput (flatten payload)
W->>WF: Execute workflow with flattened inputs
U->>S: Delete trigger
S->>R: DELETE /webhooks/{externalId}
R-->>S: 200 OK
Reviews (3): Last reviewed commit: "fix(triggers): use Number.parseInt and N..." | Re-trigger Greptile |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
waleedlatif1
commented
Apr 6, 2026
@cursor review |
waleedlatif1
commented
Apr 6, 2026
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…ttacks Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
waleedlatif1
commented
Apr 6, 2026
waleedlatif1
commented
Apr 6, 2026
@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 f4365a7. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
…3986) * feat(triggers): add Resend webhook triggers with auto-registration * fix(triggers): capture Resend signing secret and add Svix webhook verification * fix(triggers): add paramVisibility, event-type filtering for Resend triggers * fix(triggers): add Svix timestamp staleness check to prevent replay attacks Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(triggers): use Number.parseInt and Number.isNaN for lint compliance Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Summary
formatInputto flatten webhook payloads andcreateSubscription/deleteSubscriptionfor lifecycle managementType of Change
Testing
Tested manually — type-check and lint pass
Checklist