Detect and investigate subscription revenue anomalies with Postgres and Claude
Ready for 3.0What this workflow does
This workflow has 34 nodes and runs when an HTTP POST request hits its webhook URL (plus 2 other triggers). Along the way it connects Postgres.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 2 other triggers).
- Postgres: run a query
- Postgres: run a query
- Code: runs custom JavaScript code
- HTTP - Fetch Subscriptions (HTTP Request): calls an HTTP API
- HTTP - Fetch Payments (HTTP Request): calls an HTTP API
- HTTP - Fetch Business Events (HTTP Request): calls an HTTP API
- Code: runs custom JavaScript code
- Code: runs custom JavaScript code
- Code: runs custom JavaScript code
- Merge: merges the data from its input branches
…plus 20 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (10)
- Webhook
n8n-nodes-base.webhook - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Manual Trigger
n8n-nodes-base.manualTrigger - Postgres
n8n-nodes-base.postgres - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Merge
n8n-nodes-base.merge - If
n8n-nodes-base.if - Respond to Webhook
n8n-nodes-base.respondToWebhook - No Operation, do nothing
n8n-nodes-base.noOp
From the author
Quick overview This workflow runs on a schedule, via webhook, or manually to detect subscription revenue anomalies by pulling subscription events, payments, and optional business context from external APIs, analyzing daily metrics in Postgres, investigating…