Skip to main content

Generate medical reports from emails with Gemini AI & Google Workspace

Workflow preview

Workflow preview
100%
Generate medical reports from emails with Gemini AI & Google Workspace 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 template is designed for healthcare providers, sales reps, and medical tourism companies who need to process diagnosis emails efficiently. It automates the full flow from email...

Best for

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

Tools used

n8n-nodes-base.gmailtrigger, n8n-nodes-base.set, n8n-nodes-base.googlesheets, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatgooglegemini, n8n-nodes-base.code, n8n-nodes-base.googledocs, n8n-nodes-base.googledrive

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Generate medical reports from emails with Gemini AI & Google Workspace
Workflow name
Generate medical reports from emails with Gemini AI & Google Workspace

📝 Description:

This template is designed for healthcare providers, sales reps, and medical tourism companies who need to process diagnosis emails efficiently. It automates the full flow from email to report delivery.

When a new diagnosis email arrives:

The email content is captured and parsed by an AI agent (Gemini or any customizable LLM).

Patient and medical data is extracted into structured fields (e.g., name, phone, diagnosis).

Data is logged into a Google Sheet for records.

A Google Docs medical report is generated using a predefined template.

The report is exported as PDF and emailed to stakeholders (e.g., managers or sales team).

This template supports custom AI models, customizable Google Docs templates, and flexible filtering based on sender email.

🛠️ Features

Gmail email trigger (customizable sender filter)

AI-powered diagnosis parsing using Gemini (easily switchable to OpenAI or others)

Google Sheets log

Google Docs templated report (auto-filled)

PDF export and email sending

Full flexibility & customization

đź”§ Requirements

Before using this template, you'll need:

A connected Gmail account (to receive diagnosis emails)

A valid Google Sheets integration (create your own sheet with the desired columns)

A Google Docs template document that includes placeholder tags like {{patient_name}}, {{date}}, etc.

A Gemini or OpenAI API connection for the AI agent (fully customizable)

Note: You must replace all Google Drive, Docs, and Sheets references with your own documents. This template does not grant access to the original creator's files.

⚙️ Customization Tips

In the Gmail Trigger node, change the sender filter to match the doctor’s email you want to process.

Modify the AI prompt if your use case needs different extracted fields.

Replace the Google Docs template link with your own file and customize its structure and variables.

Change recipient email addresses in the final Gmail node to notify the correct team members.

Optional: Add fallback flows or error branches for when AI fails or input is malformed.

đź§  Use Case Examples

Medical tourism agencies auto-generating patient reports for incoming diagnosis summaries

Clinics storing structured data from messy email inputs

Sales teams instantly notified of new leads with completed medical summaries

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 - Gmail Trigger

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

Block 2 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 3 - Append row in sheet

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

Block 4 - AI Agent

Type / Role
@n8n/n8n-nodes-langchain.agent - agent
Config choices
Version 2.1

Block 5 - Google Gemini Chat Model

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

Block 6 - Code

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

Block 7 - Update a document1

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

Block 8 - Copy file

Type / Role
n8n-nodes-base.googleDrive - googleDrive
Config choices
Version 3

Block 9 - Send a message

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

Block 10 - HTTP Request

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 11 - Code1

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

Block 12 - Sticky Note

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

Block 13 - Sticky Note1

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

Block 14 - Sticky Note2

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

Block 15 - Sticky Note3

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

Block 16 - Sticky Note4

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

Block 17 - Sticky Note5

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

Block 18 - Sticky Note6

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

Block 19 - Sticky Note7

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

Block 20 - Sticky Note8

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

Block 21 - Sticky Note9

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

3. Summary Table

Workflow Generate medical reports from emails with Gemini AI & Google Workspace
Complexity advanced
Nodes 21
Categories Document Extraction, AI Summarization
Author Abdullah Alshiekh
Published 26 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6487/6487.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 medical reports from emails with Gemini AI & Google Workspace do?

Description: This template is designed for healthcare providers, sales reps, and medical tourism companies who need to process diagnosis emails efficiently. It automates the full flow from email...

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.