Send post-purchase emails from Postgres with Gmail and Groq AI
Ready for 3.0What this workflow does
This AI workflow has 16 nodes and runs on a schedule (every 2 minutes). Along the way it connects Gmail, Postgres and Groq Chat Model.
How it runs
Trigger: On a schedule (every 2 minutes).
- Execute a SQL query (Postgres): run a query
- Order Placed Ack. (Gmail): uses Gmail
- Wait: waits 7 days
- Select rows from a table (Postgres): select
- If: checks a condition and branches into true / false
- Wait: waits 1 days
- Get Product Usage Tips (AI Agent): runs an AI agent
- Groq Chat Model: uses Groq Chat Model
- Format AI response (Code): runs custom JavaScript code
- Send Tips to User (Gmail): uses Gmail
…plus 5 more steps. See the full node list below.
Services it uses
Other Groq + Gmail templates (125) · Other Gmail + PostgreSQL templates (82) · Other PostgreSQL + Groq templates (9)
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 (8)
- Wait
n8n-nodes-base.wait - Code
n8n-nodes-base.code - Gmail
n8n-nodes-base.gmail - AI Agent
@n8n/n8n-nodes-langchain.agent - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Postgres
n8n-nodes-base.postgres - If
n8n-nodes-base.if - Groq Chat Model
@n8n/n8n-nodes-langchain.lmChatGroq
From the author
How it works This workflow monitors new orders from a Postgres database and sends a confirmation email instantly. It then waits until the expected delivery time and continuously checks the delivery status. Once delivered, it uses AI to generate product usage…