n8n

How to Automate Gmail and Sheets Churn Win Back?

Bring at risk customers back without manual work. This setup checks your customer sheet every day, finds people likely to churn, and emails a tailored offer that fits their interests. It suits retention and growth teams that want daily action from simple data.

A schedule starts the run once per day. Customer rows are read from Google Sheets, then a filter keeps only records with a churn score above 0.7 and no past campaign date. If none match, a not found status with a timestamp is saved to a system log sheet. If matches exist, the flow loops through each person, asks Google Gemini to generate an offer with title, type, and details, parses the result as clean JSON, writes the action to the log, then sends the email through Gmail.

You need a sheet with fields like customer id, email, churn score, preferred categories, and created campaign date. Connect Google Sheets, Gmail, and Google Gemini in n8n, set the document and sheet names, and adjust the score rule if needed. Most teams cut daily review from hours to minutes and see faster outreach to save renewals, subscriptions, and loyalty members.

What are the key features?

  • Daily schedule checks your data without manual clicks
  • Reads customer rows from Google Sheets as the single source of truth
  • Filters only high churn score records with no previous campaign date
  • Handles no match days by writing a not found status to a log sheet
  • Processes customers in batches to manage large lists
  • Generates a personalized offer with Google Gemini using customer fields
  • Parses AI output into clean JSON with title, type, value, and details
  • Sends the email through Gmail using the parsed subject and message
  • Logs every action to a system log for audit and reporting
  • Loops until all eligible customers are processed

What are the benefits?

  • Reduce manual review from 2 hours to 10 minutes each day
  • Automate 100 percent of at risk outreach with daily runs
  • Improve message accuracy with structured JSON parsing for subject and body
  • Connect Google Sheets, Google Gemini, and Gmail in one flow
  • Track every run with a system log of dates, actions, and customer ids
  • Scale to thousands of contacts using batch processing
  • Avoid duplicate outreach by skipping rows with a past campaign date

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Google Sheets, Gmail and Google Gemini. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, set up Google Sheets. Double click the Google Sheets nodes, choose Credential to connect with, click Create new credential, then follow the on screen steps to approve OAuth in your Google account. Give it a clear name like Google Sheets Retention.
  4. Set up Gmail. Double click the Gmail node, create a new OAuth credential, and allow send email permissions. Use a sender mailbox that customers can reply to.
  5. Set up Google Gemini. Double click the LLM node, create a new Google Gemini or PaLM API credential, and paste your API key from the official API page. Name it clearly so teammates can find it later.
  6. Configure the customer data source. In the Google Sheets read node, pick your spreadsheet and the Customer Data sheet. Confirm columns exist for customer_id, user_mail, predicted_churn_score, preferred_categories, and created_campaign_date.
  7. Configure the system log. In the Google Sheets log node, select the same spreadsheet and the SYSTEM_LOG sheet. Make sure it has at least date, system_log, and customer_id columns.
  8. Review the filter. Set the churn score threshold to 0.7 or your value, and confirm the created_campaign_date check matches your column name and empty state.
  9. Validate the AI output. Open the Output Parser node and confirm the schema fields match the prompt and the Gmail node mappings for offer_title and offer_details.
  10. Run a test. Add one sample row in the sheet, click Execute Workflow, then confirm a log entry appears and the test email arrives. Fix any missing column names or permissions if it fails.
  11. Finalize the schedule. Open the Schedule Trigger, set your desired time and time zone, save, and activate the workflow. Check Gmail and Gemini quotas to avoid rate limits.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Gmail

Sign up

No cost: Personal Gmail (Gmail API has no usage-based pricing; quotas apply)

Google Gemini

Sign up

Free tier: $0 via Gemini API; e.g., Gemini 2.5 Flash-Lite free limits 1,000 requests/day (15 RPM, 250k TPM). Paid from $0.10/1M input tokens and $0.40/1M output tokens.

Google Sheets

Sign up

Free: $0 (Google Sheets API usage has no additional cost; quota limits apply)

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.