Commit d9da544
authored
feat(triggers): add Twilio SMS, Clerk, incident.io, Rootly, RevenueCat, Loops, and Sentry webhook triggers (#5230)
* feat(triggers): add Twilio SMS, Clerk, incident.io, Rootly, RevenueCat, Loops, Sentry webhook triggers
Adds inbound webhook triggers for seven existing integrations, each verified
against the provider's official webhook docs (event types, payload fields,
signature scheme) and aligned with Sim's trigger conventions.
- Twilio SMS: inbound message + status callback (X-Twilio-Signature, HMAC-SHA1)
- Clerk: user/session/organization lifecycle (Svix)
- incident.io: incident created/updated/status + alert created (Svix)
- Rootly: incident created/updated/resolved + alert created (HMAC-SHA256);
auto-registers and tears down the webhook via the Rootly API
- RevenueCat: purchase/renewal/cancellation/expiration/product-change
(Authorization header); auto-registers via the RevenueCat v2 API
- Loops: email lifecycle + campaign/loop/transactional sent (Svix-compatible)
- Sentry: issue/error/issue-alert/metric-alert (Sentry-Hook-Signature, fail-closed)
Clerk, incident.io, Loops, Twilio, and Sentry use manual signing-secret setup
where the provider exposes no clean webhook-management API; Rootly and RevenueCat
auto-provision so the user only supplies an API key.
* fix(triggers): address review — fail-closed auth, Twilio event filtering, user-only secrets
- Twilio: add matchEvent so inbound-SMS and status-callback triggers don't
cross-fire on a shared webhook URL (inbound = SmsStatus 'received')
- Rootly + RevenueCat: verifyAuth now fails closed (401) when the signing
secret is absent from provider config (both auto-register, so it is always
present after deploy) instead of skipping verification
- Mark every user-provided credential field paramVisibility 'user-only'
(Clerk, incident.io, RevenueCat, Sentry, Twilio) so secrets are never
exposed as LLM-visible trigger params
- Sentry: correct metric_alert web_url description per docs
* fix(triggers): key Twilio status callbacks by SID + status for idempotency
Twilio sends multiple delivery callbacks per message (sent -> delivered -> ...)
sharing one MessageSid; keying idempotency on the SID alone dropped every status
after the first. Status callbacks now key on SID + delivery status so each state
is distinct (while still deduping Twilio's retries of the same status); inbound
messages still key by SID since they fire once.
* fix(triggers): require a positive signal in Twilio matchEvent routing
Previously an empty MessageStatus/SmsStatus was treated as a status callback,
so an ambiguous or partial payload could match twilio_sms_status (or skip
twilio_sms_received). Both triggers now require a positive signal — inbound
needs status 'received', status callbacks need a non-'received' status — so a
payload missing both fields matches neither rather than misrouting.
* fix(triggers): attach Twilio auth fields to both triggers so status callbacks are verified
The Account SID / Auth Token fields were only on the primary trigger, so
deploying twilio_sms_status alone never captured authToken into providerConfig
and signature verification was silently skipped. Following the incident.io /
Rootly / RevenueCat pattern, the auth fields are now added to each trigger
conditioned on its own selectedTriggerId; the shared inner subBlock IDs keep the
values persisted across trigger types.
* fix(triggers): mark shared block-level API keys user-only to protect trigger secrets
The trigger credential fields (RevenueCat/Rootly apiKey, Twilio authToken) are
user-only, but the same-id tool-level block fields were not, so the stored
secret stayed reachable as an LLM-visible block parameter. Mark those block
credential fields paramVisibility 'user-only' too (matching instantly.ts) so the
secret is user-only on every path. accountSid is an identifier, not a secret, so
it is left as-is.1 parent 3143a15 commit d9da544
73 files changed
Lines changed: 5879 additions & 3 deletions
File tree
- apps/sim
- blocks/blocks
- lib/webhooks/providers
- triggers
- clerk
- incidentio
- loops
- revenuecat
- rootly
- sentry
- twilio
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
275 | 276 | | |
276 | 277 | | |
277 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
278 | 286 | | |
279 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
280 | 301 | | |
281 | 302 | | |
282 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
18 | 28 | | |
19 | 29 | | |
20 | 30 | | |
| |||
929 | 939 | | |
930 | 940 | | |
931 | 941 | | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
932 | 947 | | |
933 | 948 | | |
934 | 949 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
391 | 392 | | |
392 | 393 | | |
393 | 394 | | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
394 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
395 | 417 | | |
396 | 418 | | |
397 | 419 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| 44 | + | |
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
| |||
359 | 361 | | |
360 | 362 | | |
361 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
362 | 370 | | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
363 | 382 | | |
364 | 383 | | |
365 | 384 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
19 | 29 | | |
20 | 30 | | |
21 | 31 | | |
| |||
1640 | 1650 | | |
1641 | 1651 | | |
1642 | 1652 | | |
| 1653 | + | |
1643 | 1654 | | |
1644 | 1655 | | |
| 1656 | + | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
1645 | 1661 | | |
1646 | 1662 | | |
1647 | 1663 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
605 | 606 | | |
606 | 607 | | |
607 | 608 | | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
608 | 615 | | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
609 | 626 | | |
610 | 627 | | |
611 | 628 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
43 | 44 | | |
44 | 45 | | |
45 | 46 | | |
| 47 | + | |
46 | 48 | | |
47 | 49 | | |
48 | 50 | | |
| |||
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| 57 | + | |
| 58 | + | |
55 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
56 | 64 | | |
57 | 65 | | |
58 | 66 | | |
| |||
0 commit comments