Monitor customer risk and AI feedback using PostgreSQL, Gmail and Discord
Ready for 3.0What this workflow does
This workflow has 23 nodes and runs on a schedule (every day) (plus 1 other trigger). Along the way it connects Google Sheets, Gmail, Postgres and Discord. It also calls api.groq.com over HTTP.
How it runs
Trigger: On a schedule (every day) (plus 1 other trigger).
- Edit Fields (Edit Fields (Set)): sets 1 field: isDaily
- Edit Fields (Edit Fields (Set)): sets 1 field: isWeekly
- Switch: routes items into 2 branches
- Fetch Customer Risk Data (Postgres): run a query
- Get row(s) in sheet (Google Sheets): uses Google Sheets
- Is High Risk Customer? (If): checks a condition and branches into true / false
- Loop Over Items (Loop Over Items (Split in Batches)): loops over the items in batches
- Prepare Escalation Summary For Low Risk User (Edit Fields (Set)): sets 9 fields: customer_id, customer_name, email…
- Prepare Escalation Summary For High Risk User (Edit Fields (Set)): sets 9 fields: customer_id, customer_name, email…
- Merge: merges the data from its input branches
…plus 11 more steps. See the full node list below.
Services it uses
HTTP calls to: api.groq.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (13)
- Google Sheets
n8n-nodes-base.googleSheets - HTTP Request
n8n-nodes-base.httpRequest - Code
n8n-nodes-base.code - Gmail
n8n-nodes-base.gmail - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Merge
n8n-nodes-base.merge - Wait
n8n-nodes-base.wait - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Switch
n8n-nodes-base.switch - Postgres
n8n-nodes-base.postgres - If
n8n-nodes-base.if - Discord
n8n-nodes-base.discord
From the author
How it works This workflow monitors customer health by combining payment behavior, complaint signals, and AI-driven feedback analysis. It runs on daily and weekly schedules to evaluate risk levels, escalate high-risk customers, and generate structured product…