Skip to main content

Extract medical reports & generate AI health advice with Mistral AI & GPT-4

Workflow preview

Workflow preview
100%
Extract medical reports & generate AI health advice with Mistral AI & GPT-4 preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Try It Out! Use n8n to extract medical test data from diagnostic reports uploaded to Google Drive, automatically detect abnormal values, and generate personalized health advice. How it works 1. Upl...

Best for

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

Tools used

n8n-nodes-base.googledrive, n8n-nodes-base.code, n8n-nodes-base.googledrivetrigger, n8n-nodes-base.mistralai, n8n-nodes-base.if, @n8n/n8n-nodes-langchain.openai, 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 Sridevi Edupuganti.

Original n8n.io source

1.1 Workflow description

Title
Extract medical reports & generate AI health advice with Mistral AI & GPT-4
Workflow name
Extract medical reports & generate AI health advice with Mistral AI & GPT-4

Try It Out!

Use n8n to extract medical test data from diagnostic reports uploaded to Google Drive, automatically detect abnormal values, and generate personalized health advice.

How it works

  1. Upload a medical report (PDF or image) to a monitored Google Drive folder
  2. Mistral AI extracts text using OCR while preserving document structure
  3. GPT-4 parses the extracted text into structured JSON (patient info, test names, results, units, reference ranges)
  4. All test results are saved to the "All Values" sheet in Google Sheets
  5. JavaScript code compares each result against its reference range to detect abnormalities
  6. For out-of-range values, GPT-4 generates personalized dietary, lifestyle, and exercise advice based on patient age and gender
  7. Abnormal results with recommendations are saved to the "Out of Range Values" sheet

How to use

  1. Set up Google Drive folder monitoring and Google Sheets with two tabs: "All Values" and "Out of Range Values"
  2. Configure API credentials for Google Drive, Mistral AI, and OpenAI (GPT-4)
  3. Upload medical reports to your monitored folder
  4. Review extracted data and personalized health advice in Google Sheets

Requirements

  • Google Drive and Sheets with OAuth2 authentication
  • Mistral AI API key for OCR
  • OpenAI API key (GPT-4 access required) for intelligent extraction and advice generation

Need Help?

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 - Download file

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

Block 2 - Combine page Markdown

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

Block 3 - Parse AI output to one-per-row

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

Block 4 - Out-of-Range Detection & Advice Fields

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

Block 5 - Merge AI Response Back

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

Block 6 - Upload pdf/jpeg file to Google drive

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

Block 7 - Extract from Image

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

Block 8 - Check if PDF or Image

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

Block 9 - Extract from PDF

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

Block 10 - Extract Medical Data (AI)

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

Block 11 - General Health Advice(AI)

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 1.8

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 Note6

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

Block 17 - Save Out-of-Range Results

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

Block 18 - Sticky Note10

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

Block 19 - Sticky Note5

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

Block 20 - Save All Test Results

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

Block 21 - Sticky Note4

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

3. Summary Table

Workflow Extract medical reports & generate AI health advice with Mistral AI & GPT-4
Complexity advanced
Nodes 21
Categories Document Extraction, AI Summarization
Author Sridevi Edupuganti
Published 17 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/9839/9839.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 Extract medical reports & generate AI health advice with Mistral AI & GPT-4 do?

Try It Out! Use n8n to extract medical test data from diagnostic reports uploaded to Google Drive, automatically detect abnormal values, and generate personalized health advice. How it works 1. Upl...

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.