Send SMS alerts based on database queries Twilio and Postgres
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 bl...
🔌 Nodes & Integrations Used (3)
📖 Implementation & Setup Guide
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](https://blog.n8n.io/database-monitoring-and-alerting-with-n8n/).
Prerequisites
- A Postgres database set up and [credentials](https://docs.n8n.io/integrations/credentials/postgres/)
- A Twilio account and [credentials](https://docs.n8n.io/integrations/credentials/twilio/)
Nodes
- [Cron node](https://docs.n8n.io/integrations/core-nodes/n8n-nodes-base.cron/) triggers the workflow every minute, so the database is queried at regular intervals.
- [Postgres nodes](https://docs.n8n.io/integrations/nodes/n8n-nodes-base.postgres/) extract values from, and update values in the database.
- [Twilio node](https://docs.n8n.io/integrations/nodes/n8n-nodes-base.twilio/) sends an alert SMS about the outlier reading to a specified phone number.
- [Set node](https://docs.n8n.io/integrations/core-nodes/n8n-nodes-base.set/) sets the notification value to *true*.
⚡ How to import this workflow into n8n:
- Click the Direct Download JSON button above to save
Send_SMS_alerts_based_on_database_queries_Twilio_and_Postgres_.json. - Log in to your n8n Cloud or self-hosted n8n instance.
- In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
- Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
- Click Execute Workflow to test and switch to Active!
Related Social Media & Content Workflows
View All in Social Media & Content →AI Auto-Tagging for WordPress Posts
Production-ready n8n automation template for AI Auto-Tagging for WordPress Posts built by AhiXLight. Seamlessly connects Lm Chat Open Ai, Output Parser Autofixing, Output Parser Structured with 32 configured nodes.
AI Auto-Tagging for WordPress Posts
Production-ready n8n automation template for AI Auto-Tagging for WordPress Posts built by AhiXLight. Seamlessly connects Lm Chat Open Ai, Output Parser Autofixing, Output Parser Structured with 32 configured nodes.
AI Image Caption Generator Overlay
Production-ready n8n automation template for AI Image Caption Generator Overlay built by AhiXLight. Seamlessly connects Lm Chat Google Gemini, Output Parser Structured, Edit Image with 16 configured nodes.
AI Image Caption Generator with Overlay
Production-ready n8n automation template for AI Image Caption Generator with Overlay built by AhiXLight. Seamlessly connects Lm Chat Google Gemini, Output Parser Structured, Edit Image with 16 configured nodes.