Templates / Send post-purchase email sequences with Postgres, Gmail and OpenAI

Send post-purchase email sequences with Postgres, Gmail and OpenAI

Ready for 3.0

by Avkash Kakdiya ✓ · 48 views · created 2026-02-10 · Lead Nurturing, AI Summarization

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-10-19.

What this workflow does

This AI workflow has 14 nodes and runs on a schedule (every 2 minutes). Along the way it connects Gmail, Postgres and OpenAI.

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. Message a model (OpenAI): uses OpenAI
  7. Wait: waits 1 days
  8. Format AI response (Code): runs custom JavaScript code
  9. Send Tips to User (Gmail): uses Gmail
  10. Wait: waits 14 days

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

Services it uses

GmailPostgresOpenAI

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 (7)

From the author

How it works This workflow automates customer communication after an order is placed. It detects new orders, sends a confirmation email, waits until delivery is completed, and then follows up with AI-generated product tips. Finally, it sends AI-powered upsell…

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.