Templates / Send post-purchase emails from Postgres with Gmail and Groq AI

Send post-purchase emails from Postgres with Gmail and Groq AI

Ready for 3.0

by Avkash Kakdiya ✓ · 35 views · created 2026-03-18 · Lead Nurturing, Multimodal AI

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-12-01.

📬 Weekly n8n 3.0 breakage alerts, free

What 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).

  1. Execute a SQL query (Postgres): run a query
  2. Order Placed Ack. (Gmail): uses Gmail
  3. Wait: waits 7 days
  4. Select rows from a table (Postgres): select
  5. If: checks a condition and branches into true / false
  6. Wait: waits 1 days
  7. Get Product Usage Tips (AI Agent): runs an AI agent
  8. Groq Chat Model: uses Groq Chat Model
  9. Format AI response (Code): runs custom JavaScript code
  10. Send Tips to User (Gmail): uses Gmail

…plus 5 more steps. See the full node list below.

Services it uses

GmailPostgresGroq Chat Model

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)

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…

Excerpt from Avkash Kakdiya'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.