Automate large document processing with this specialized n8n workflow. It uses SubworkflowAI to handle file splitting and polling, then utilizes the Google Gemini VLM for accurate OCR transcription.
Download this n8n workflow template and start using it instantly.
Automation specialists needing to process documents exceeding standard AI context limits (100MB+ or thousands of pages).
Developers building robust document ingestion pipelines.
Users looking for advanced n8n templates demonstrating asynchronous job polling and multimodal AI use.
Organizations implementing document OCR via Visual Language Models (VLM).
Processing large documents often causes application memory limits or exceeds the context window of standard AI models. This powerful n8n workflow solves this by integrating with SubworkflowAI, which specializes in breaking down large files into manageable, addressable pages (Datasets and Dataset Items).
The n8n workflow first securely downloads a document from Google Drive and uploads it for extraction via the SubworkflowAI Extract API. It then uses a robust corelogicflow_control structure—an n8n polling loop—to wait for the extraction job to complete without tying up the workflow execution immediately. Once complete, the n8n workflow retrieves individual document pages (Dataset Items). Finally, these page share links are passed directly to the Google Gemini n8n node, enabling efficient Visual Language Model (VLM) OCR transcription without requiring memory-intensive binary file downloads within the n8n environment itself. This approach makes this one of the most efficient n8n templates for handling massive document loads.
This comprehensive n8n workflow operates in six stages:
When clicking ‘Execute workflow’). The Google Drive n8n node downloads the target large document.Job Complete? If n8n node checks the job status. If the status is 'INPROGRESS', the workflow polls the Check Job Status endpoint, waits 1 second using the Wait n8n node, and loops back to check the status again. This polling continues until the status is 'SUCCESS' or 'ERROR'.Split Out n8n node ensures that each page (Dataset Item) is processed as a separate item in the n8n workflow stream.To use this powerful n8n workflow, follow these steps:
Extract API, Check Job Status, Get Dataset, Get Dataset Items).Download file n8n node with the File ID of the specific large document you wish to process. When clicking ‘Execute workflow’ (Manual Trigger): Serves as the initial n8n trigger to start the process manually.
Download file (Google Drive n8n node): Downloads the specified large binary file from Google Drive to the local n8n instance for temporary handling.
Extract API (HTTP Request n8n node): Uploads the binary document to https://api.subworkflow.ai/v1/extract using multipart-form-data. This is the first step in the SubworkflowAI document processing pipeline.
Job Complete? (If n8n node): The crucial corelogicflow_control component. It checks the status property (SUCCESS or ERROR) to determine if the processing loop should terminate or continue polling.
Check Job Status (HTTP Request n8n node): Used inside the polling loop to retrieve the current status of the asynchronous SubworkflowAI job.
Wait (n8n node): Introduces a 1-second delay in the polling loop to prevent API rate limiting.
Get Dataset Items (HTTP Request n8n node): Fetches individual page records using complex pagination settings, allowing the n8n workflow to handle documents with potentially thousands of pages by retrieving them in batches.
Split Out (n8n node): Prepares the fetched dataset items so that the subsequent VLM steps process one page at a time.
models/gemini-2.5-flash model and the secure share URL provided by SubworkflowAI to perform image transcription (OCR), transforming the document page into Markdown text.Securely automate Ko-fi payments using this robust n8n workflow. Route donations, subscriptions, and shop orders through a verified n8n trigger webhook, ensuring data integrity before processing.

Use this powerful n8n workflow to triage Gmail messages, auto-reply using AI, extract structured data from PDF invoices, and send alerts via Telegram. Great for technical teams and accounts payable.

Use this powerful n8n workflow to automate image segmentation and object detection using VLM Run, then automatically upload results to Google Drive and share via Telegram. A robust n8n automation.

Automate local document analysis using an n8n workflow leveraging local AI models like Ollama. This powerful n8n template extracts text, runs an AI Agent, and saves sophisticated reports directly to your disk.

Automate meeting note summarization and task extraction using an n8n workflow with AI (Anthropic/OpenAI) and Notion. Sync transcripts to Google Drive and manage tasks automatically.

Freelance AI Automation Engineer based in London, UK. Since 2024, my n8n templates have documented my journey into applied AI and have helped hundreds of businesses and organisations get up to speed with AI automation. Today, I continue to explore use-cases as AI evolves and occasionally upload templates which I find novel and interesting. Subscribe to the RSS Feed: https://cdn.subworkflow.ai/n8n-templates/rss.xml







































