Templates / Generate and insert data into a Postgres database

Generate and insert data into a Postgres database

Needs changes

by tanaypant ✓ · 6,932 views · created 2020-05-05 · Engineering

Needs changes. This template uses 2 thing(s) that n8n 3.0 removes: Cron, Function (legacy). 2 breaking item(s) found. Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What this workflow does

This workflow has 3 nodes and runs on a schedule (legacy Cron node). Along the way it connects Postgres.

How it runs

Trigger: On a schedule (legacy Cron node).

  1. Function: runs custom JavaScript (legacy Function node)
  2. Postgres: uses Postgres

Services it uses

Postgres

Before you upgrade to n8n 3.0

2 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:

  • Cron: replace with Schedule Trigger.
  • Function (legacy) in Function: replace with Code node, mode 'Run Once for All Items'.

Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).

Published 2020 — 25% of templates published before 2025 need changes for 3.0. See how template age affects 3.0 readiness →

Removed in 3.0Replace with
Cron
Cron
Schedule Trigger
Function (legacy)
Function
Code node, mode 'Run Once for All Items'

Nodes used (3)

From the author

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…

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