Zapier & Make integration — connect FTC changes to 7,000+ apps#336
Zapier & Make integration — connect FTC changes to 7,000+ apps#336
Conversation
- automation_subscriptions table with SSRF-safe hookUrl storage - POST /api/v1/zapier/subscribe, DELETE /api/v1/zapier/unsubscribe - GET /api/v1/zapier/monitors, GET /api/v1/zapier/changes - deliverToAutomationSubscriptions() fire-and-forget in processChangeNotification() - integrations/zapier/ — complete Zapier CLI app definition - /docs/zapier and /docs/make documentation pages - Updated Pricing (Power only), UpgradeDialog, Support FAQ, docsAccuracy tests https://claude.ai/code/session_01H4nfFd3LdtiMvS7UUNrsNB
… subscriptions - Add AUTOMATION_SUBSCRIPTION_LIMITS (25 per user) to shared/models/auth.ts - Enforce limit in POST /api/v1/zapier/subscribe before creating - Remove hookUrl from subscribe response (it's a bearer credential) - Add deduplication: reactivate existing matching subscription instead of creating duplicate https://claude.ai/code/session_01H4nfFd3LdtiMvS7UUNrsNB
…s endpoint - Add ensureAutomationSubscriptionsTable() for pre-migration DB compat - Clean up automation_subscriptions in deleteMonitor transaction - Use console.log for success deliveries instead of ErrorLogger.info - Simplify /changes endpoint: static inArray import, single query path - Fix routes.conditions.test mock for new ensureTable function https://claude.ai/code/session_01H4nfFd3LdtiMvS7UUNrsNB
…cribe fallback - Check ensureAutomationSubscriptionsTable return value and log CRITICAL on failure - Add unique partial index for dedup enforcement at DB level - Accept unsubscribe id from query param as fallback for proxies stripping DELETE bodies - Add .max(2048) to hookUrl validation - Fix timestamp in /changes response to use detectedAt instead of current time https://claude.ai/code/session_01H4nfFd3LdtiMvS7UUNrsNB
Automation subscriptions (Zapier) must fire even when all traditional notification channels (email/webhook/slack) are disabled. Move the deliverToAutomationSubscriptions call after conditions check but before the hasActiveChannels gate. https://claude.ai/code/session_01H4nfFd3LdtiMvS7UUNrsNB
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 13 minutes and 10 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds Zapier and Make integrations: new frontend docs/routes, Zapier CLI app, Zapier REST webhook API (subscribe/unsubscribe/monitors/changes) with SSRF checks and per-user limits, DB schema and storage for automation_subscriptions, delivery service for webhook dispatch, and wiring into notification processing. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User / Zapier
participant ZapierApp as Zapier CLI App
participant FTC as FTC API (v1/zapier/*)
participant DB as PostgreSQL
participant Webhook as External Webhook URL
User->>ZapierApp: Configure trigger (API key, monitor)
ZapierApp->>FTC: POST /api/v1/zapier/subscribe { hookUrl, monitorId? }
FTC->>FTC: Validate input (Zod) & SSRF check
FTC->>DB: Insert automation_subscriptions row
DB-->>FTC: Created subscription
FTC-->>ZapierApp: { id, createdAt, ... }
Note over FTC,DB: Later — change detected
ZapierApp->>FTC: (not involved at event time)
User->>FTC: Monitor change detected
FTC->>FTC: Evaluate alert conditions
FTC->>FTC: deliverToAutomationSubscriptions(monitor, change)
FTC->>DB: Query active automation_subscriptions
DB-->>FTC: [{ hookUrl, platform, id, monitorId }]
FTC->>Webhook: POST payload to each hookUrl (parallel)
Webhook-->>FTC: 200 OK / error
FTC->>DB: touchAutomationSubscription(id) on success
sequenceDiagram
participant Zapier as Zapier Platform
participant ZapierApp as FTC Zapier App
participant FTC as FTC API (v1/zapier/*)
participant DB as PostgreSQL
Zapier->>ZapierApp: Request monitors dropdown
ZapierApp->>FTC: GET /api/v1/zapier/monitors
FTC->>DB: SELECT monitors for user
DB-->>FTC: [{ id, name, url, active }]
FTC-->>ZapierApp: monitor list (for dropdown)
Zapier->>ZapierApp: Request sample trigger data
ZapierApp->>FTC: GET /api/v1/zapier/changes?monitorId=X&limit=3
FTC->>DB: Query monitor_changes
DB-->>FTC: [{ oldValue, newValue, detectedAt, ... }]
FTC-->>ZapierApp: sample payloads
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Security note: SSRF protections are added in subscribe endpoints and should be carefully reviewed for completeness (allowlist/regex, DNS/TCP blocking, and handling of redirects). 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Add Zapier REST Hooks integration and Make webhook documentation so Power-tier users can connect FetchTheChange change events to thousands of external apps without running a server. Zapier subscribes/unsubscribes programmatically via new API endpoints; FTC delivers to registered hookUrls when changes fire. Make works via FTC's existing webhook system with a new dedicated docs page.
Changes
Backend — automation subscriptions
automation_subscriptionstable (shared/schema.ts) with userId, platform, hookUrl, nullable monitorId, active flag, timestamps, and indexesserver/storage.ts)AUTOMATION_SUBSCRIPTION_LIMITS.maxPerUser = 25inshared/models/auth.tsensureAutomationSubscriptionsTable()with unique partial dedup index (server/services/ensureTables.ts)deleteMonitortransactionBackend — delivery service
deliverToAutomationSubscriptions()inserver/services/automationDelivery.ts— fans out viassrfSafeFetchwithPromise.allSettled, no HMAC header, 5s timeoutprocessChangeNotification()after conditions check, beforehasActiveChannelsgate — so Zapier fires even when all traditional channels are disabledBackend — API endpoints
POST /api/v1/zapier/subscribe— SSRF check, subscription limit, monitor ownership, dedupDELETE /api/v1/zapier/unsubscribe— accepts id from body or query param (proxy fallback)GET /api/v1/zapier/monitors— monitor list for Zapier input dropdownGET /api/v1/zapier/changes— polling fallback for Zap testing (3 most recent)shared/routes.ts)Zapier CLI app
integrations/zapier/project:package.json,index.js,authentication.js,triggers/monitorChanged.js,README.mdFrontend — documentation pages
/docs/zapier— setup guide, payload reference, example Zap recipes, troubleshooting/docs/make— step-by-step webhook setup with Make's Custom Webhook module/docs/webhooksand/developerintegration guides sectionFrontend — downstream surfaces
Tests
server/services/automationDelivery.test.ts— 8 tests: success/failure delivery, parallel fan-out, no HMAC header, console.log on successshared/zapierSchemas.test.ts— 14 tests for Zod schema validationTier gating
apiKeyAuthmiddlewareSecurity hardening
isPrivateUrl) + at delivery time (ssrfSafeFetch)X-FTC-Signature-256header sent to Zapier hookUrlsHow to test
curl -X POST /api/v1/zapier/subscribe -H "Authorization: Bearer <key>" -H "Content-Type: application/json" -d '{"hookUrl":"https://webhook.site/your-id"}'→ 201 with subscription idcurl -X DELETE /api/v1/zapier/unsubscribe -H "Authorization: Bearer <key>" -H "Content-Type: application/json" -d '{"id":1}'→ 204/docs/zapierlogged out → page renders/docs/makelogged out → page renders/pricing→ "Zapier integration" in Power column only/support→ "Zapier & Make" section with 6 itemsnpm run check && npm run test && npm run build→ all passhttps://claude.ai/code/session_01H4nfFd3LdtiMvS7UUNrsNB
Summary by CodeRabbit
New Features
Documentation