Skip to main content

Generate employee retention analytics reports with GPT-4o and Gmail digests

Workflow preview

Workflow preview
100%
Generate employee retention analytics reports with GPT-4o and Gmail digests preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Description This workflow automates employee retention analytics by combining candidate performance data with trait level retention statistics. It scores candidates, validates data, and generates a...

Best for

  • HR automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.googlesheets, n8n-nodes-base.stickynote, n8n-nodes-base.merge, n8n-nodes-base.code, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.chainllm, @n8n/n8n-nodes-langchain.lmchatazureopenai

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Rahul Joshi.

Original n8n.io source

1.1 Workflow description

Title
Generate employee retention analytics reports with GPT-4o and Gmail digests
Workflow name
Generate employee retention analytics reports with GPT-4o and Gmail digests

Description

This workflow automates employee retention analytics by combining candidate performance data with trait-level retention statistics. It scores candidates, validates data, and generates a polished Retention Digest HTML email using GPT (Azure OpenAI). Hiring managers receive structured insights weekly, highlighting top/weak traits, candidate scores, and actionable JD refinement tips.

What This Template Does (Step-by-Step)

⚡ Manual Trigger – Starts workflow execution on demand. 📑 Candidate Data Fetch (Google Sheets – Hires Tracking) – Pulls candidate-level details like name, role, traits, start date, and retention status. 📑 Trait Summary Fetch (Google Sheets – Retention Summary) – Fetches aggregated trait-level retention statistics, including hires, stayed, left, retention %, and weight adjustments. 🔀 Merge Candidate + Trait Data – Combines both datasets into a unified stream for scoring. 🧮 Candidate Scoring & Data Normalization (Code Node) –

  • Cleans and standardizes data.
  • Builds a trait → weight map.
  • Calculates each candidate’s Candidate_Score.
  • Outputs normalized JSON.
  • ✅ Data Validation (If Node) – Ensures both candidate and trait datasets are present.
  • TRUE → continues to AI digest generation.
  • FALSE → routes to error logging.
  • ⚠️ Error Handling Logic (Google Sheets – Error Log) – Logs any failed or incomplete runs into a dedicated error sheet for auditing.
  • 🧠 AI Processing Backend (Azure OpenAI) – Prepares candidate + trait data for GPT processing.
  • 🤖 Retention Digest Generator (LLM Chain) – Uses GPT (gpt-4o-mini) to create a structured HTML Retention Digest, including:
  • TL;DR summary
  • Top Traits (positive retention)
  • Weak Traits (negative retention)
  • Candidate highlights (scores & retention status)
  • 3 actionable JD refinement tips
  • 📧 Email Delivery (Gmail) – Sends the digest directly to hiring managers as a styled HTML email with subject:
  • Retention Analysis Digest – Weekly Update

Prerequisites

Google Sheets (Hires Tracking + Retention Summary + Error Log) Gmail API credentials Azure OpenAI access (gpt-4o-mini model) n8n instance (self-hosted or cloud)

Key Benefits

✅ Automates retention analytics & reporting ✅ Provides AI-powered insights in structured HTML ✅ Improves hiring strategy with trait-based scoring ✅ Reduces manual effort in weekly retention reviews ✅ Ensures reliability with error handling & validation

Perfect For

HR & Recruitment teams monitoring post-hire retention Organizations optimizing job descriptions & hiring strategy Talent analytics teams needing automated, AI-driven insights Stakeholders requiring clear weekly digest emails

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - When clicking ‘Execute workflow’

Type / Role
n8n-nodes-base.manualTrigger - manualTrigger
Config choices
Version 1

Block 2 - Candidate Data Fetch

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 3 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 6 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 7 - Sticky Note4

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 8 - Sticky Note5

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 9 - Sticky Note6

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Sticky Note7

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Sticky Note8

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Trait Summary Fetch

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 13 - Merge Candidate + Trait Data

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 14 - Candidate Scoring & Data Normalization

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 15 - Data Validation

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 16 - Error Handling Logic

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.6

Block 17 - Retention Digest Generator

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.7

Block 18 - AI Processing Backend

Type / Role
@n8n/n8n-nodes-langchain.lmChatAzureOpenAi - lmChatAzureOpenAi
Config choices
Version 1

Block 19 - Email Delivery

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 1

3. Summary Table

Workflow Generate employee retention analytics reports with GPT-4o and Gmail digests
Complexity advanced
Nodes 19
Categories HR, AI Summarization
Author Rahul Joshi
Published 03 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9236/9236.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Generate employee retention analytics reports with GPT-4o and Gmail digests do?

Description This workflow automates employee retention analytics by combining candidate performance data with trait level retention statistics. It scores candidates, validates data, and generates a...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your HR, AI Summarization use case.