n8n AI Automation Workflow เครื่องมือประกอบงานอัตโนมัติ ใช้ได้ทั้งบนคลาวด์และโฮสต์เอง ต่อได้หลายโมเดล หากงานคุณเน้นภาษาไทย แนะนำ Typhoon เป็น Open-Source ที่ถนัดไทย–อังกฤษ มี API ให้ลองฟรี แบบไม่ต้องลงทุนเยอะ เพียงต่อ Typhoon กับ n8n ด้วยคู่มือนี้ก็ใช้ได้เลย

หากยังไม่คุ้น n8n แนะนำดูพื้นฐานสั้น ๆ ก่อนลงมือ

เว็บคู่มือบน OpenTyphoon นั้นบอกการเชื่อม Typhoon กับ n8n อยู่ 3 แบบเลือกอย่างใดอย่างหนึ่ง

  1. ใช้ Typhoon API ตรง (แนะนำ Cloud)
    • เพิ่ม Node: OpenAI Chat Model
    • ใส่ API Key จาก Typhoon Playground
    • ตั้ง Base URL = https://api.opentyphoon.ai/v1
    • เลือก Model เป็น By ID
      • หากต่อ OCR เลือกใช้ typhoon-ocr-preview
      • หากทำงานข้อความทั่วไป เลือกใช้ typhoon-v2.1-12b-instruct
  2. ผ่าน OpenRouter
    • เพิ่ม Node OpenRouter Chat Model
    • ใส่ OpenRouter API Key
    • เลือก Typhoon จากการค้นคำว่า typhoon
  3. Self-host (เฉพาะ Translate/โมเดลเล็ก)
    • เพิ่ม Node Ollama Chat Model
    • เลือก Typhoon Translate ที่ติดตั้งไว้ในเครื่องคุณ

– หลังทำ Credential แล้ว ค่อยไปประกอบ Workflow ทีหลัง

1. OCR Workflow (รูป/สลิป/นามบัตร → โครงข้อมูล)

  • รับไฟล์จากฟอร์ม → OCR → (ถ้าต้องการ) แยก Field เช่น ชื่อ/อีเมล/จำนวนเงิน → เก็บลง Sheets
  1. เพิ่ม Webhook On form submission เพื่อรับไฟล์เข้าระบบ
  2. เพิ่ม Node เงื่อนไข If เช็กชนิดไฟล์ ว่าเป็น PDF ไหม
  3. เพิ่ม Node PDF4ME แปลง PDF เป็นรูป (วิ่งมาทางแขน True)
  4. เพิ่ม Node Edit Image ไว้ดึงขนาดภาพ เพื่อนำไปบอกโมเดล
  5. เพิ่ม Node AI Agent ตั้งชื่อว่า OCR Agent ต่อได้ 2 แบบ
    • เลือก OpenAI Chat Model (วิธีที่ 2) หรือ OpenRouter Chat Model (วิธีที่ 3)
    • ตั้งค่า Model ID ในแท็บ Parameters เลือก typhoon-ocr-preview
    • ตรง Options เปิด Automatically Passthrough Binary Images, ตั้ง Temperature = 0.1
    • User Message: ใส่ Prompt นี้
    • Prompt: Below is an image of a document page, along with its dimensions and possibly some raw textual content previously extracted from it. Note that the text extraction may be incomplete or partially missing. Carefully consider both the layout and any available text to reconstruct the document accurately.
    • Your task is to return the markdown representation of this document, presenting tables in HTML format as they naturally appear.
    • If the document contains images or figures, analyze them and include the tag <figure>IMAGE_ANALYSIS</figure> in the appropriate location.
    • Your final output must be in JSON format with a single key `natural_text` containing the response.
    • RAW_TEXT_START
    • Page dimensions: {{ $json.size.width }}.0x{{ $json.size.height }}.0
    • [Image 0x0 to {{ $json.size.width }}x{{ $json.size.height }}]
    • RAW_TEXT_END
  6. เพิ่ม Node Parser ไว้สำหรับแยกประโยคในไฟล์เอกสารที่นำเข้า
  7. เพิ่ม Node Sheets ไว้บันทึกข้อมูลหลังแยกประโยคจาก Parser ลงใน Sheets

2. Typhoon Text Models มี 2 ทางหลัก

  • ทางที่ 1 ผ่าน OpenAI Chat Model (รองรับ API ของ Typhoon)
  1. เพิ่ม AI Agent หรือ Basic LLM เลือก OpenAI Chat Model
    • Credential: ใช้ Typhoon API Key + Base URL https://api.opentyphoon.ai/v1
    • ใส่ Model ID ที่ต้องการ (เช่น typhoon-v2.1-12b-instruct)
    • รายชื่อโมเดลดูได้จากเอกสาร Typhoon/Playground
  • ทางที่ 2 ผ่าน OpenRouter
  • สมัคร OpenRouter แล้วเลือก OpenRouter Chat Model ใน n8n
  • ในแท็บ parameters ใส่ OpenRouter API Key
  • ค้นหาและเลือกโมเดล Typhoon ที่เปิดให้ใช้บนแพลตฟอร์ม

Tool Calling: Typhoon เรียกใช้ Tools ได้ แต่เพราะใช้งานผ่าน low-code อย่าง n8n แนะนำให้เขียน Prompt ละเอียดและชัดเจน

3. Typhoon Translate แบบโลคัล (ไม่มี API ให้ แต่โหลดได้)

แปลเอกสารได้ทั้งไทย-อังกฤษขนาดเล็กของ Typhoon ไม่มี API แต่โหลดไปรันเองได้ผ่าน Hugging Face/Ollama

เหมาะกับผู้ที่ Self-host n8n อยู่แล้ว และอยากแปลบนเครื่องตัวเอง 100%

ข้อสรุป:

การต่อ Typhoon เข้ากับ n8n ไม่ยาก: ตั้ง Base URL ให้เป็นของ Typhoon → เลือกโมเดลที่ต้องการ ทำ OCR/Text หรือแปลงภาษาและใส่ Prompt ให้ชัด แล้วเอาผลลัพธ์ไปแยกฟิลด์/บันทึกลงใน Shhet ต่อได้ทันที

Source:

OpenTyphoon