Published 4 days ago
-- 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 --
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 |
If you want to import a custom csv file, please refer to the following methods.
SQL Commands:
https://www.postgresql.org/docs/current/sql-createtable.html
Upload csv file to N8N server and make sure it can be read.