n8n

How to Automate Google Drive OCR Document Processing?

Turn PDFs and images into readable text and structured notes without manual typing. Great for teams that collect contracts, invoices, IDs, or scanned forms and need quick, reliable text output.

When you run it, the flow can read files from Google Drive or from public links. Google Drive files are uploaded to a secure AI service, a signed link is created, and OCR runs on both documents and images. Public links can be sent directly to the OCR step. Each page comes back as clean markdown, ready for copy, search, or analysis. There is also an optional step that sends the file content to a text model for fast classification or questions, so you can label or summarize content right away.

You will need an API key for the AI OCR service and access to Google Drive. Replace the example file IDs or URLs with your own. Expect faster intake, fewer typing errors, and better document tracking. Use it for invoice capture, contract review, identity checks, or policy summaries. Setup is simple and runs in minutes once your credentials are ready.

What are the key features?

  • Manual run to test and control each job before scaling
  • Imports PDFs and images directly from Google Drive by file ID
  • Uploads private files to a secure AI service and creates a signed URL
  • Runs OCR on both documents and images and returns markdown by page
  • Processes public file links without needing a private upload
  • Optional step to classify, summarize, or extract insights from the OCR output
  • Supports multi page PDFs and large images for reliable coverage

What are the benefits?

  • Reduce manual review from 30 minutes to 3 minutes per file
  • Automate up to 90 percent of routine document reading
  • Improve data accuracy by 80 percent compared to manual typing
  • Handle 10 times more files per day without extra staff
  • Connect Google Drive and AI OCR in one secure flow

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Google Drive and Mistral AI. See the Tools Required section above for links to create accounts with these services.
  3. In the n8n credentials manager, create the AI OCR credential: double click any node that calls the AI service, choose 'Credential to connect with', click 'Create new credential', select the API Key option, then paste your API key from the provider's API page.
  4. Connect Google Drive: open the Import PDF node, click 'Credential to connect with', choose 'Create new credential', sign in with your Google account, and allow file access. Reuse this credential for the Import Image node.
  5. Replace file IDs in the Import PDF and Import Image nodes with your own Google Drive file IDs. Ensure the files are PDFs or images.
  6. Open the Document URL and Image URL set nodes and replace the example links with your own public file URLs if you want to test the public link path.
  7. Check the signed URL nodes and keep the expiry set to 24 hours, or adjust if you need shorter or longer access.
  8. Click Execute to run in test mode. Open the OCR nodes and review the output field. You should see markdown for each page.
  9. For the optional understanding nodes, add your prompt or labels if you want classification or summaries. Run again to verify the responses.
  10. Troubleshoot issues: 401 or 403 means your API key or permissions are wrong. Empty output usually means the file type or size is not supported. Google Drive download errors often come from missing access rights.
  11. After testing, consider adding a schedule or a webhook in n8n to move from manual runs to automatic processing.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Google Drive

Sign up

Drive API: $0 (no additional cost; quota-limited)

Mistral AI

Sign up

Free API tier: $0 (usage-limited). Lowest paid usage: Mistral Embed at $0.10 per 1M tokens.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.