Skip to content
FlowHubFluxonLab
Postgres
PostgreSQLfree

Import CSV files from Filesystem into Postgres

by rpshuadapted from n8n official workflow galleryUpdated Aug 2026
RequiresPostgresPostgres
Share Post Share
MaOn clicking 'execute'On clicking 'ex…RBRead From FileSFConvert To SpreadsheetConvert To Spre…Postgres123
1/5
STEPS · 3
Run manually by an operator

-- Disclaimer: This template is mainly made for self-hosted users who can reach CSV files in their file system. For Cloud users, just replace the first few nodes with your file system of choice, like Google Drive or Dropbox -- How to automatically import CSV files into postgres 1、project description This workflow demonstrates how CSV file can be automatically imported into existing PostgreSQL database. Before running the workflow please make sure you have a file on the server: /tmp/t1.csv The name of the test database is db01, and you can replace it. then create table t1 create table t1(id int,name varchar(10)); And the content of the file is the following: |id|name| |-|-|-| |1|a| |2|b| |3|c| 2、Other If you want to import a custom csv file, please refer to the following methods. 2.1、Create a table in the database SQL Commands: https://www.postgresql.org/docs/current/sql-createtable.html 2.2、Upload csv file Upload csv file to N8N server and make sure it can be read.

Tags

n8nreference-onlypostgres
Connects
postgresPostgres
CategoryPostgreSQL
Triggermanual
Complexitysimple
Nodes4
AddedFeb 17, 2025

Related workflows

See all PostgreSQL
postgres
free

Insert Excel data to Postgres

Read XLS from file Convert it to JSON Insert it in Postgres

by Jan Oberhauser
postgres
free

Transfer data from Postgres to Excel

Read data from Postgres Converting it to XLS Save it to disk

by Jan Oberhauser
postgres
free

Generate and insert data into a Postgres database

This is Workflow 1 in the blog tutorial Database activity monitoring and alerting. Prerequisites A Postgres database set up and credentials. Basic knowledge of JavaScript and SQL. Nodes Cron node starts the workflow every minute. Function node generates sensor data (sensor id (preset), a randomly generated value, timestamp, and notification (preset as false) ) Postgres node inserts the data into a Postgres database. You can create the database for this workflow with the following SQL statement: CREATE TABLE n8n (id SERIAL, sensor_id VARCHAR, value INT, time_stamp TIMESTAMP, notification BOOLEAN);

by tanaypant