Build an AI-powered SMS support system with Twilio, GPT-4 and PostgreSQL
Needs changesWhat this workflow does
This workflow has 40 nodes and runs when an HTTP POST request hits its webhook URL (plus 3 other triggers). Along the way it connects Postgres, Gmail and AWS S3.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 3 other triggers).
- Generate Verification Code (Code): runs custom JavaScript code
- Extract Verification Data (Code): runs custom JavaScript code
- Extract SMS Data (Code): runs custom JavaScript code
- Find Inactive Sessions (Postgres): select
- Store Verification (Postgres): uses Postgres
- Check Verification (Postgres): select
- Find User Session (Postgres): select
- 🤖 AI Personalized Reminder (OpenAI): uses OpenAI
- Send Verification SMS (Twilio API) (HTTP Request): calls an HTTP API
- Validate Code (Switch): routes items into 2 branches
…plus 26 more steps. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
2 things in this workflow are removed in n8n 3.0. Fix them before you upgrade:
- OpenAI (legacy) in 🤖 AI Sentiment Analysis, 🤖 AI Intake Enrichment, 🤖 AI Response Generator…: replace with OpenAI node (AI section).
- Cron in Follow-Up Cron (24h): replace with Schedule Trigger.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| OpenAI (legacy) 🤖 AI Sentiment Analysis, 🤖 AI Intake Enrichment, 🤖 AI Response Generator, 🤖 AI Personalized Closeout, 🤖 AI Personalized Reminder | OpenAI node (AI section) |
| Cron Follow-Up Cron (24h) | Schedule Trigger |
Nodes used (10)
- Postgres
n8n-nodes-base.postgres - HTTP Request
n8n-nodes-base.httpRequest - Switch
n8n-nodes-base.switch - Code
n8n-nodes-base.code - Respond to Webhook
n8n-nodes-base.respondToWebhook - Webhook
n8n-nodes-base.webhook - OpenAI
n8n-nodes-base.openAi - Gmail
n8n-nodes-base.gmail - AWS S3
n8n-nodes-base.awsS3 - Cron
n8n-nodes-base.cron
From the author
How it works 1. User Signup & Verification: The workflow starts when a user signs up. It generates a verification code and sends it via SMS using Twilio. 2. Code Validation: The user replies with the code. The workflow checks the code and, if valid, creates a…