Sync PostgreSQL customer changes with HubSpot, Mailchimp, and Slack
Ready for 3.0What this workflow does
This workflow has 25 nodes and runs manually, when you click “Execute workflow” (plus 2 other triggers). Along the way it connects Postgres.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 2 other triggers).
- Postgres: run a query
- Set Sync Config (Edit Fields (Set)): sets 10 fields: batchSize, leaseSeconds, maxAttempts…
- Code: runs custom JavaScript code
- Postgres: run a query
- Is Requeue Request Valid? (If): checks a condition and branches into true / false
- Events Claimed? (If): checks a condition and branches into true / false
- Postgres: run a query
- Respond - Requeue Validation Error (Respond to Webhook): sends the response back to the webhook caller
- Code: runs custom JavaScript code
- Respond - Requeue Result (Respond to Webhook): sends the response back to the webhook caller
…plus 11 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.
Nodes used (12)
- Manual Trigger
n8n-nodes-base.manualTrigger - Postgres
n8n-nodes-base.postgres - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Code
n8n-nodes-base.code - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Switch
n8n-nodes-base.switch - HTTP Request
n8n-nodes-base.httpRequest - No Operation, do nothing
n8n-nodes-base.noOp - Webhook
n8n-nodes-base.webhook - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick overview This workflow captures INSERT/UPDATE/DELETE changes from PostgreSQL via an outbox table and syncs them to HubSpot, Mailchimp, and Slack on a 1-minute schedule, with leasing, retries with exponential backoff, dead-letter alerting, and a webhook…