PostgreSQL Delete then Insert

Hey guys - brand new to n8n. Great tool!

I’m building an ETL, and my first workflow I wanted to do the following:

(1) Read Google Sheet -> (2) Delete staging table in PostgreSQL DB -> (3) Insert data (from Google Sheet) into the staging table.

But, I can’t seem to get access to the data from step (1) in step (3).

I do have a workaround by doing the delete first, then export from Google Sheets, and finally importing into the staging table - but, I was wondering if my original workflow would be possible?

Welcome to the community @go4cas!

If you need the data from step 1 you can simply use a Merge-Node and set it to “Pass through”. As input you would use the data from step 1 and 2.

1 Like