GenAiHub

Last checked 24 November 2026 — responded normally.

Generate and insert data into a Postgres database

This is Workflow 1 in the blog tutorial Database activity monitoring and alerting.

Live
Open / InstallLast updated November 24, 2026

Description

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 Schedule Trigger 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);. An n8n automation workflow template by tanaypant.

Community Metrics

Views
6,943
Avg Rating
N/A
Ratings
0
Likes
0
Comments
—

Author

tanaypant

Platform

web

Pricing model

free

Categories

  • Automation

Tags

  • n8n
  • workflow
  • postgres
  • code

Capabilities

  • 2 nodes
  • 6,943 views

Information

TypeWorkflow
Sourcen8n
AddedSeptember 3, 2026

Comments

?

Others in the same category, ranked by how often they are opened.