Master Document Parsing with Mistral OCR in n8n Automation

Struggling with extracting data from PDFs and images? This unique n8n workflow leverages Mistral OCR to automate secure document parsing, saving you hours of manual work and boosting accuracy.
httpRequest
googleDrive
manualTrigger
+2
Workflow Identifier: 2317
NODES in Use: manualTrigger, set, googleDrive, httpRequest, stickyNote

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Automation Does ⚙️

This workflow turns PDFs and images into clear text automatically. It solves slow manual data entry and keeps data private. The result is fast, accurate text from bank documents or receipts, ready to use for reports.

The process fetches files either from a public link or private Google Drive storage. Then, it uploads private files securely to Mistral Cloud. It asks Mistral’s OCR models to read text from documents and pictures. Finally, it can answer questions about the documents using AI chat models.

This helps users avoid typing everything by hand. It also makes sure data stays private with signed URLs and limited file access times.

How Inputs, Processing, and Outputs Work:

  • Inputs: Document and image URLs from public or private locations (Google Drive).
  • Processing: Upload private files to Mistral Cloud; get secure signed URLs; run OCR to extract text; run chat completion queries on documents.
  • Outputs: Structured text from documents, plus AI-generated answers to user questions about the content.

Who Should Use This Workflow

This workflow fits anyone needing to read data fast from PDFs and pictures. It is good for bankers, accountants, and office workers who handle many financial documents. You do not need to type text manually.

Also, it helps with privacy. Files don’t get shared with unsafe services. Users who want control over cloud file access find this workflow useful.

If you want to try automatic document reading in n8n without coding, this is a practical start.


Tools and Services Used

  • Mistral Cloud API: Uploads files, creates signed URLs, runs OCR, and handles chat queries.
  • Google Drive: Stores private PDFs and images securely, provides file download by ID.
  • n8n Automation Platform: Orchestrates workflow steps, HTTP requests, and credentials.

Beginner Step-by-Step: How to Use This Workflow in n8n

Importing the Workflow

  1. Download the workflow JSON file using the Download button on this page.
  2. Open the n8n editor you already have access to.
  3. Click on “Import from File” and select the downloaded JSON file.

Configuring Credentials and Data

  1. Add your Google Drive credentials in the n8n Credentials section.
  2. Add your Mistral Cloud API Key credentials with proper permission for file upload and OCR.
  3. Update the Google Drive file IDs inside the Import PDF and Import Image nodes.
  4. Update the public URLs inside the Document URL and Image URL Set nodes if you want to test with different files.
  5. If you want to ask a question about your documents, update the query text in the Set node before the chat completion.

Testing and Activating

  1. Click the Manual Trigger node and select ‘Execute Workflow’ to test.
  2. Watch the output of each node for errors or success messages.
  3. Once testing is successful, activate the workflow to use in production.

For running regular scheduled processing, add a Cron Trigger node before the start.

If running on a private n8n instance for more control, consider self-host n8n for better security.


Inputs and Outputs Explained

Inputs

  • Public PDF or image URLs
  • Private PDF or image files stored in Google Drive
  • Query string: a question the user wants about the document

Processing Steps

  • Downloading private files from Google Drive
  • Uploading files to Mistral Cloud via HTTP POST
  • Getting time-limited signed URLs for secure access
  • Calling Mistral OCR APIs to extract text content from documents and images
  • Sending chat completion requests with the document and the user query

Outputs

  • Structured text extracted from PDFs and images
  • AI-generated answers to questions based on document content

Common Errors and Troubleshooting

  • 401 Unauthorized Mistral API errors: Check the API Key is correct and not expired.
  • Google Drive file not found: Double-check file IDs and make sure OAuth user has access.
  • Empty or partial OCR results: Signed URL expired too soon or unsupported file formats.

Always test steps separately to isolate problems.


Customization Ideas

  • Swap OCR model names in HTTP Request nodes to try other Mistral OCR options.
  • Change signed URL expiry time for your security needs.
  • Add support for other file types by adding more Google Drive or URL nodes.
  • Modify chat prompt content to ask more advanced or detailed questions.

Summary of Benefits and Outcome

✓ Saves hours of typing by automating data extraction from PDFs and images.
✓ Keeps document data private using secure Mistral Cloud file handling.
✓ Gives fast, structured text ready for financial reports or analysis.
✓ Answers natural language questions on documents using AI chat.
✓ Works for public and private files with minimal setup effort.
✓ Costs stay low at $0.001 per page scanned.


Frequently Asked Questions

Check if the Mistral API Key is correct and has not expired. Update the key in n8n credentials and re-test.
Using wrong file IDs or insufficient permissions causes these errors. Verify file ID from Google Drive URL and ensure OAuth user has access.
Signed URLs might be expired or files might be unsupported formats. Renew signed URLs and check file type compatibility.
Yes, Mistral OCR supports multi-page PDFs up to 64 pages as configured in the HTTP request parameters.

Promoted by BULDRR AI

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free