{
  "name": "Extract and structure Thai documents to Google Sheets using Typhoon OCR and Llama 3.1",
  "nodes": [
    {
      "id": "7d7df2fd-bc12-4850-aa9a-3e318bfed747",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        40,
        0
      ]
    },
    {
      "id": "58290920-9b18-47dd-82b9-62c340b7ed53",
      "name": "OpenRouter Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
      "position": [
        600,
        120
      ]
    },
    {
      "id": "d42f2a8d-7bd5-462d-932c-34ee5de16592",
      "name": "Extract Text with Typhoon OCR",
      "type": "n8n-nodes-base.executeCommand",
      "position": [
        420,
        0
      ]
    },
    {
      "id": "d6d13619-f704-45d0-85fc-3e5b9dc4bd7a",
      "name": "Structure Text to JSON with LLM",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        600,
        0
      ]
    },
    {
      "id": "eaa9580c-9b98-42dc-a164-38430df41459",
      "name": "Parse JSON to Sheet Format",
      "type": "n8n-nodes-base.code",
      "position": [
        940,
        0
      ]
    },
    {
      "id": "8e3e5e7e-d329-459e-bd85-31fc2f76144b",
      "name": "Save to Google Sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1120,
        0
      ]
    },
    {
      "id": "7b20ef0a-5d1f-4efe-bac3-53ace280cac2",
      "name": "Load PDFs from doc Folder",
      "type": "n8n-nodes-base.readWriteFile",
      "position": [
        220,
        0
      ]
    },
    {
      "id": "944977eb-2db6-430f-957e-345541ba8d39",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -100
      ],
      "parameters": {
        "width": 1320,
        "height": 360,
        "content": "## Thai OCR to Sheet\nThis workflow extracts Thai PDF text using typhoon-ocr, converts it to structured JSON using LLM, and saves the output to Google Sheets. Works with self-hosted n8n only."
      }
    }
  ],
  "connections": {
    "OpenRouter Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Structure Text to JSON with LLM",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Load PDFs from doc Folder": {
      "main": [
        [
          {
            "node": "Extract Text with Typhoon OCR",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse JSON to Sheet Format": {
      "main": [
        [
          {
            "node": "Save to Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Text with Typhoon OCR": {
      "main": [
        [
          {
            "node": "Structure Text to JSON with LLM",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structure Text to JSON with LLM": {
      "main": [
        [
          {
            "node": "Parse JSON to Sheet Format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Load PDFs from doc Folder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}