🐾 ChatGPT + OpenClaw + LINE

ส่งข้อความจาก LINE ไปยัง AI บนคอมพิวเตอร์ของคุณ — แล้วสั่งงานคอมได้!

Send a LINE message to AI on your computer — and run commands from your phone!

Conditionals (If...then) · Webhooks · Local AI · Running Commands

🎬 วิดีโอภาพรวม
Video Overview

ดูวิดีโอภาษาไทยอธิบายสถาปัตยกรรมและการใช้งาน OpenClaw + LINE (1:52)

🎯 ภาพรวม — มันทำงานยังไง?
Overview — How Does It Work?

🇹🇭 ภาษาไทย

ลองนึกภาพว่าคุณพิมพ์ข้อความใน LINE บนมือถือ แล้วข้อความนั้นวิ่งไปหา AI ที่รันอยู่บนคอมพิวเตอร์ของคุณเอง แล้ว AI ก็ตอบกลับมาใน LINE ทันที — หรือแม้แต่สั่งรันคำสั่งบนคอมของคุณได้!


OpenClaw คืออะไร? มันคือ แพลตฟอร์ม AI ส่วนตัว ที่เป็น open-source (ฟรี) คล้ายๆ กับ Claude Code แต่ออกแบบมาให้เชื่อมต่อกับแอปแชทหลายตัว รวมถึง LINE เขียนด้วย TypeScript และติดตั้งผ่าน npm


ระบบทำงานโดย:

  • OpenClaw Gateway — รันบนคอมของคุณ เป็นศูนย์กลางรับ-ส่งข้อความ
  • LINE Plugin — ปลั๊กอินในตัวที่เชื่อมต่อกับ LINE Messaging API
  • AI Model (ChatGPT/Claude) — สมองของระบบ สร้างคำตอบอัจฉริยะ
  • exec — เครื่องมือที่ให้ AI รันคำสั่งบนคอมของคุณได้!

🇬🇧 English

Imagine typing a message in LINE on your phone and having it go to an AI running on your own computer. The AI replies in LINE — or even runs commands on your PC!


OpenClaw is a free, open-source personal AI assistant platform, similar to Claude Code. It's written in TypeScript, installed via npm, and designed to connect to many chat apps — including LINE.


Here's how it works:

  • OpenClaw Gateway — runs on your computer as the central message hub
  • LINE Plugin — a built-in plugin that connects to LINE Messaging API
  • AI Model (ChatGPT/Claude) — the brain that generates intelligent answers
  • exec — a tool that lets the AI execute commands on your PC!

🔄 How the System Works — ระบบทำงานอย่างไร

📱 LINE
User sends message
ผู้ใช้พิมพ์ข้อความ
➡️
🌐 Tunnel
ngrok / Tailscale
อุโมงค์สู่คอมคุณ
➡️
🐾 OpenClaw
Gateway on your PC
เกตเวย์บนคอมคุณ
➡️
🧠 AI Model
ChatGPT / Claude
สร้างคำตอบ

The AI can also run commands on your PC via the exec tool, then reply back through LINE!

AI ยังสั่งรันคำสั่งบนคอมคุณผ่านเครื่องมือ exec แล้วตอบกลับผ่าน LINE ได้!

🌟 Fun Facts — ข้อเท็จจริงน่าสนใจ

  • OpenClaw supports 22+ messaging channels — LINE, WhatsApp, Telegram, Discord, Slack and more! — OpenClaw รองรับมากกว่า 22 แอปแชท!
  • OpenClaw is MIT-licensed and free to use — anyone can download and run it — OpenClaw ฟรีและเปิดให้ใครก็ได้ใช้
  • It can use different AI models — ChatGPT, Claude, and others — with automatic failover — ใช้ AI ได้หลายรุ่น มีระบบสำรองอัตโนมัติ
  • The AI can run commands on your computer — open files, check weather, control your PC from LINE! — AI สั่งรันคำสั่งบนคอมได้ เปิดไฟล์ เช็คสภาพอากาศ ควบคุมคอมจาก LINE!

🧪 Section Check — ตรวจสอบความเข้าใจ

System Overview & Conditionals — ภาพรวมระบบและ If...then

0/3

If a user sends a message in LINE, ______ OpenClaw's Gateway receives it through a tunnel.

ถ้าผู้ใช้ส่งข้อความใน LINE ______ Gateway ของ OpenClaw จะรับข้อความผ่านอุโมงค์

then (if...then — conditional)
but (contrast)
or (alternative)
"If...then" is a conditional sentence. "If a user sends a message, then OpenClaw receives it." This describes a cause-and-effect relationship. — ประโยค if...then อธิบายเหตุและผล

What is OpenClaw?

OpenClaw คืออะไร?

A Python web framework (เฟรมเวิร์ก Python)
An open-source personal AI assistant platform (แพลตฟอร์ม AI ส่วนตัว open-source)
A cloud hosting service (บริการ cloud hosting)
OpenClaw is an open-source personal AI assistant platform. It runs on your own computer (local-first) and connects AI models to messaging apps like LINE. It's similar to Claude Code but for multi-channel messaging. — OpenClaw คือแพลตฟอร์ม AI ส่วนตัวที่รันบนคอมของคุณเอง

Complete: "If you run OpenClaw on your computer, you ______ need to rent a cloud server."

เติมคำ: "ถ้าคุณรัน OpenClaw บนคอม คุณ______ ต้องเช่า cloud server"

don't (negative — ไม่ต้อง)
always (เสมอ)
must (ต้อง)
✅ "If you run OpenClaw on your computer, you don't need to rent a cloud server." OpenClaw is local-first — it runs on your own machine! — ถ้ารัน OpenClaw บนคอมตัวเอง ไม่ต้องเช่า server

📚 คำศัพท์สำคัญ
Key Vocabulary

🐾 OpenClaw
แพลตฟอร์ม AI ส่วนตัว (open-source)
An open-source personal AI assistant platform that runs on your own computer. It connects to 22+ messaging apps (including LINE) and can use multiple AI models like ChatGPT and Claude.
แพลตฟอร์ม AI ส่วนตัวแบบ open-source ที่รันบนคอมของคุณ เชื่อมต่อกับแอปแชทกว่า 22 ตัว (รวมถึง LINE)
🏗️ Gateway
เกตเวย์ / ศูนย์กลางควบคุม
The central hub of OpenClaw that runs on your computer (localhost:18789). It receives messages from all connected channels and routes them to the AI agent.
ศูนย์กลางของ OpenClaw ที่รันบนคอมของคุณ รับข้อความจากทุกช่องทางแล้วส่งไปให้ AI ประมวลผล
🌐 Webhook
เว็บฮุก / URL ที่รับข้อมูลอัตโนมัติ
A URL that automatically receives data when an event happens. LINE sends messages to OpenClaw's webhook URL whenever someone texts the bot.
URL ที่รับข้อมูลอัตโนมัติเมื่อมีเหตุการณ์เกิดขึ้น LINE ส่งข้อความไปที่ webhook ของ OpenClaw
🔑 API Key
กุญแจ API / รหัสเข้าใช้ API
A secret password that lets your program access an online service. You need API keys for LINE and for the AI model (ChatGPT or Claude).
รหัสลับที่ให้โปรแกรมเข้าถึงบริการออนไลน์ได้ ต้องมี API key สำหรับ LINE และ AI model
🚇 Tunnel
อุโมงค์ / ทางเชื่อมต่อผ่านอินเทอร์เน็ต
A secure connection that makes your local computer accessible from the internet. You can use ngrok or Tailscale Funnel to create a tunnel for LINE to reach OpenClaw.
การเชื่อมต่อที่ปลอดภัยที่ทำให้คอมเข้าถึงจากอินเทอร์เน็ตได้ ใช้ ngrok หรือ Tailscale Funnel
🖥️ exec
เครื่องมือรันคำสั่งบนคอม
An OpenClaw tool that lets the AI execute commands on your computer. You can tell the AI in LINE to open files, check system info, or run scripts — and it runs on your PC!
เครื่องมือของ OpenClaw ที่ให้ AI รันคำสั่งบนคอมของคุณ สั่งเปิดไฟล์ เช็คข้อมูลระบบ หรือรันสคริปต์ได้!

🛠️ สิ่งที่ต้องเตรียม
What You Need Before Starting

🇹🇭 ภาษาไทย

ก่อนเริ่มลงมือทำ ให้เตรียมสิ่งเหล่านี้:


สิ่งที่ต้องมีรายละเอียด
💻 คอมพิวเตอร์Windows, Mac หรือ Linux — เปิดไว้ตลอดเวลาที่ต้องการให้บอททำงาน
📦 Node.js 18+JavaScript runtime ที่ใช้รัน OpenClaw (ดาวน์โหลดจาก nodejs.org)
📱 บัญชี LINE Developersสมัครฟรีที่ LINE Developers Console
🔑 OpenAI API Keyสมัครที่ OpenAI แล้วสร้าง API key (มีค่าใช้จ่ายเล็กน้อย) — หรือใช้ Claude API ก็ได้
🌐 ngrok หรือ Tailscaleสร้างอุโมงค์ให้ LINE เข้าถึงคอมคุณจากอินเทอร์เน็ต (ทั้งสองตัวมีแบบฟรี)

🇬🇧 English

Before you start building, prepare these things:


What You NeedDetails
💻 A ComputerWindows, Mac, or Linux — must stay on while the bot is running
📦 Node.js 18+JavaScript runtime needed to run OpenClaw (download from nodejs.org)
📱 LINE Developers AccountSign up free at the LINE Developers Console
🔑 OpenAI API KeySign up at OpenAI and create an API key (small cost) — or use Claude API instead
🌐 ngrok or TailscaleCreates a tunnel so LINE can reach your computer from the internet (both have free tiers)

⚠️ Important — สำคัญ

English: If your computer goes to sleep or shuts down, the bot will stop working. If you want a bot that runs 24/7, you need to keep your computer on or use a cloud server instead.

ไทย: ถ้าคอมพิวเตอร์ดับหรือ sleep บอทจะหยุดทำงาน ถ้าต้องการบอทที่ทำงาน 24 ชั่วโมง ต้องเปิดคอมไว้ตลอดหรือใช้ cloud server แทน

📋 ขั้นตอนการติดตั้ง
Step-by-Step Setup Guide

1 สร้าง LINE Bot — Create a LINE Bot

🇹🇭 ภาษาไทย

1. ไปที่ LINE Developers Console แล้วล็อกอินด้วยบัญชี LINE ของคุณ

2. สร้าง Provider ใหม่ (ตั้งชื่ออะไรก็ได้ เช่น "My AI Bot")

3. สร้าง Messaging API Channel ใหม่

4. ไปที่แท็บ Messaging API แล้วคลิก Issue เพื่อสร้าง Channel Access Token

5. คัดลอก Channel Access Token และ Channel Secret เก็บไว้

🇬🇧 English

1. Go to the LINE Developers Console and log in with your LINE account

2. Create a new Provider (name it anything, e.g., "My AI Bot")

3. Create a new Messaging API Channel

4. Go to the Messaging API tab and click Issue to generate a Channel Access Token

5. Copy both the Channel Access Token and Channel Secret

💡 Tip — เคล็ดลับ

English: If you already have a LINE bot from a previous lesson, you can reuse it! Just update the webhook URL later.

ไทย: ถ้ามี LINE bot จากบทเรียนก่อนแล้ว ใช้ตัวเดิมได้เลย! แค่อัปเดต webhook URL ทีหลัง

2 ติดตั้ง OpenClaw — Install OpenClaw

🇹🇭 ภาษาไทย

เปิด Terminal (Mac/Linux) หรือ Command Prompt (Windows) แล้วพิมพ์คำสั่งเหล่านี้:

🇬🇧 English

Open Terminal (Mac/Linux) or Command Prompt (Windows) and type these commands:

# Install OpenClaw globally (ติดตั้ง OpenClaw)
npm install -g openclaw

# Install the LINE plugin (ติดตั้งปลั๊กอิน LINE)
openclaw plugins install @openclaw/line

# Start the Gateway for the first time (เริ่ม Gateway ครั้งแรก)
openclaw gateway start

💡 Tip — เคล็ดลับ

English: If you don't have Node.js, download it from nodejs.org first. npm comes included with Node.js.

ไทย: ถ้ายังไม่มี Node.js ให้ดาวน์โหลดจาก nodejs.org ก่อน npm จะมาพร้อมกับ Node.js

3 ตั้งค่า — Configure OpenClaw

🇹🇭 ภาษาไทย

แก้ไขไฟล์ตั้งค่าที่ ~/.openclaw/openclaw.json (OpenClaw สร้างไฟล์นี้ให้อัตโนมัติเมื่อเริ่มครั้งแรก)

ใส่ข้อมูล AI model และ LINE credentials:

🇬🇧 English

Edit the config file at ~/.openclaw/openclaw.json (OpenClaw creates this automatically on first start)

Add your AI model settings and LINE credentials:

// ~/.openclaw/openclaw.json
// ไฟล์ตั้งค่าของ OpenClaw
{
  // AI Model settings (ตั้งค่า AI model)
  "model": "openai/gpt-4o-mini",

  // Channel settings (ตั้งค่าช่องทาง)
  "channels": {
    "line": {
      "enabled": true,
      "channelAccessToken": "YOUR_LINE_TOKEN_HERE",
      "channelSecret": "YOUR_LINE_SECRET_HERE",
      "dmPolicy": "pairing"
    }
  }
}

⚠️ Security — ความปลอดภัย

English: Never share your openclaw.json publicly! It contains your API keys. If someone gets your keys, they can use your account and you will be charged.

ไทย: อย่าแชร์ไฟล์ openclaw.json ให้ใคร! มันมี API keys ของคุณ ถ้าใครได้ key ไปจะใช้บัญชีของคุณได้

4 สร้างอุโมงค์ — Create a Tunnel

🇹🇭 ภาษาไทย

LINE ต้องส่งข้อความมาที่คอมของคุณผ่านอินเทอร์เน็ต แต่คอมคุณอยู่หลัง router ต้องสร้าง "อุโมงค์" ให้ LINE เข้าถึงได้

เปิด Terminal อีกหน้าต่างหนึ่ง แล้วพิมพ์:

🇬🇧 English

LINE needs to send messages to your computer through the internet, but your computer is behind a router. You need to create a "tunnel" so LINE can reach it.

Open another Terminal window and type:

# Option 1: Using ngrok (ตัวเลือก 1: ใช้ ngrok)
ngrok http 18789

# Option 2: Using Tailscale Funnel (ตัวเลือก 2: ใช้ Tailscale)
tailscale funnel 18789

🇹🇭 สิ่งที่จะเห็น (ngrok)

ngrok จะแสดง URL แบบนี้:

Forwarding https://abc123.ngrok-free.app → http://localhost:18789

คัดลอก URL ที่ขึ้นต้นด้วย https://

🇬🇧 What You'll See (ngrok)

ngrok will show a URL like:

Forwarding https://abc123.ngrok-free.app → http://localhost:18789

Copy the URL that starts with https://

5 ตั้งค่า Webhook URL — Set the Webhook URL in LINE

🇹🇭 ภาษาไทย

1. กลับไปที่ LINE Developers Console

2. ไปที่แท็บ Messaging API

3. ในส่วน Webhook URL ใส่ URL จาก ngrok แล้วเพิ่ม /line/webhook ต่อท้าย

4. เปิดใช้งาน "Use webhook"

5. คลิก Verify — ถ้าขึ้น "Success" แสดงว่าเชื่อมต่อสำเร็จ!

🇬🇧 English

1. Go back to the LINE Developers Console

2. Go to the Messaging API tab

3. In the Webhook URL field, paste your tunnel URL and add /line/webhook at the end

4. Enable "Use webhook"

5. Click Verify — if it says "Success", the connection works!

# Your webhook URL should look like this:
# URL webhook ของคุณจะหน้าตาแบบนี้:
https://abc123.ngrok-free.app/line/webhook

6 ทดสอบ! — Test It!

🇹🇭 ภาษาไทย

1. ตรวจสอบว่า OpenClaw Gateway ยังทำงานอยู่ (ดูใน Terminal ที่รัน openclaw gateway start)

2. เปิด LINE บนมือถือ

3. เพิ่มบอทเป็นเพื่อน (สแกน QR Code จาก LINE Developers Console)

4. พิมพ์ข้อความอะไรก็ได้ เช่น "สวัสดี" หรือ "What is AI?"

5. รอสักครู่ แล้ว AI จะตอบกลับมาใน LINE! 🎉

🇬🇧 English

1. Make sure the OpenClaw Gateway is still running (check the Terminal with openclaw gateway start)

2. Open LINE on your phone

3. Add the bot as a friend (scan the QR Code from LINE Developers Console)

4. Type any message, like "Hello" or "What is AI?"

5. Wait a moment, and the AI will reply on LINE! 🎉

🧪 Section Check — ตรวจสอบความเข้าใจ

Setup Steps & Conditionals — ขั้นตอนติดตั้งและ If...then

0/3

What should you add to the end of the tunnel URL when setting the webhook in LINE?

คุณต้องเพิ่มอะไรต่อท้าย URL ของอุโมงค์เมื่อตั้ง webhook ใน LINE?

/line/webhook
/callback
/api/messages
✅ The webhook URL should end with /line/webhook. This is the endpoint that OpenClaw's LINE plugin listens on. — URL ต้องลงท้ายด้วย /line/webhook ซึ่งเป็นจุดรับข้อมูลของปลั๊กอิน LINE

Complete: "If the config file is missing the API key, the AI ______ generate responses."

เติมคำ: "ถ้าไฟล์ config ไม่มี API key AI ______ สร้างคำตอบได้"

will (จะ)
won't (จะไม่)
can (สามารถ)
✅ "If the config file is missing the API key, the AI won't generate responses." First conditional: If + present, will/won't + base verb. — ถ้าไม่มี API key AI จะสร้างคำตอบไม่ได้

What port does the OpenClaw Gateway run on by default?

OpenClaw Gateway รันบน port อะไรโดยปริยาย?

5000
18789
3000
✅ The OpenClaw Gateway runs on port 18789 by default. That's why the ngrok command is ngrok http 18789. — Gateway รันบน port 18789 โดยปริยาย

🖥️ สั่งงานคอมจาก LINE!
Running PC Commands from LINE!

🇹🇭 ภาษาไทย

นี่คือส่วนที่เจ๋งที่สุด! OpenClaw มีเครื่องมือ exec ที่ให้ AI รันคำสั่งบนคอมของคุณได้ แปลว่าคุณสามารถพิมพ์ข้อความใน LINE บนมือถือ แล้ว AI จะไปทำงานบนคอมพิวเตอร์ของคุณจริงๆ!


ตัวอย่างสิ่งที่ทำได้:

  • ถาม "คอมฉันเหลือ disk space เท่าไหร่?" → AI รันคำสั่งเช็คแล้วตอบกลับ
  • สั่ง "เปิดไฟล์ report.pdf" → AI เปิดไฟล์ให้บนคอม
  • ถาม "process อะไรกิน RAM เยอะสุด?" → AI เช็คแล้วบอก
  • สั่ง "สร้างโฟลเดอร์ใหม่ชื่อ photos" → AI สร้างให้เลย

🇬🇧 English

This is the coolest part! OpenClaw has an exec tool that lets the AI execute commands on your computer. This means you can type a message in LINE on your phone and the AI will actually do things on your PC!


Examples of what you can do:

  • Ask "How much disk space is left?" → AI runs the command and replies
  • Say "Open the file report.pdf" → AI opens it on your computer
  • Ask "What process is using the most RAM?" → AI checks and tells you
  • Say "Create a new folder called photos" → AI creates it

⚠️ Security — ความปลอดภัย

English: The exec tool gives the AI access to run commands on your computer. OpenClaw has security features like DM pairing (unknown users get a pairing code) and sandbox mode (group chats can be sandboxed in Docker). But be careful — only pair with people you trust!

ไทย: เครื่องมือ exec ให้ AI เข้าถึงคอมของคุณได้ OpenClaw มีระบบความปลอดภัยเช่น DM pairing (คนแปลกหน้าต้องใส่รหัสจับคู่) และ sandbox mode (แชทกลุ่มจำกัดสิทธิ์ใน Docker) แต่ระวัง — จับคู่กับคนที่ไว้ใจเท่านั้น!

🎨 ปรับแต่งบอทของคุณ
Customizing Your Bot

🇹🇭 ภาษาไทย

คุณสามารถเปลี่ยน AI model ที่ใช้ได้ในไฟล์ openclaw.json:

🇬🇧 English

You can change which AI model to use in the openclaw.json config:

Model / โมเดลConfig Value / ค่าตั้งNotes / หมายเหตุ
🧠 GPT-4o Mini "openai/gpt-4o-mini" Fast and cheap — เร็วและถูก
🧠 GPT-4o "openai/gpt-4o" More capable, slightly slower — ฉลาดกว่า ช้ากว่านิดหน่อย
🤖 Claude Sonnet "anthropic/claude-sonnet-4-6" Excellent at Thai! — เก่งภาษาไทยมาก!
🤖 Claude Opus "anthropic/claude-opus-4-6" Most capable model — โมเดลที่เก่งที่สุด

💡 Pro Tip — เคล็ดลับมือโปร

English: OpenClaw supports model failover — if one model is unavailable, it automatically switches to a backup. You can also set up different models for different channels!

ไทย: OpenClaw รองรับ model failover — ถ้าโมเดลหนึ่งใช้ไม่ได้ จะสลับไปใช้โมเดลสำรองอัตโนมัติ ตั้งค่าโมเดลต่างกันสำหรับแต่ละช่องทางได้!

🔧 แก้ปัญหาที่พบบ่อย
Common Problems & Solutions

Problem / ปัญหาSolution / วิธีแก้
❌ LINE says "Webhook verification failed"
LINE แจ้ง "Webhook verification failed"
Make sure both the Gateway AND the tunnel (ngrok) are running. Check that the URL ends with /line/webhook
ตรวจสอบว่า Gateway และ tunnel ทำงานอยู่ และ URL ลงท้ายด้วย /line/webhook
❌ Bot doesn't reply
บอทไม่ตอบ
Check your openclaw.json — make sure the AI model API key is correct. Check the Terminal for errors.
ตรวจไฟล์ openclaw.json ว่า API key ถูกต้อง ดู error ใน Terminal
❌ ngrok URL changed
URL ของ ngrok เปลี่ยน
Free ngrok gives a new URL every restart. Update the Webhook URL in LINE Developers Console. Consider Tailscale Funnel for a stable URL.
ngrok ฟรีให้ URL ใหม่ทุกครั้ง อัปเดตใน LINE Console ลองใช้ Tailscale Funnel สำหรับ URL ถาวร
❌ "npm: command not found"
หา npm ไม่เจอ
Install Node.js from nodejs.org. npm comes included with Node.js.
ติดตั้ง Node.js จาก nodejs.org — npm มาพร้อมกับ Node.js
❌ DM pairing code required
ต้องใส่รหัสจับคู่
This is a security feature! The pairing code appears in the Gateway terminal. Send it to pair your LINE account.
นี่คือระบบความปลอดภัย! รหัสจับคู่จะแสดงใน Terminal ส่งรหัสนั้นเพื่อจับคู่บัญชี LINE

📝 Grammar Focus — If...then (Conditionals)

First Conditional — สิ่งที่เป็นไปได้ในอนาคต

Use the first conditional to talk about things that will probably happen. Pattern: If + present simple, will + base verb

ใช้ first conditional พูดถึงสิ่งที่น่าจะเกิดขึ้น โครงสร้าง: If + ปัจจุบัน, will + กริยาช่อง 1

✅ If you type a message in LINE, the AI will reply through OpenClaw.

ถ้าคุณพิมพ์ข้อความใน LINE AI จะตอบผ่าน OpenClaw

✅ If the Gateway crashes, the bot won't be able to respond.

ถ้า Gateway ล่ม บอทจะตอบไม่ได้

✅ If you change the AI model, the responses will be different.

ถ้าเปลี่ยน AI model คำตอบจะต่างออกไป

❌ If you will type a message, the bot replies.

✅ If you type a message, the bot will reply.

อย่าใช้ "will" ในส่วน if — ใช้ present simple

Zero Conditional — ความจริงทั่วไป (Facts)

Use the zero conditional for things that are always true. Pattern: If + present simple, present simple

ใช้ zero conditional สำหรับสิ่งที่เป็นจริงเสมอ: If + ปัจจุบัน, ปัจจุบัน

✅ If the tunnel stops, LINE can't reach your computer.

ถ้าอุโมงค์หยุด LINE เข้าถึงคอมคุณไม่ได้

✅ If you install a plugin, OpenClaw gains new features.

ถ้าติดตั้งปลั๊กอิน OpenClaw จะมีฟีเจอร์ใหม่

🧪 Section Check — ตรวจสอบความเข้าใจ

Grammar & Features — ไวยากรณ์และฟีเจอร์

0/3

Choose the correct conditional: "If the user ______ in Thai, the AI will reply in Thai."

เลือกคำที่ถูกต้อง: "ถ้าผู้ใช้______ เป็นภาษาไทย AI จะตอบเป็นภาษาไทย"

writes (present simple)
will write (future)
is writing (continuous)
✅ First conditional: If + present simple, will + base verb. "If the user writes in Thai, the AI will reply in Thai." Never use "will" in the if-clause. — ในส่วน if ใช้ present simple เสมอ

What tool does OpenClaw use to run commands on your computer?

OpenClaw ใช้เครื่องมืออะไรรันคำสั่งบนคอมของคุณ?

exec
os.execute
bash.command
exec is OpenClaw's tool for executing commands on your computer. It returns stdout, stderr, and exit code. Be careful — it has full access to your host system in the main session! — exec คือเครื่องมือที่ให้ AI รันคำสั่งบนคอมของคุณ

Complete: "If the tunnel ______, LINE can't reach your computer." (Zero conditional)

เติมคำ: "ถ้าอุโมงค์______ LINE เข้าถึงคอมคุณไม่ได้" (zero conditional)

stops (present simple)
will stop (future)
stopped (past)
✅ Zero conditional uses present simple in both clauses: "If the tunnel stops, LINE can't reach your computer." This is always true, not a prediction. — Zero conditional ใช้ present simple ทั้งสองส่วน

📊 สรุป
Summary — What We Learned

🇹🇭 ภาษาไทย

  • OpenClaw คือแพลตฟอร์ม AI ส่วนตัวแบบ open-source ที่รันบนคอมของคุณ
  • เขียนด้วย TypeScript ติดตั้งผ่าน npm
  • มี LINE plugin ในตัว — ไม่ต้องเขียนโค้ด webhook เอง!
  • Gateway รันบน port 18789 เป็นศูนย์กลางรับ-ส่งข้อความ
  • รองรับ AI หลายรุ่น — ChatGPT, Claude และอื่นๆ
  • exec ให้ AI รันคำสั่งบนคอมของคุณได้จาก LINE!
  • ใช้ ngrok หรือ Tailscale Funnel สร้างอุโมงค์
  • ตั้งค่าผ่านไฟล์ openclaw.json

🇬🇧 English

  • OpenClaw is an open-source personal AI platform that runs on your computer
  • Written in TypeScript, installed via npm
  • Has a built-in LINE plugin — no custom webhook code needed!
  • The Gateway runs on port 18789 as the central message hub
  • Supports multiple AI models — ChatGPT, Claude, and more
  • exec lets the AI execute commands on your PC from LINE!
  • Use ngrok or Tailscale Funnel to create a tunnel
  • Configured via openclaw.json

🎉 ยินดีด้วย! Congratulations!

ตอนนี้คุณรู้วิธีเชื่อมต่อ LINE กับ AI บนคอมของคุณ — แล้วยังสั่งงานคอมจากมือถือได้!

Now you know how to connect LINE to AI on your computer — and even control your PC from your phone!

If you send a message in LINE, then OpenClaw's AI will answer — or run a command on your computer! 🐾

📖 Glossary — คำศัพท์ท้ายบทเรียน

English WordThai DefinitionExample Sentence
Gatewayเกตเวย์ ศูนย์กลางที่รับและส่งข้อมูลระหว่างแอปแชทกับ AI"The Gateway runs on your computer."
WebhookURL ที่รับข้อมูลอัตโนมัติเมื่อมีเหตุการณ์เกิดขึ้น"LINE sends messages to your webhook."
Tunnelอุโมงค์เชื่อมต่อผ่านอินเทอร์เน็ต ทำให้เข้าถึงคอมจากภายนอกได้"ngrok creates a tunnel to your computer."
API Keyรหัสลับสำหรับเข้าใช้บริการออนไลน์ เหมือนรหัสผ่าน"Never share your API key publicly."
Pluginส่วนเสริมที่เพิ่มความสามารถให้โปรแกรม"Install the LINE plugin for OpenClaw."
Open-sourceซอฟต์แวร์ที่เปิดเผยซอร์สโค้ดให้ทุกคนใช้และแก้ไขได้ฟรี"OpenClaw is an open-source project."
Terminalโปรแกรมที่ใช้พิมพ์คำสั่งควบคุมคอมพิวเตอร์"Open the Terminal and type the command."
Configurationการตั้งค่า กระบวนการปรับแต่งให้โปรแกรมทำงานตามต้องการ"Edit the configuration file."
Failoverระบบสำรอง สลับไปใช้ตัวสำรองอัตโนมัติเมื่อตัวหลักใช้ไม่ได้"OpenClaw supports model failover."
Sandboxสภาพแวดล้อมที่แยกออกมา จำกัดสิทธิ์เพื่อความปลอดภัย"Group chats can run in a sandbox."
Pairingการจับคู่ ยืนยันตัวตนก่อนให้ใช้งาน"DM pairing prevents unauthorized access."
Executeรัน/ดำเนินการ ทำให้คำสั่งหรือโปรแกรมทำงาน"The AI can execute commands on your PC."