Automate birthday discount emails for e-commerce using Google Sheets and Gmail
Needs changesNeeds changes. This template uses 1 thing(s) that n8n 3.0 removes: Function (legacy). 1 breaking item(s) found. Static check, last run 2026-10-19.
What this workflow does
This workflow has 5 nodes and runs on a schedule (every day). Along the way it connects Google Sheets and Gmail.
How it runs
Trigger: On a schedule (every day).
- Get Customer Data (Google Sheets): get many
- Is It Their Birthday? (If): checks a condition and branches into true / false
- Generate Discount Code (Function): runs custom JavaScript (legacy Function node)
- Send Birthday Email (Gmail): uses Gmail
Services it uses
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- Function (legacy) in Generate Discount Code: replace with Code node, mode 'Run Once for All Items'.
| Removed in 3.0 | Replace with |
|---|---|
| Function (legacy) Generate Discount Code | Code node, mode 'Run Once for All Items' |
Nodes used (5)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Google Sheets
n8n-nodes-base.googleSheets - If
n8n-nodes-base.if - Function
n8n-nodes-base.function - Gmail
n8n-nodes-base.gmail
From the author
⚙ How It Works & Setup Steps: Automated Birthday Discount --- How It Works This workflow is a powerful yet simple automation to delight your customers on their birthdays. It runs every day on a schedule you define and automatically pulls data from your…