Templates / Upload documents with validation, deduplication and Postgres storage

Upload documents with validation, deduplication and Postgres storage

Ready for 3.0

by ResilNext ✓ · 70 views · created 2026-03-23 · Document Extraction

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This workflow has 12 nodes and runs when someone submits an n8n form (“Tax Document Upload”) (plus 1 other trigger). Along the way it connects Postgres.

How it runs

Trigger: When someone submits an n8n form (“Tax Document Upload”) (plus 1 other trigger).

  1. Workflow Configuration (Edit Fields (Set)): sets 3 fields: maxFileSizeMB, allowedMimeTypes, storageBasePath
  2. Check File Size (If): checks a condition and branches into true / false
  3. Check MIME Type (If): checks a condition and branches into true / false
  4. Return Validation Error (Edit Fields (Set)): sets 4 fields: status, message, allowed_types…
  5. Generate Document Metadata (Code): runs custom JavaScript code
  6. Check for Duplicate (Postgres): run a query
  7. Is Duplicate? (If): checks a condition and branches into true / false
  8. Return Duplicate Response (Edit Fields (Set)): sets 3 fields: status, message, existing_document_id
  9. Insert Document Record (Postgres): run a query
  10. Return Success Response (Edit Fields (Set)): sets 3 fields: status, message, document_id

Services it uses

Postgres

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 (6)

From the author

Overview This workflow provides a reliable and secure system for uploading and managing documents. It accepts files via form or webhook, validates file size and type, generates unique metadata, detects duplicates using file hashing, and stores records in…

Excerpt from ResilNext's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.