Templates / Daily Postgres table backup to GitHub in CSV format

Daily Postgres table backup to GitHub in CSV format

Needs changes

by Jay Emp0 ✓ · 663 views · created 2025-08-15 · DevOps, Multimodal AI

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: Item Lists (legacy). 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 12 nodes and runs on a schedule (every 24 hours). Along the way it connects Postgres and GitHub.

How it runs

Trigger: On a schedule (every 24 hours).

  1. List files from repository [GITHUB] (GitHub): list (file)
  2. Combine file names [GITHUB] (Item Lists): reshapes item lists (legacy Item Lists node)
  3. List tables (Postgres): select
  4. Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
  5. Split to single items (Loop Over Items (Split in Batches)): loops over the items in batches
  6. Code: runs custom JavaScript code
  7. Check if file exists in repository (If): checks a condition and branches into true / false
  8. List tables (Postgres): select
  9. Update file [GITHUB] (GitHub): edit (file)
  10. Upload file [GITHUB] (GitHub): work with file

…plus 1 more step. See the full node list below.

Services it uses

PostgresGitHub

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • Item Lists (legacy) in Combine file names [GITHUB]: replace with Split Out, Aggregate, Sort, Limit, Remove Duplicates or Summarize (match the operation used).
Removed in 3.0Replace with
Item Lists (legacy)
Combine file names [GITHUB]
Split Out, Aggregate, Sort, Limit, Remove Duplicates or Summarize (match the operation used)

Nodes used (8)

From the author

This workflow automatically backs up all public Postgres tables into a GitHub repository as CSV files every 24 hours. It ensures your database snapshots are always up to date updating existing files if data changes, or creating new backups for new tables. How…

Excerpt from Jay Emp0'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.