Skip to main content

Verify email content against Google Sheets and Gmail logs

Workflow preview

Workflow preview
100%
Verify email content against Google Sheets and Gmail logs preview
Open on n8n.io

1. Workflow Overview

How it works Input: Google Sheets provides “Expected Content” rows (one per block/section). HTML Parse: A JS/HTML step extracts Actual Content from the email’s HTML (from Gmail or any provided HTML...

Best for

  • Document Extraction automation workflows
  • AI Summarization automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.gmail, n8n-nodes-base.html, n8n-nodes-base.merge, n8n-nodes-base.code, n8n-nodes-base.stickynote, n8n-nodes-base.googlesheets

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Verify email content against Google Sheets and Gmail logs
Workflow name
Verify email content against Google Sheets and Gmail logs

How it works

  • Input: Google Sheets provides “Expected Content” rows (one per block/section).
  • HTML Parse: A JS/HTML step extracts Actual Content from the email’s HTML (from Gmail or any provided HTML source).
  • Merge: Expected and Actual items are merged into aligned pairs for comparison.
  • Compare: A JS node compares strings and produces a Result (Pass/Fail). (This flow intentionally stops at the result and does not compute a mismatch reason.)
  • Log: The workflow writes back “Actual Content” + “Result” to Google Sheets for reporting.

Setup steps

  • Google Sheets Create a sheet with columns: SectionId, ExpectedContent, ActualContent, Result. Populate SectionId + ExpectedContent for each content block you want to verify.
  • Email HTML source Use a Gmail node to pull message HTML or use HTTP Request/Read Binary File + HTML/JS to supply the HTML.
  • Extraction logic (JS/HTML) Implement selectors/XPaths/DOM parsing for each SectionId to extract Actual Content. Normalize whitespace and trim HTML entities for a fair comparison.
  • Merge & Compare Merge on SectionId to align Expected ↔ Actual. In the Code (JS) node, compare strings and set Result to Pass if equal (or meets your rule), otherwise Fail.
  • Write back Use Google Sheets to update ActualContent and Result for each row.

Requirements

n8n with access to: Google Sheets, Code/HTML, and (optionally) Gmail nodes. A Google Sheets document with at least these columns:

SectionId (or Key) ExpectedContent ActualContent (output) Result (output: Pass/Fail)

Access to the email HTML (Gmail node, HTTP fetch, or paste‐in).

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 - Get many messages

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

Block 3 - Extracting Preheader From HTML

Type / Role
n8n-nodes-base.html - html
Config choices
Version 1.2

Block 4 - Combine HTML, Expected Content and Preheader

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

Block 5 - Extract Actual Content and Results

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

Block 6 - Sticky Note

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

Block 7 - Sticky Note3

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

Block 8 - Log Content Checks to Excel

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

Block 9 - Load Expected Content

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

3. Summary Table

Workflow Verify email content against Google Sheets and Gmail logs
Complexity intermediate
Nodes 9
Categories Document Extraction, AI Summarization
Author Sasikala Jayamani
Published 20 Feb 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/13530/13530.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 Verify email content against Google Sheets and Gmail logs do?

How it works Input: Google Sheets provides “Expected Content” rows (one per block/section). HTML Parse: A JS/HTML step extracts Actual Content from the email’s HTML (from Gmail or any provided HTML...

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 Document Extraction, AI Summarization use case.