Skip to main content

Process Thai documents with TyphoonOCR & AI to Google Sheets (multi-page PDF)

Workflow preview

Workflow preview
100%
Process Thai documents with TyphoonOCR & AI to Google Sheets (multi-page PDF) preview
Open on n8n.io

Important notice

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

1. Workflow Overview

️ Note: This template requires a community node and works only on self hosted n8n installations. It uses the Typhoon OCR Python package, from poppler utils, and custom command execution. Make sure...

Best for

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

Tools used

n8n-nodes-base.manualtrigger, n8n-nodes-base.executecommand, n8n-nodes-base.readwritefile, n8n-nodes-base.stickynote, n8n-nodes-base.code, n8n-nodes-base.aggregate, n8n-nodes-base.splitinbatches, @n8n/n8n-nodes-langchain.chainllm

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Process Thai documents with TyphoonOCR & AI to Google Sheets (multi-page PDF)
Workflow name
Process Thai documents with TyphoonOCR & AI to Google Sheets (multi-page PDF)
⚠️ Note: This template requires a community node and works only on self-hosted n8n installations. It uses the Typhoon OCR Python package, pdfseparate from poppler-utils, and custom command execution. Make sure to install all required dependencies locally.

Who is this for?

This template is designed for developers, back-office teams, and automation builders (especially in Thailand or Thai-speaking environments) who need to process multi-file, multi-page Thai PDFs and automatically export structured results to Google Sheets.

It is ideal for:

  • Government and enterprise document processing
  • Thai-language invoices, memos, and official letters
  • AI-powered automation pipelines that require Thai OCR

What problem does this solve?

Typhoon OCR is one of the most accurate OCR tools for Thai text, but integrating it into an end-to-end workflow usually requires manual scripting and handling multi-page PDFs. This template solves that by:

  • Splitting PDFs into individual pages
  • Running Typhoon OCR on each page
  • Aggregating text back into a single file
  • Using AI to extract structured fields
  • Automatically saving structured data into Google Sheets

What this workflow does

  • Trigger: Manual execution or any n8n trigger node
  • Load Files: Read PDFs from a local doc/multipage folder
  • Split PDF Pages: Use pdfinfo and pdfseparate to break PDFs into pages
  • Typhoon OCR: Run OCR on each page via Execute Command
  • Aggregate: Combine per-page OCR text
  • LLM Extraction: Use AI (e.g., GPT-4, OpenRouter) to extract fields into JSON
  • Parse JSON: Convert structured JSON into a tabular format
  • Google Sheets: Append one row per file into a Google Sheet
  • Cleanup: Delete temp split pages and move processed PDFs into a Completed folder

Setup

  1. Install Requirements

    • Python 3.10+
    • typhoon-ocr: pip install typhoon-ocr
    • poppler-utils: provides pdfinfo, pdfseparate
    • qpdf: backup page counting
  2. Create folders

    • /doc/multipage for incoming files
    • /doc/tmp for split pages
    • /doc/multipage/Completed for processed files
  3. Google Sheet

    • Create a Google Sheet with column headers like:
      book_id | date | subject | to | attach | detail | signed_by | signed_by2 | contact_phone | contact_email | contact_fax | download_url
      
  4. API Keys

    • Export your TYPHOON_OCR_API_KEY and OPENAI_API_KEY (or use credentials in n8n)

How to customize this workflow

  • Replace the LLM provider in the “Structure Text to JSON with LLM” node (supports OpenRouter, OpenAI, etc.)
  • Adjust the JSON schema and parsing logic to match your documents
  • Update Google Sheets mapping to fit your desired fields
  • Add trigger nodes (Dropbox, Google Drive, Webhook) to automate file ingestion

About Typhoon OCR

Typhoon is a multilingual LLM and NLP toolkit optimized for Thai. It includes typhoon-ocr, a Python OCR package designed for Thai-centric documents. It is open-source, highly accurate, and works well in automation pipelines. Perfect for government paperwork, PDF reports, and multi-language documents in Southeast Asia.


Deployment Option

You can also deploy this workflow easily using the Docker image provided in my GitHub repository: https://github.com/Jaruphat/n8n-ffmpeg-typhoon-ollama

This Docker setup already includes n8n, ffmpeg, Typhoon OCR, and Ollama combined together, so you can run the whole environment without installing each dependency manually.

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 - When clicking ‘Test workflow’

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

Block 2 - Extract Text with Typhoon OCR

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

Block 3 - Load PDFs from doc Folder

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

Block 4 - Sticky Note

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

Block 5 - Read/Write Files from Disk

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

Block 6 - Set_Input_Path

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

Block 7 - Split PDF page

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

Block 8 - Read Splite PDF Page

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

Block 9 - Aggregate

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

Block 10 - Loop Over Items

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

Block 11 - Parse JSON to Sheet Format

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

Block 12 - Structure Text to JSON with LLM

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.6

Block 13 - OpenRouter Chat Model

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

Block 14 - Clear tmp files

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

Block 15 - Save to Google Sheet

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

3. Summary Table

Workflow Process Thai documents with TyphoonOCR & AI to Google Sheets (multi-page PDF)
Complexity advanced
Nodes 15
Categories AI Summarization, Multimodal AI
Author Jaruphat J.
Published 26 Aug 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/7880/7880.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 Process Thai documents with TyphoonOCR & AI to Google Sheets (multi-page PDF) do?

️ Note: This template requires a community node and works only on self hosted n8n installations. It uses the Typhoon OCR Python package, from poppler utils, and custom command execution. Make sure...

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 AI Summarization, Multimodal AI use case.