Data & Databases

Extract PostgreSQL data and export to CSV format

4 nodes 118 71 Automatic trigger
Download

Workflow Description

Automation that queries a PostgreSQL database and exports the results directly to a CSV file. Runs on manual trigger, enabling you to pull data snapshots whenever needed for analysis or backup purposes.

How it works

  1. 1.Manually trigger the automation workflow
  2. 2.Connect to PostgreSQL and execute the query to retrieve data
  3. 3.Map and prepare data fields for CSV format
  4. 4.Generate and save the CSV file to storage

Use cases

  • Export database records for reporting and analysis in spreadsheet applications
  • Create periodic data backups from PostgreSQL in portable CSV format

Requirements

  • Valid PostgreSQL connection credentials and database access
  • A defined SQL query specifying which data to extract

Service Value

Ready-made workflow template for automation delivery and service execution.

Apps Used

Spreadsheet File Postgres

Details

Trigger Automatic trigger
Nodes 4
Apps 2
Views 118
Downloads 71

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (4)

When clicking "Execute Workflow"

Manual Trigger

#1

Spreadsheet File

Spreadsheet File

#2

TableName

Set

#3

Postgres

Postgres

#4