Templates / Postgres data freshness monitoring with email alerts

Postgres data freshness monitoring with email alerts

Ready for 3.0

by Kevin · 82 views · created 2025-07-20 · Engineering

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

Nodes used (9)

Postgres

What it does

Monitor Postgres Data Freshness and Email Alert If Stale This template monitors a set of tables inside a Postgres database to ensure they're getting updated. If the table hasn't been updated in 3 days (configurable), an email alert is sent containing the tables that are stale. Requirements You must have a Postgres database containing one or more tables that you'd like to monitor. Each table to monitor must have a date or timestamp column that tracks when data was pushed. For example, this might be: - A timestamp column if your table holds event/timeseries data - A lastupdated column if your rows are expected to be modified Usage 1. Use this template 1. Add your Postgres and email credentials 1. Adjust the Produce tables + date columns node to produce pairs of table, datecolumn that should be monitored for freshness - 💁‍♂️ Note that a timestamp column also works 1. (Optional) Adjust the Remove fresh tables node for your desired staleness window (default is 3 days, but you can adjust as you please) 1. (Optional) Customize the Send alerts node to call whichever alerting workflow you please (I recommend my alerting workflow for easiest plug-and-play) How it works This template works by: 1. Pulling the most recent row for each table 1. Calculating how out-of-date each table is, in days 1. Dropping fresh tables that have been updated within the past 3 days 1. Sending an email alert with the stale tables that haven't been updated within the past 3 days

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.