Blog · · 4 min read
How to send automatic birthday messages to your customers with n8n and AI
Step-by-step guide to sending personalised AI birthday greetings with a small gift to your customers every day from Google Sheets and Gmail with n8n.

A birthday message is one of the few emails customers almost always open, and it doesn't feel like advertising. For a hair salon, a garage, a clinic or a small shop, it's a natural reason to remind people you exist and, with a small gift (10% off or a free coffee), win a visit that same month. The hard part is remembering who has a birthday every single day.
In this guide you'll build an n8n workflow that every morning checks your customer list in Google Sheets, finds who has a birthday today, writes a short personal greeting with AI and sends it via Gmail (or WhatsApp) with a gift code, without double-sending or messaging anyone who opted out.
What you'll build
A five-step workflow that runs on its own every day:
- Daily trigger: a Schedule Trigger node runs at 9:00.
- Read customers: the Google Sheets node reads your "Customers" sheet.
- Birthday filter: a Code node keeps only those whose birthday is today, who gave consent and who haven't been greeted this year.
- AI greeting: a Basic LLM Chain node writes a short message with the customer's name and last service.
- Send and log: Gmail sends the message and Google Sheets writes the year in the
greetedcolumn.
What you need
- An n8n instance (cloud or installed free on your computer).
- Google Sheets and Gmail connected in n8n (or WhatsApp Cloud API if your customers prefer WhatsApp).
- An OpenAI (or other AI provider) API key with a monthly spending limit set in its dashboard.
- A "Customers" sheet with these columns:
name,email,birthday(formatDD-MM, no year),last_service,consent(yes/no) andgreeted(empty).
Step 1: prepare the customer sheet
Store only the day and month: you don't need the year or age, so you collect less personal data. Ask for the date when the customer signs up (for example in your new-client welcome flow) and explain what it's for. The consent column matters: in the EU and UK you need permission to send marketing messages, and a discount code counts as one.
Step 2: trigger and read
Add a daily Schedule Trigger at 9:00 (check the workflow time zone under Settings). Connect it to Google Sheets → Get Row(s) pointing to your "Customers" sheet.
Step 3: filter today's birthdays
Add a Code node (Run Once for All Items) with this code:
const today = new Date();
const dd = String(today.getDate()).padStart(2, '0');
const mm = String(today.getMonth() + 1).padStart(2, '0');
const year = String(today.getFullYear());
return $input.all().filter(i => {
const c = i.json;
return String(c.birthday).trim() === `${dd}-${mm}`
&& String(c.consent).toLowerCase() === 'yes'
&& String(c.greeted) !== year
&& c.email;
});
If nobody has a birthday today, the node returns nothing and the workflow stops without spending a cent on AI. Tip: store 29 February birthdays as 28-02.
Step 4: write the greeting with AI
Add a Basic LLM Chain with a small, cheap model (for example gpt-4o-mini) and this prompt:
You work at [BUSINESS NAME]. Write a birthday message for {{ $json.name }},
whose last visit was for: {{ $json.last_service }}.
- Max 4 sentences, warm and natural, in English.
- Mention the gift: 10% off this month with code BDAY10.
- Don't invent facts, avoid emoji overload and ad-speak.
Return only the message text.
Mentioning the last service ("fancy another autumn colour?") is what stops it feeling like a mass mailing.
Step 5: send and mark as greeted
Connect a Gmail → Send node with the subject Happy birthday, {{ $('Code').item.json.name }}! and the AI text as the body. Then a Google Sheets → Update Row node that matches on email and writes the current year in greeted. That way, even if the workflow runs twice in a day, nobody gets two greetings.
If you use WhatsApp, remember that outside the 24-hour window Meta only allows approved templates: create a marketing template with the name as a variable.
How to test it
- Add a row with your own email, today's date in
birthdayandyesinconsent. - Run the workflow manually and check that the greeting arrives and
greetedgets filled in. - Run it again: nothing should be sent this time.
- Set
consenttonoon another test row and confirm it's skipped.
Cost and best practices
- Cost: each greeting costs less than a tenth of a cent in AI API usage. With 500 customers that's fewer than 2 messages a day.
- Measure results: use a dedicated discount code (BDAY10) to see how many visits it brings. You can track it in your daily AI summary report.
- Get error alerts: set up an error workflow so you hear if Gmail or the sheet fails, as covered in n8n error handling.
- Combine it with your campaign to win back inactive customers: a birthday is the perfect moment to bring back someone you haven't seen in months.
Start with ready-to-import templates
If you want your customer-service base in n8n already built, download the free WhatsApp agent or check out the full AgentKiosk pack: 8 tested agents in English and Spanish, each with workflow, prompt and guide, ready to import and pair with this automatic birthday flow.


