Templates / Send SMS alerts based on database queries (Twilio and Postgres)

Send SMS alerts based on database queries (Twilio and Postgres)

Needs changes

by tanaypant ✓ · 3,386 views · created 2020-05-05 · DevOps

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: Cron. 1 breaking item(s) found. Static check, last run 2026-10-19.

What this workflow does

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

How it runs

Trigger: On a schedule (legacy Cron node).

  1. Postgres: run a query
  2. Twilio: uses Twilio
  3. Set (Edit Fields (Set)): sets or maps fields
  4. Postgres: update

Services it uses

PostgresTwilio

Before you upgrade to n8n 3.0

1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:

  • Cron: replace with Schedule Trigger.
Removed in 3.0Replace with
Cron
Cron
Schedule Trigger

Nodes used (4)

From the author

This workflow automatically queries a Postgres database to find outlier readings for which SMS notifications have not been sent. This is Workflow 2 in the blog tutorial Database activity monitoring and alerting. Prerequisites - A Postgres database set up and…

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.