🔓 Unlock all 10,000+ workflows & prompts free Join Newsletter →
✅ Full access unlocked — explore all 10,000 AI workflow and prompt templates Browse Templates →
Home n8n Workflow
January 22, 2026

Google Sheets + Gmail: retention digests that get read

Lisa Granqvist Partner Workflow Automation Expert

Your retention data is probably “somewhere in a sheet,” and the weekly update is probably “someone’s Friday problem.” Then it turns into copy-paste reporting, vague takeaways, and a hiring team that skims (or ignores) the one email that actually matters.

HR managers feel it when leaders ask, “So what changed?” and there’s no clean answer. A recruiting lead gets stuck translating messy trait notes into something actionable. And founders end up making job description changes based on gut feel. This retention digest automation turns your Google Sheets data into an email people will actually read.

Below you’ll see exactly how the workflow pulls candidate records, merges them with trait-level retention stats, scores candidates, then generates a polished HTML digest via Azure OpenAI and sends it through Gmail.

How This Automation Works

The full n8n workflow, from trigger to final output:

n8n Workflow Template: Google Sheets + Gmail: retention digests that get read

The Problem: Retention insights get lost in the spreadsheet

Most retention reporting fails in a quiet way. The data exists, but it’s split across tabs, updated inconsistently, and summarized differently depending on who’s writing the email that week. Candidate notes live in one sheet. Trait performance lives in another. The “so what” lives in someone’s head. Then a hiring manager gets a wall of numbers, or a vague paragraph, and the decision-making goes right back to instincts. Meanwhile, you’re doing the same cleanup every week and still worrying you missed something important.

It adds up fast. Here’s where it breaks down in real teams.

  • Weekly retention updates take about 2 hours because the story has to be rebuilt from scratch each time.
  • Trait-level retention stats don’t naturally connect to individual candidate outcomes, so “patterns” are mostly guesswork.
  • Manual summaries drift in quality, which means leaders stop trusting them and stop reading them.
  • When something is missing in the data, you find out late, after the email goes out or never goes out at all.

The Solution: A scored, AI-written retention digest sent weekly

This workflow turns two Google Sheets into one consistent retention narrative, delivered as a formatted Gmail HTML email. You start with candidate-level records in a “Hires Tracking” sheet (name, role, traits, start date, retention status). In a second sheet, you keep a trait-level “Retention Summary” (hires, stayed, left, retention rate, and any weight adjustments). When you run the workflow, n8n pulls both datasets, merges them, and normalizes the messy parts so the scoring is fair and repeatable. Then Azure OpenAI (gpt-4o-mini) generates a structured Retention Digest: a TL;DR, top traits, weak traits, candidate highlights with scores, plus job description refinement tips. Finally, Gmail sends it to your hiring managers with a clear subject line, so it doesn’t get buried.

The workflow begins with a manual trigger (so you control when the digest runs). It fetches candidates and trait stats from Google Sheets, calculates a Candidate_Score, validates that both datasets exist, and only then generates the HTML digest through Azure OpenAI. If something’s missing, it logs the issue to an Error Log sheet instead of quietly sending a broken email.

What You Get: Automation vs. Results

Example: What This Looks Like

Say you review 25 hires each week and you maintain 15 trait metrics in a separate summary tab. Manually, it’s common to spend about 3 minutes per hire to clean traits and status, plus another 30 minutes building a readable email. That’s roughly 2 hours, and the “insight” still depends on whoever wrote it. With this workflow, you trigger the run in under a minute, the scoring and AI generation usually finishes in a few minutes, and the HTML digest lands in Gmail ready to forward. You get the same output, every week, without rebuilding it.

What You’ll Need

  • n8n instance (try n8n Cloud free)
  • Self-hosting option if you prefer (Hostinger works well)
  • Google Sheets to store hires, traits, and error logs.
  • Gmail to deliver the retention digest to managers.
  • Azure OpenAI API access (get it from Azure AI Foundry / Azure Portal)

Skill level: Intermediate. You’ll connect credentials, confirm sheet columns match expectations, and adjust one or two prompts/fields for your org.

Don’t want to set this up yourself? Talk to an automation expert (free 15-minute consultation).

How It Works

Manual run starts the week’s digest. You trigger the workflow when you’re ready, which is useful if your sheets are updated at different times on different days.

Google Sheets data is pulled from two sources. n8n fetches candidate-level records from your Hires Tracking sheet and trait-level retention stats from your Retention Summary sheet.

Scoring and cleanup happens before AI touches anything. A code step standardizes fields, builds a trait-to-weight map, and calculates Candidate_Score so the digest is based on the same logic every run.

Validation protects your inbox reputation. If required datasets are missing, the workflow writes a record to an Error Log sheet instead of sending a half-empty email. If the data checks out, Azure OpenAI generates a structured HTML digest and Gmail delivers it with the weekly subject line.

You can easily modify the scoring weights to reflect your hiring priorities, or adjust the digest sections to match how your managers prefer to review retention.

Step-by-Step Implementation Guide

Step 1: Configure the Manual Trigger

This workflow starts manually and immediately fans out to pull two datasets in parallel.

  1. Add and open Manual Run Trigger to confirm it is the workflow entry point.
  2. Connect Manual Run Trigger so it outputs to both Fetch Candidate Records and Retrieve Trait Summary in parallel.

Parallel execution is required: Manual Run Trigger outputs to both Fetch Candidate Records and Retrieve Trait Summary in parallel.

Step 2: Connect Google Sheets

Both data inputs and the error log rely on Google Sheets. Configure each sheet source with the exact document and sheet IDs shown.

  1. Open Fetch Candidate Records and set Document to [YOUR_ID] and Sheet to Retention Summary).
  2. In Fetch Candidate Records, set Credential Required: Connect your googleSheetsOAuth2Api credentials.
  3. Open Retrieve Trait Summary and set Document to [YOUR_ID] and Sheet to Hires Tracking.
  4. In Retrieve Trait Summary, set Credential Required: Connect your googleSheetsOAuth2Api credentials.
  5. Open Log Processing Errors and set Operation to append, Document to [YOUR_ID], and Sheet to error log sheet.
  6. In Log Processing Errors, set Credential Required: Connect your googleSheetsOAuth2Api credentials.

⚠️ Common Pitfall: The two input sheets must contain the fields referenced in Normalize & Score Candidates, including Trait, Retention_%, and Candidate (including spacing variants).

Step 3: Set Up Data Merge and Scoring

Merge both sheets into one stream, then normalize and calculate candidate scores in code.

  1. Connect Fetch Candidate Records and Retrieve Trait Summary into Combine Candidate Traits so both datasets are merged.
  2. Open Normalize & Score Candidates and keep the provided JavaScript Code as-is to normalize data and compute Candidate_Score.
  3. Confirm Normalize & Score Candidates outputs a single item with candidates and traits arrays.

Step 4: Configure Validation and AI Digest Generation

The dataset is validated before the AI generates the HTML retention digest.

  1. Open Validate Dataset Contents and ensure both conditions are set to greater-than checks: {{ $json.candidates.length }} > 0 and {{ $json.traits.length }} > 0.
  2. Open Generate Retention Digest and set Text to the prompt that includes {{ JSON.stringify($json, null, 2) }} and the HTML formatting requirements.
  3. In Azure AI Chat Engine, set Model to gpt-4o-mini.
  4. Credential Required: Connect your azureOpenAiApi credentials in Azure AI Chat Engine.

The AI model is attached to Generate Retention Digest via Azure AI Chat Engine—ensure credentials are added to Azure AI Chat Engine, not the chain node.

Step 5: Configure Output Email Delivery

The HTML digest is sent via Gmail using the AI output.

  1. Open Send Digest Email and set To to [YOUR_EMAIL].
  2. Set Message to Weekly Update.
  3. Set Subject to =Retention Analysis Digest - Weekly Update.
  4. Set HTML Message to ={{ $json.text }} and enable Include HTML.
  5. Credential Required: Connect your gmailOAuth2 credentials.

Step 6: Add Error Handling

When validation fails, the workflow logs the error to a Google Sheet.

  1. Confirm the false output of Validate Dataset Contents connects to Log Processing Errors.
  2. In Log Processing Errors, ensure columns include error_id and error for the append operation.

⚠️ Common Pitfall: If Validate Dataset Contents is misconfigured, valid datasets may get logged as errors instead of proceeding to Generate Retention Digest.

Step 7: Test and Activate Your Workflow

Run a manual test to confirm the parallel data pull, AI digest generation, and email delivery all succeed.

  1. Click Execute Workflow and verify Manual Run Trigger launches both Fetch Candidate Records and Retrieve Trait Summary in parallel.
  2. Check that Normalize & Score Candidates outputs a single item with populated candidates and traits arrays.
  3. Confirm Generate Retention Digest returns HTML text, and Send Digest Email delivers the message.
  4. If validation fails, confirm Log Processing Errors receives a new row.
  5. When ready for production, toggle the workflow to Active.
🔒

Unlock Full Step-by-Step Guide

Get the complete implementation guide + downloadable template

Common Gotchas

  • Google Sheets credentials can expire or lack access to a specific spreadsheet. If runs suddenly fail, check the Google connection in n8n credentials and confirm the sheet is shared with the right Google account.
  • Azure OpenAI deployments are picky about model/deployment names. If the AI step errors, verify the deployment name in your Azure OpenAI credential settings and confirm the region supports your chosen model.
  • Gmail can reject HTML that looks fine in a browser but breaks in email clients. If formatting looks off, simplify the HTML styles in the prompt and avoid heavy CSS, because Gmail strips a lot of it.

Frequently Asked Questions

How long does it take to set up this retention digest automation?

About an hour if your Google Sheets are already organized.

Do I need coding skills to automate retention digests?

No. You will connect accounts and map a few fields in Google Sheets. The scoring logic is already packaged inside the workflow.

Is n8n free to use for this retention digest automation workflow?

Yes. n8n has a free self-hosted option and a free trial on n8n Cloud. Cloud plans start at $20/month for higher volume. You’ll also need to factor in Azure OpenAI usage, which is usually low for one weekly digest.

Where can I host n8n to run this automation?

Two options: n8n Cloud (managed, easiest setup) or self-hosting on a VPS. For self-hosting, Hostinger VPS is affordable and handles n8n well. Self-hosting gives you unlimited executions but requires basic server management.

Can I customize this retention digest automation workflow for a different scoring model?

Yes, but keep it simple at first. You can adjust the trait weights and Candidate_Score rules inside the “Normalize & Score Candidates” code step, then update the prompt used by the “Generate Retention Digest” step so the email explains the score the way your team expects. Common tweaks include changing which traits are considered “top” vs “weak,” adding a section per role, and inserting your own JD language guidelines so the tips match your hiring style.

Why is my Google Sheets connection failing in this workflow?

Usually it’s an expired Google authorization or the sheet isn’t shared with the connected account. Reconnect Google Sheets in n8n, then confirm the spreadsheet ID and tab names still match. Also check that the workflow can read all required columns, because missing headers can look like a credential issue.

How many candidate records can this retention digest automation handle?

Hundreds per run is fine for most setups.

Is this retention digest automation better than using Zapier or Make?

Often, yes, if you care about scoring, validation, and reliable error handling. This workflow has multiple branches (validate vs log errors), a real scoring step, and a structured AI output, and n8n handles that complexity without turning it into a pricey chain of “tasks.” Zapier or Make can be quicker for a basic “sheet to email” flow, but once you want merging, normalization, and a repeatable scoring model, they get fiddly. n8n also gives you a self-host option, which matters if you run a lot of internal reporting. If you’re unsure, Talk to an automation expert and we’ll sanity-check your use case.

Once this is running, retention reporting stops being a weekly scramble and becomes a reliable signal. Honestly, that consistency is what gets the email read.

Need Help Setting This Up?

Our automation experts can build and customize this workflow for your specific needs. Free 15-minute consultation—no commitment required.

Lisa Granqvist

Workflow Automation Expert

Expert in workflow automation and no-code tools.

×

Use template

Get instant access to this n8n workflow Json file

💬
Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Get a free quote today!
Get a free quote today!

Tell us what you need and we'll get back to you within one working day.

Launch login modal Launch register modal