Skip to main content

Nested PDF analysis with Mistral AI & OneDrive for document summarization

Workflow preview

Workflow preview
100%
Nested PDF analysis with Mistral AI & OneDrive for document summarization 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 Automate the discovery and analysis of PDF files across a deeply nested OneDrive folder structure. This workflow recursively searches folders, filters for new or updated PDFs, extracts ...

Best for

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

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.microsoftonedrive, n8n-nodes-base.merge, n8n-nodes-base.splitinbatches, @n8n/n8n-nodes-langchain.lmchatmistralcloud, n8n-nodes-base.aggregate, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.datatable

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Nested PDF analysis with Mistral AI & OneDrive for document summarization
Workflow name
Nested PDF analysis with Mistral AI & OneDrive for document summarization

Description

Automate the discovery and analysis of PDF files across a deeply nested OneDrive folder structure. This workflow recursively searches folders, filters for new or updated PDFs, extracts text, and uses a Mistral AI agent to generate a concise Executive Summary, Key Findings, and Structured Metadata (Date, Location, etc.), storing all insights into a n8n Data Table for easy access and further automation.

Key Features & How It Works

Scheduled Trigger & Recursive Folder Search:
  • The workflow runs automatically (scheduled for 8 PM in this template) to monitor a specified main folder on OneDrive.

  • It performs a deep, multi-level search (up to 8 layers) across subfolders to ensure no documents are missed.

Smart Deduplication & Filtering:
  • It checks new files against an internal n8n Data Table using the Compare Datasets node, ensuring only new or unique PDF files are processed, saving AI credits and processing time.

  • A size check is also included, preventing attempts to process excessively large files.

  • AI-Powered Document Intelligence (Mistral LLM):

For each new PDF, the workflow extracts the text and passes it to a Mistral AI model for dual-stream analysis:
  • Overview Agent: Generates an impartial, professional Executive Summary, a list of Key Findings & Data Points, and the document's Scope/Context.

  • Document Information Agent: Extracts crucial metadata, including the single most relevant date, location (City/State/Country), and professional information (Name, Title, Organization).

Structured Output and Archiving:
  • AI outputs are meticulously validated and reformatted into a clean JSON object using Structured Output Parsers.

  • The complete analysis, along with the original file name and path, is then logged as a new row in an n8n Data Table.

Setup Notes

OneDrive Folder: You must specify the exact name of your main folder in the 'Search for Main Folder' node.

Data Table: Ensure your n8n Data Table exists with the required columns: Summary, Key_Findings, Scope, Date, Location, File_Name, and Path.

Deep Folder Structure: The current configuration supports up to 8 levels of subfolders. If your files go deeper, you may need to add more "Get items in a folder" and "If" nodes.

AI Customization: Review the AI agent prompts and the structured output schemas to customize the fields you want to extract or the summary style you require.

Extend This Workflow

The final output is organized data. You can easily extend this workflow to:
  • Send daily/weekly digest emails with new summaries.

  • Sync the extracted data to a Google Sheet, Airtable, or other database.

  • Add a secondary AI agent to perform follow-up actions based on the "Key Findings."

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 - Schedule Trigger1

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

Block 2 - Get items in a folder1

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

Block 3 - Get items in a folder2

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

Block 4 - Get items in a folder3

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

Block 5 - Get items in a folder4

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

Block 6 - Get items in a folder5

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

Block 7 - Get items in a folder6

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

Block 8 - Merge

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

Block 9 - Get items in a folder7

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

Block 10 - 2nd Loop Over Items1

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

Block 11 - Mistral Cloud Chat Model

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

Block 12 - Aggregate

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

Block 13 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.3

Block 14 - Loop Over Items

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

Block 15 - Insert row

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

Block 16 - Get row(s)

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

Block 17 - Search for Main Folder

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

Block 18 - Get items in a folder9

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

Block 19 - If PDF 1

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

Block 20 - If PDF 2

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

Block 21 - If PDF 3

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

Block 22 - If PDF 4

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

Block 23 - If PDF 5

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

Block 24 - If PDF 6

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

Showing the first 24 of 50 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Nested PDF analysis with Mistral AI & OneDrive for document summarization
Complexity advanced
Nodes 50
Categories Document Extraction, AI Summarization
Author Jordan Hoyle
Published 24 Oct 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10132/10132.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 Nested PDF analysis with Mistral AI & OneDrive for document summarization do?

Description Automate the discovery and analysis of PDF files across a deeply nested OneDrive folder structure. This workflow recursively searches folders, filters for new or updated PDFs, extracts ...

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.