Log tamper-evident append-only audit trails with Supabase Postgres
Ready for 3.0What this workflow does
This workflow has 21 nodes and runs manually, when you click “Execute workflow” (plus 3 other triggers). Along the way it connects Postgres.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 3 other triggers).
- Set demo configuration (Edit Fields (Set)): sets 2 fields: workflow_version, demo_user
- Validate audit event (Code): runs custom JavaScript code
- Verify hash chain (Postgres): run a query
- Try to UPDATE a record (Postgres): run a query
- Try to DELETE a record (Postgres): run a query
- Create demo events (Code): runs custom JavaScript code
- Write audit event (Postgres): run a query
- Check if chain is intact (If): checks a condition and branches into true / false
- Report UPDATE was allowed (Edit Fields (Set)): sets 3 fields: control, result, next_step
- Report UPDATE was blocked (Edit Fields (Set)): sets 3 fields: control, result, database_message
…plus 6 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 (10)
- Manual Trigger
n8n-nodes-base.manualTrigger - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - Crypto
n8n-nodes-base.crypto - Execute Workflow Trigger
n8n-nodes-base.executeWorkflowTrigger - Postgres
n8n-nodes-base.postgres - If
n8n-nodes-base.if - Schedule Trigger
n8n-nodes-base.scheduleTrigger - n8n Form Trigger
n8n-nodes-base.formTrigger - No Operation, do nothing
n8n-nodes-base.noOp
From the author
Quick overview This workflow logs append-only audit events to a Supabase Postgres table with database-enforced sequencing and hash chaining, then verifies the chain integrity on demand or on a schedule, with an optional test form that confirms UPDATE and…