Sync and validate Google Sheets records with Postgres and Slack alerts
Ready for 3.0What this workflow does
This workflow has 19 nodes and runs on a schedule (every hour) (plus 1 other trigger). Along the way it connects Google Sheets, Postgres and Slack.
How it runs
Trigger: On a schedule (every hour) (plus 1 other trigger).
- Config (Edit Fields (Set)): sets 6 fields: workflow_label, slack_channel, allowed_statuses…
- Sample run? (If): checks a condition and branches into true / false
- Sample rows (Code): runs custom JavaScript code
- Read sheet (Google Sheets): read
- Validate and clean (Code): runs custom JavaScript code
- Describe failure (Code): runs custom JavaScript code
- Read current table (Postgres): run a query
- Failure alert (Slack) (Slack): uses Slack
- Plan changes (Code): runs custom JavaScript code
- Rows to write (Code): runs custom JavaScript code
…plus 7 more steps. See the full node list below.
Services it uses
Other Google Sheets + Slack templates (1,314) · Other PostgreSQL + Slack templates (109) · Other Google Sheets + PostgreSQL templates (71)
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 (8)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - If
n8n-nodes-base.if - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - Postgres
n8n-nodes-base.postgres - Slack
n8n-nodes-base.slack
From the author
Quick overview This workflow runs hourly to sync rows from a Google Sheets tab into a Postgres table, validating and normalizing data, only upserting new or changed records, soft-deleting records missing from the sheet with a safety cap, and sending run…