ใช้ OpenClaw Channel ร่วมกับ LINE ( Messaging API )

 

 ใช้ OpenClaw Channel ร่วมกับ LINE ( Messaging API ) 

Image

ใน OpenClaw คำว่า Channel คือช่องทางการสื่อสารที่ผู้ใช้ใช้คุยกับ Agent หรือ AI ของคุณ เช่น Discord, Telegram, Slack, WhatsApp, LINE, Google Chat, Microsoft Teams และ WebChat เป็นต้น โดย OpenClaw ทำหน้าที่เป็น Gateway เชื่อมต่อทุกช่องทางเหล่านี้เข้ากับ Agent ตัวเดียวกัน

Channel ที่รองรับ

OpenClaw รองรับหลายช่องทาง เช่น

  • Discord
  • Telegram
  • Slack
  • WhatsApp
  • Microsoft Teams
  • Google Chat
  • LINE
  • Signal
  • Matrix
  • IRC
  • iMessage (ผ่าน BlueBubbles)
  • WebChat (หน้าเว็บของ OpenClaw) 

การใช้ OpenClaw ร่วมกับ LINE คือการทำให้ AI Agent ของ OpenClaw  สามารถรับ–ส่งข้อความผ่านแอป LINE ได้ เหมือนเป็น LINE Bot ส่วนตัวของเรา โดย OpenClaw รองรับผ่าน LINE Messaging API โดยตรงครับ

Line Platform workflow.

สิ่งที่ต้องมี

  1. ติดตั้ง OpenClaw บน Local PC/Notebook หรือ Server ก่อน
  2. มีบัญชี LINE Developers
  3. สร้าง LINE Messaging API
  4. Webhook ต้องเข้าจากอินเทอร์เน็ตได้ผ่าน HTTPS

Check your OpenClaw Channel Settings on OpenClaw Dashboard

ตอนนี้ ยังไม่ได้มีการติดตั้ง Channel

ขั้นตอนการติดตั้ง

1) ติดตั้ง LINE plugin ใน OpenClaw

openclaw plugins install @openclaw/line

OpenClaw docs ระบุว่าปลั๊กอินนี้เป็นช่องทางมาตรฐานสำหรับ LINE integration

 

2. สร้าง LINE Messaging API

เข้า:   LINE Developers Console

จากนั้น:

  • Create Provider

  • Create Messaging API Channel

  • เปิด “Use webhook”

  • คัดลอก:

    • Channel access token

    • Channel secret

 Login LINE account

 
Create New Provider and Basic Setting

 
Get YOUR_CHANNEL_SECRET in Basic Setting.


Get
YOUR_ACCESS_TOKEN in Messager API


3) Config OpenClaw

แก้ไฟล์:   ~/.openclaw/openclaw.json

เพิ่ม:

{

  "channels": {

    "line": {

      "enabled": true,

      "channelAccessToken": "YOUR_ACCESS_TOKEN",

      "channelSecret": "YOUR_CHANNEL_SECRET",

"webhookPath": "/line/webhook", 

      "dmPolicy": "pairing"

    }

  }

}

4. ตั้งค่า Webhook ของ LINE

ใน LINE Developers:

Webhook URL:  https://YOUR-DOMAIN/line/webhook

เช่น:  https://ai.example.com/line/webhook    ( ต้องเป็น HTTPS เท่านั้น )

ถ้ารัน local: ใช้ tunnel เช่น

  • Cloudflare Tunnel
  • ngrok
  • Nginx

ตัวอย่าง Nginx:

location /line/webhook {

    proxy_pass http://127.0.0.1:18789/line/webhook;

}

ตัวอย่าง:    cloudflared tunnel --url http://localhost:18789 ( Cloudflare Install )

แล้วเอา public URL ไปใส่ใน LINE webhook



Webhook URL by cloudflared

5. Restart OpenClaw

openclaw gateway restart

openclaw gateway status    # Check status

openclaw gateway restart  # Restart gateway

openclaw health                 # Verify health

openclaw doctor             # Run diagnostics


Then Check Channel Setting on OpenClaw Dashboard.


6. Pairing LINE

  • Add Friend bot ของคุณ

  • ส่งข้อความเข้า LINE

  • OpenClaw จะตอบกลับ ส่งค่า pairing code มาให้

แปลว่า คนที่ทักเข้ามาต้องได้รับอนุมัติก่อน

ดูรายการ: openclaw pairing list line
อนุมัติ:      openclaw pairing approve line CODE


ฟีเจอร์ที่ LINE รองรับใน OpenClaw

OpenClaw + LINE รองรับ:

✅ Chat ส่วนตัว
✅ Group chat
✅ รูปภาพ
✅ Location
✅ Quick replies
✅ Flex messages
✅ Template messages

ยังไม่รองรับ:
❌ Reactions
❌ Threads (OpenClaw)


Use case ที่นิยม

  • ทำ AI customer support

  • ทำ personal assistant ผ่าน LINE

  • สั่งงาน automation เช่น

    • “เช็คยอดขายวันนี้”

    • “สรุปงานจาก Notion”

    • “ส่งแจ้งเตือนเข้า LINE”

เช่นเชื่อมกับ:
Notion
Google Sheets
Slack
GitHub


Reference

Adun Nantakaew อดุลย์ นันทะแก้ว

LINE : adunnan



ความคิดเห็น

โพสต์ยอดนิยมจากบล็อกนี้

ทดลอง ติดตั้งใช้งาน OpenClaw บน Local PC/Notebook ด้วย Ubuntu

Eval Llama v3.1 8B ,70B Model with Thai Language

LLAMA-CPP-PYTHON on RTX4060 GPU