LINE Integration
Connect OpenClaw to LINE Messenger
LINE dominates messaging in Japan, Taiwan, Thailand, and Indonesia with over 200 million monthly active users. OpenClaw integrates with LINE's Messaging API to deliver AI-powered chatbot experiences. Access rich message types, Flex Messages for beautiful layouts, LINE Login for user identity, and LIFF mini-apps - all powered by intelligent conversation.
Setup Guide
Create LINE Developer Account
Register for a LINE developer account if you don't have one. Then create a provider (represents you or your company) and a Messaging API channel (represents your bot).
# 1. Go to LINE Developers Console
# https://developers.line.biz/console/
# 2. Log in with LINE account or business account
# 3. Create a Provider
# - Click 'Create New Provider'
# - Enter provider name (your company name)
# 4. Create Messaging API Channel
# - Select your provider
# - Click 'Create a new channel'
# - Choose 'Messaging API'
# - Fill in channel details:
# - Channel name: OpenClaw AI
# - Channel description: AI-powered assistant
# - Category: Select appropriate
# - Subcategory: Select appropriate
# 5. Note your credentials:
# - Channel ID
# - Channel Secret
# - Channel Access Token (generate long-lived token) Configure Webhook Settings
Set up the webhook URL where LINE will send events. Enable webhook and disable auto-reply (you'll handle replies through OpenClaw).
# In LINE Developers Console > Your Channel > Messaging API:
# 1. Webhook settings:
# Webhook URL: https://yourdomain.com/line/webhook
#
# Enable 'Use webhook'
# Verify webhook (LINE will send test request)
# 2. Auto-reply messages:
# Disable 'Auto-reply messages' (greeting message)
# Disable 'Greeting messages' if using custom welcome
# 3. LINE Official Account features:
# Response mode: Bot
#
# Go to LINE Official Account Manager if needed:
# https://manager.line.biz/
# 4. Issue Channel Access Token:
# Click 'Issue' for long-lived token
# Copy and save securely Install LINE Bridge Module
Add the LINE bridge to your OpenClaw installation. The bridge handles LINE's message format, webhook signature verification, and rich message construction.
# Using OpenClaw CLI
openclaw install line-bridge
# Or manual installation
cd /path/to/openclaw
npm install @openclaw/line-bridge
# This installs LINE SDK
npm install @line/bot-sdk
# Verify installation
openclaw plugins list | grep line Configure LINE Connection
Create your LINE configuration file with channel credentials and message handling settings. Configure how OpenClaw responds to different event types.
# config/line.yaml
line:
enabled: true
# Channel credentials
channel_id: "YOUR_CHANNEL_ID"
channel_secret: "YOUR_CHANNEL_SECRET"
channel_access_token: "YOUR_CHANNEL_ACCESS_TOKEN"
# Webhook settings
webhook:
path: "/line/webhook"
port: 443
# Message handling
messages:
reply_timeout_ms: 1000 # Soft limit before async
use_push_for_slow: true # Push instead of reply if slow
# Event types to handle
events:
message: true
follow: true
unfollow: true
join: true
leave: true
postback: true Configure Rich Messages
Set up Flex Message templates and quick reply options. Create visually appealing responses that take advantage of LINE's rich messaging capabilities.
# config/line-templates.yaml
templates:
# Flex Message for AI responses
ai_response:
type: flex
altText: "AI Response"
contents:
type: bubble
body:
type: box
layout: vertical
contents:
- type: text
text: "${response}"
wrap: true
size: md
footer:
type: box
layout: horizontal
contents:
- type: button
style: primary
action:
type: postback
label: "Helpful"
data: "feedback=helpful"
- type: button
style: secondary
action:
type: postback
label: "Not Helpful"
data: "feedback=not_helpful"
# Quick replies
quick_replies:
suggestions:
type: text
text: "What would you like to know?"
quickReply:
items:
- type: action
action:
type: message
label: "Help"
text: "Help"
- type: action
action:
type: message
label: "Menu"
text: "Show menu" Configure Rich Menu
Create a rich menu that appears at the bottom of the chat. Design custom images with tap regions that trigger different bot actions.
# config/line-richmenu.yaml
rich_menu:
enabled: true
default: main_menu
menus:
main_menu:
size:
width: 2500
height: 843
selected: true
name: "Main Menu"
chatBarText: "Menu"
areas:
# Left third - Ask AI
- bounds:
x: 0
y: 0
width: 833
height: 843
action:
type: message
text: "I have a question"
# Middle third - Services
- bounds:
x: 833
y: 0
width: 834
height: 843
action:
type: uri
uri: "https://yourwebsite.com/services"
# Right third - Help
- bounds:
x: 1667
y: 0
width: 833
height: 843
action:
type: postback
data: "action=help"
# Image file path
image: "./assets/line-rich-menu.png"
# Deploy rich menu:
openclaw line richmenu deploy Configure AI Response Behavior
Set up how OpenClaw processes LINE messages and handles different content types. Configure personality and response formatting for LINE's unique communication style.
# config/line-ai.yaml
ai_responses:
# LINE-specific personality
personality: friendly_assistant
tone: casual_helpful # LINE culture is more casual
# Emoji and sticker handling
expression:
use_emoji: true
suggest_stickers: false # Can't send stickers as bot
emoji_style: unicode
# Message type handlers
handlers:
text: ai_response
image: analyze_and_respond
video: describe_and_respond
audio: transcribe_and_respond
location: contextual_response
sticker: acknowledge_with_text
# Response formatting
format:
max_length: 5000 # LINE limit
use_flex_messages: true
break_into_bubbles: true # Multiple bubbles for long responses
# Event handlers
events:
follow: welcome_new_user
unfollow: log_only
join: group_welcome
leave: log_only
postback: handle_postback Test and Deploy
Test your LINE bot by adding it as a friend and sending messages. Verify all message types and rich features work correctly.
# Start the LINE bridge
openclaw line start
# Check status
openclaw line status
# View logs
openclaw logs line --follow
# Get bot QR code / LINE ID
openclaw line info
# Test by adding bot as friend:
# 1. Open LINE app
# 2. Add friend by QR code or LINE ID
# 3. Send a message
# 4. Verify AI response
# Test specific features:
openclaw line test --feature flex-message
openclaw line test --feature rich-menu What You Can Do
Customer Service Japan
Provide customer support in Japanese through LINE, the preferred communication channel for Japanese consumers. Handle inquiries, process orders, and resolve issues with AI that understands Japanese language and culture.
E-commerce Integration
Create shopping experiences within LINE. Browse products, get recommendations, ask questions, and complete purchases. Integrate with LINE Pay for seamless transactions in supported markets.
Appointment Booking
Let customers book appointments through conversational AI. Salons, clinics, restaurants, and service businesses use LINE bots to manage reservations. Send reminders and handle rescheduling automatically.
Food Delivery Assistance
Food delivery is huge on LINE. Help users browse menus, customize orders, track deliveries, and handle issues. Integrate with delivery platforms popular in Asian markets.
Travel Concierge
Assist travelers with itinerary planning, local recommendations, translation help, and booking services. Popular for both inbound tourism to Japan and outbound travel from LINE markets.
Entertainment and Media
Distribute content, run interactive campaigns, and engage fans through LINE. Media companies use AI bots for news delivery, personalized content, and audience interaction.
Financial Services
Banks and fintech companies provide account information, transaction support, and financial advice through LINE. Secure authentication through LINE Login enables personalized service.
Education Support
Language learning apps, tutoring services, and educational institutions use LINE bots for lesson delivery, practice exercises, and student support. Interactive AI makes learning engaging.
Healthcare Assistance
Healthcare providers use LINE for appointment scheduling, medication reminders, health information, and patient communication. AI handles routine queries while escalating medical concerns appropriately.
Known Limitations
- Reply tokens expire after 30 seconds - must respond quickly or use push messages
- Push messages have monthly limits based on your LINE Official Account plan
- Bots cannot send LINE stickers (only receive and interpret them)
- Rich menus require image creation - cannot be generated dynamically
- Group chat functionality requires separate permissions and has different limitations
- User profile access limited - detailed info requires LINE Login integration
- Flex Messages have size limits (~50KB) for complex layouts
- LIFF apps require separate development and deployment
- Some features vary by country (LINE Pay availability, etc.)
- Free plan limited to 500 messages/month - business use requires paid plans
- Our team can help you work around these limitations with custom configurations
Related Content
Bring OpenClaw AI Power to Your Discord Server
Deploy OpenClaw as a Discord bot for your server. Automate moderation, answer questions, manage communities, run games, and provide AI assistance to all your members with slash commands and rich embeds.
Supercharge Your Gmail with OpenClaw AI
Connect OpenClaw to Gmail for intelligent email management. Automatically summarize messages, draft responses, organize your inbox, and manage emails through natural language commands.
OpenClaw on Matrix: Decentralized AI for a Decentralized World
Deploy OpenClaw on the Matrix protocol for a truly decentralized AI assistant. Self-host everything, federate with others, and maintain complete sovereignty over your AI interactions.
Deploy OpenClaw on Facebook Messenger
Deploy OpenClaw as a Facebook Messenger bot for personal or business use. Automate customer service, handle inquiries, and provide 24/7 AI assistance through the platform with 1.3 billion users.