Blog · · 7 min read
How to win back inactive customers with n8n and AI (no coding)
A step-by-step guide so n8n finds the customers who haven't come back in a while every week, AI writes each one a short personal email, and you see who returns. No code.

Winning a new customer costs far more than bringing back one who already knows you. Yet almost every small business has a long list of people who came two or three times and then vanished. They didn't leave angry. They forgot, their routine changed, or nobody ever wrote to them again.
In this guide you'll build an n8n workflow that checks your customer sheet every Monday, finds the people who've been away too long, asks AI for a short, personal email for each of them, saves it for you to review (or sends it), and logs who was contacted so you never overdo it. You set the tone and the pace; n8n makes sure nobody slips through the cracks.
If you already send a satisfaction survey after every job, this is the natural next step: the survey looks after the customer who just visited, and the win-back flow recovers the one who stopped coming.
What you'll build
One weekly workflow:
- A Schedule Trigger on Monday mornings.
- Google Sheets reads your customer list.
- A Filter node keeps only inactive customers you're allowed to contact.
- A Limit node caps the list at a manageable number per week.
- A Basic LLM Chain writes the subject and body of each email.
- Gmail creates a draft (or sends it, once you trust the workflow).
- Google Sheets stamps the contact date on the customer's row.
What you need
- An n8n instance (cloud or self-hosted).
- Gmail and Google Sheets connected to n8n with OAuth2.
- An API key from an AI provider with a spending limit set.
- A "Customers" sheet with columns
id,name,email,last_visit(YYYY-MM-DD),usual_service,visits,unsubscribedandlast_contacted. - A link to book or order: your booking calendar, your online store or, at the very least, your WhatsApp.
The one thing that matters most is keeping last_visit up to date. If you already log sales or appointments in another sheet, add a Google Sheets (Update Row) step at the end of that workflow to refresh this column. Without it, the workflow can't tell who's missing.
Step 1: decide what "inactive" means for you
There's no universal number. Think about how often a typical customer comes back:
- Hair salon or beauty studio: every 4–8 weeks. Inactive after 75–90 days.
- Physio or dental clinic: depends on the treatment; check-ups every 6 months. Inactive after 7–8 months.
- Restaurant or café with regulars: inactive after 45–60 days.
- Online store: take the average time between two orders from the same customer and double it.
Start with a simple rule, such as 90 days without a visit and at least 2 visits in total. Someone who came only once is a different case, better served by a new client welcome and onboarding email.
Step 2: read the sheet every Monday
Create a new workflow with a weekly Schedule Trigger, Mondays at 9:00. Then add Google Sheets (Get Row(s)) on the "Customers" sheet with no filters; you'll filter in the next step, where you have more control.
Why weekly instead of daily? You review the drafts in one sitting, and the volume stays low and predictable.
Step 3: filter who to write to
Add a Filter node with these conditions, all required (AND):
last_visitolder than 90 days. On the left use an expression like{{ DateTime.fromISO($json.last_visit) < $now.minus({ days: 90 }) }}and check it is true.visitsgreater than or equal to 2.unsubscribedis empty.emailis not empty.last_contactedempty or older than 120 days, with a similar expression. This is the rule that keeps you from being annoying: at most one win-back email every four months per person.
Then a Limit node with a maximum of 15–20 customers per week. You won't fire off a hundred emails at once from your Gmail account, AI spend stays capped, and if people reply you have time to look after them properly.
Step 4: AI writes a short, human email
Connect a Basic LLM Chain with a prompt like this:
You work at a small business called [BUSINESS NAME], a [TYPE OF BUSINESS]. Write a short email to a customer who hasn't been in for a while. Data: name {{ $json.name }}, usual service {{ $json.usual_service }}, last visit {{ $json.last_visit }}. Rules: warm, natural, friendly tone; 80 words maximum; no guilt-tripping, no drama and no over-the-top "we miss you"; mention their usual service; end with a single clear invitation to book at [LINK]; don't invent offers, discounts or news that aren't listed here: [REAL NEWS OR "none"]. Reply only with JSON: {"subject": 7 words maximum, "body": email text}.
Turn on Require Specific Output Format with a Structured Output Parser so both fields always come back. Fill in the placeholders with real details. The no-invented-offers rule matters: if the AI promises a 20% discount that doesn't exist, you're the one dealing with it at the counter.
Always append a fixed line outside the AI, with an Edit Fields (Set) node that joins it to the body: "If you'd rather not hear from us, just reply STOP." That way it never depends on the model.
Step 5: drafts first, sending later
Use Gmail with the Create Draft operation, the customer's email as recipient and the AI's subject and body. For the first few weeks, review the drafts on Monday and send them yourself. Fix anything that sounds off and tweak the prompt.
Once you've gone several weeks barely touching anything, switch the operation to Send if you like. Send from your normal address, not a "noreply": plenty of replies will be along the lines of "good point, any slots on Thursday?", and you want to see them.
If you've already set up AI email reply drafts in Gmail, those replies will flow straight into it.
Step 6: log the contact and measure who returns
Finish with Google Sheets (Update Row), matching on id, to write today's date in last_contacted. That's what powers the 120-day rule in step 3.
To know whether it works, add a came_back column. When a contacted customer books or buys again and their last_visit updates, tick it. After two or three months, count how many contacted customers returned. That number, not a hunch, tells you whether to adjust the threshold, the message or the send day.
For opt-outs, keep it simple: when someone replies STOP, write "yes" in unsubscribed. To automate it, a Gmail Trigger watching for replies with that word can update the row for you.
Test it without bothering anyone
- Duplicate the sheet and keep five test rows with your own email (or aliases like
you+1@gmail.com). - Use varied dates: two older than 90 days, one at 30 days, one with
unsubscribed= yes and one withlast_contactedlast week. - Run the workflow manually. You should get exactly two drafts.
- Read them: do they sound like you? Do they mention the right service? Do they include the link and the opt-out line?
- Run it again. This time you should get none, because
last_contactedis now filled in. - Once everything checks out, point the workflow at the real sheet, keep Gmail on drafts and activate it.
Ideas to go further
- WhatsApp instead of email: if your customers live on WhatsApp, you can send the message through the official API. Note that Meta requires approved message templates when you start the conversation; check its rules first. The groundwork is in the guide to connecting WhatsApp Cloud API to n8n.
- Direct booking link: if you take bookings with Google Calendar and n8n, the email can point to that flow and the new appointment can update
last_visitautomatically. - Segments: one prompt for your most loyal customers (warmer) and another for people with two or three visits.
Cost and limits
- Cost: one short AI call per contacted customer. At 15–20 a week it's very little; check current pricing for your AI provider and n8n.
- Legal: email marketing rules depend on where you and your customers are. In the EU and UK, the "soft opt-in" generally lets you email existing customers about similar products or services if you offered an opt-out when you collected their details and every email includes an easy way to unsubscribe. If that doesn't fit your case, or you're unsure, ask for consent or get advice. Mention it in your privacy policy.
- Gmail limits: personal accounts have a daily sending cap. The Limit node keeps you far below it, but don't use this for mass campaigns; that's what email marketing tools are for.
- AI writes, you decide: the workflow makes sure you don't forget anyone. If a customer stopped coming after a bad experience, an automated email won't fix it; a phone call might.
Start with ready-made templates
If you'd rather skip the basic n8n and AI setup, download the WhatsApp agent for free or check out the AgentKiosk pack: 8 ready-to-import agents, including a bookings agent with Google Calendar. You build this win-back workflow next to it with the steps above, and they fit together: the email invites customers back and the bookings agent takes the appointment.


