Extract and structure Thai documents to Google Sheets using Typh
!2025052293100.png ⚠️ Note: This template requires a community node and works only on self-hosted n8n installations. It uses the Typhoon OCR Python package a...
🔌 Nodes & Integrations Used (1)
📖 Implementation & Setup Guide
 ⚠️ **Note:** This template requires a community node and works **only on self-hosted** n8n installations. It uses the Typhoon OCR Python package and custom command execution. Make sure to install required dependencies locally.
---
Who is this for?
This template is for developers, operations teams, and automation builders in Thailand (or any Thai-speaking environment) who regularly process PDFs or scanned documents in Thai and want to extract structured text into a Google Sheet.
It is ideal for: * Local government document processing * Thai-language enterprise paperwork * AI automation pipelines requiring Thai OCR
---
What problem does this solve?
Typhoon OCR is one of the most accurate OCR tools for Thai text. However, integrating it into an end-to-end workflow usually requires manual scripting and data wrangling.
This template solves that by: * Running Typhoon OCR on PDF files * Using AI to extract structured data fields * Automatically storing results in Google Sheets
---
What this workflow does
- **Trigger**: Run manually or from any automation source
- **Read Files**: Load local PDF files from a `doc/` folder
- **Execute Command**: Run Typhoon OCR on each file using a Python command
- **LLM Extraction**: Send the OCR markdown to an AI model (e.g., GPT-4 or OpenRouter) to extract fields
- **Code Node**: Parse the LLM output as JSON
- **Google Sheets**: Append structured data into a spreadsheet
---
Setup
1. **Install Requirements**
* Python 3.10+ * `typhoon-ocr`: `pip install typhoon-ocr` * Install [Poppler](https://github.com/oschwartz10612/poppler-windows/releases/) and add to system PATH (needed for `pdftoppm`, `pdfinfo`)
2. **Create folders**
* Create a folder called `doc` in the same directory where n8n runs (or mount it via Docker)
3. **Google Sheet**
Create a Google Sheet with the following column headers:
| book\_id | date | subject | detail | signed\_by | signed\_by2 | contact | download\_url | | -------- | ---- | ------- | ------ | ---------- | ----------- | ------- | ------------- |
You can use this [example Google Sheet](https://docs.google.com/spreadsheets/d/1h70cJyLj5i2j0Ag5kqp93ccZjjhJnqpLmz-ee5r4brU) as a reference.
4. **API Key**
Export your `TYPHOON_OCR_API_KEY` and `OPENAI_API_KEY` in your environment (or set inside the command string in `Execute Command` node).
---
How to customize this workflow
* Replace the LLM provider in the `Basic LLM Chain` node (currently supports OpenRouter) * Change output fields to match your data structure (adjust the prompt and Google Sheet headers) * Add trigger nodes (e.g., Dropbox Upload, Webhook) to automate input
---
About Typhoon OCR
[Typhoon](https://docs.opentyphoon.ai/en/) is a multilingual LLM and toolkit optimized for Thai NLP. It includes `typhoon-ocr`, a Python OCR library designed for Thai-centric documents. It is open-source, highly accurate, and works well in automation pipelines. Perfect for government paperwork, PDF reports, and multilingual documents in Southeast Asia.
---
⚡ How to import this workflow into n8n:
- Click the Direct Download JSON button above to save
Extract_and_structure_Thai_documents_to_Google_Sheets_using_Typh.json. - Log in to your n8n Cloud or self-hosted n8n instance.
- In your workflow canvas, click the menu in top-right and select Import from File (or paste the JSON directly).
- Configure your credentials (e.g. API keys, database URLs) in the corresponding node settings.
- Click Execute Workflow to test and switch to Active!
Related Docs, PDF & OCR Workflows
View All in Docs, PDF & OCR →Add articles to a Notion list by accessing a Discord slash comma
This workflow allows you to add articles to a Notion reading list by accessing a Discord slash command. Prerequisites - A Notion account and [credentials](),...
Adobe PDF Services API Automation
Production-ready n8n automation template for Adobe PDF Services API Automation built by AhiXLight. Seamlessly connects HTTP Request, Execute Workflow Trigger, Dropbox with 20 configured nodes.
Adobe PDF Services API Workflow
Production-ready n8n automation template for Adobe PDF Services API Workflow built by AhiXLight. Seamlessly connects HTTP Request, Execute Workflow Trigger, Dropbox with 20 configured nodes.
AI Brand Voice Content Generator
Production-ready n8n automation template for AI Brand Voice Content Generator built by AhiXLight. Seamlessly connects Lm Chat Open Ai, Information Extractor, HTTP Request with 27 configured nodes.