@warnyin/n8n-nodes-line-messaging-api
v0.7.1
Published
n8n node for LINE Messaging API integration
Downloads
2,108
Readme
📱 LINE Messaging API for n8n
Powerful LINE Messaging API integration for n8n workflows
Send messages, manage users, and automate your LINE Official Account with ease
Installation • Features • Usage • Examples • Documentation
🚀 Installation
Option 1: Via n8n UI (Recommended)
- Open your n8n instance
- Navigate to Settings → Community Nodes
- Click "Install a community node"
- Enter:
@warnyin/n8n-nodes-line-messaging-api - Click Install
Option 2: Manual Installation
npm install @warnyin/n8n-nodes-line-messaging-apiOption 3: Docker
Add to your environment variables:
N8N_COMMUNITY_PACKAGES=@warnyin/n8n-nodes-line-messaging-api⚙️ Configuration
1. Create a LINE Messaging API Channel
- Visit LINE Developers Console
- Create a new Provider or select an existing one
- Create a Messaging API Channel
- Navigate to Messaging API tab
- Copy your Channel Access Token (issue one if needed)
- Copy your Channel Secret
2. Configure Credentials in n8n
- In n8n, go to Credentials → New Credential
- Search for LINE Messaging API
- Paste your Channel Access Token
- Paste your Channel Secret
- Click Save to test the connection
3. Set Up Webhook (Optional - for receiving messages)
To receive messages from LINE users:
- In n8n, create a new workflow
- Add a Webhook node
- Set HTTP Method to
POST - Set Path to something like
line-webhook - Copy the Production URL (e.g.,
https://your-n8n.com/webhook/line-webhook) - Go to LINE Developers Console
- Select your channel → Messaging API tab
- Under Webhook settings, click Edit
- Paste your n8n webhook URL
- Toggle Use webhook to Enabled
- Click Verify to test
✨ Features
📨 Message Operations
| Operation | Description | Max Recipients | |-----------|-------------|----------------| | Push | Send message to a specific user | 1 user | | Reply | Reply to user messages (requires reply token) | 1 user | | Multicast | Send message to multiple users | 500 users | | Broadcast | Send message to all followers | All followers |
💬 Message Types
Basic Messages
- 📝 Text
- 🖼️ Image
- 🎥 Video
- 🎵 Audio
Rich Messages
- 📍 Location
- 😊 Sticker
- 🎨 Flex (JSON-based)
👤 Profile Operations
- Get User Profile: Retrieve user information (display name, picture URL, status message)
📖 Usage
Basic Text Message
┌─────────────┐
│ LINE Node │
├─────────────┤
│ Resource: Message
│ Operation: Push
│ User ID: U1234567890abcdef
│ Message Type: Text
│ Text: Hello from n8n! 👋
└─────────────┘Reply to User Message
┌──────────────┐ ┌─────────────┐
│ Webhook Node │────▶│ LINE Node │
├──────────────┤ ├─────────────┤
│ Receive LINE │ │ Resource: Message
│ events │ │ Operation: Reply
└──────────────┘ │ Reply Token: {{$json.replyToken}}
│ Message Type: Text
│ Text: Thanks for your message!
└─────────────┘Send Image Message
┌─────────────┐
│ LINE Node │
├─────────────┤
│ Resource: Message
│ Operation: Push
│ User ID: U1234567890abcdef
│ Message Type: Image
│ Original Content URL: https://example.com/image.jpg
│ Preview Image URL: https://example.com/preview.jpg
└─────────────┘Send Flex Message
┌─────────────┐
│ LINE Node │
├─────────────┤
│ Resource: Message
│ Operation: Push
│ User ID: U1234567890abcdef
│ Message Type: Flex
│ Alt Text: Product Information
│ Flex Contents: {
│ "type": "bubble",
│ "body": {
│ "type": "box",
│ "layout": "vertical",
│ "contents": [...]
│ }
│ }
└─────────────┘🔄 Workflow Examples
Example 1: Auto-Reply Bot
Webhook (LINE) → Code (Extract message) → LINE (Reply)Code Node:
const event = $input.item.json.events[0];
return {
replyToken: event.replyToken,
userMessage: event.message.text,
userId: event.source.userId
};Example 2: Broadcast Daily Updates
Schedule Trigger → HTTP Request (Get data) → LINE (Broadcast)Example 3: User Info Lookup
Manual Trigger → LINE (Get Profile) → Set Node → ...🛠️ Development
Prerequisites
- Node.js ≥ 14
- npm or yarn
Local Setup
# Clone the repository
git clone https://github.com/warnyin/n8n-nodes-line-messaging-api.git
cd n8n-nodes-line-messaging-api
# Install dependencies
npm install
# Build the project
npm run build
# Link for local testing
npm link
# In your n8n directory
npm link @warnyin/n8n-nodes-line-messaging-apiAvailable Scripts
| Command | Description |
|---------|-------------|
| npm run build | Compile TypeScript and copy assets |
| npm run dev | Watch mode for development |
| npm run lint | Run ESLint |
| npm run lintfix | Fix ESLint issues automatically |
| npm run format | Format code with Prettier |
📚 Documentation
Official Resources
- 📘 LINE Messaging API Reference
- 🎨 Flex Message Simulator
- 🔧 n8n Community Nodes
- 💬 LINE Developers Community
Useful Links
🐛 Troubleshooting
- Verify your Channel Access Token is correct
- Ensure the token is a long-lived token (not short-lived)
- Check that the token hasn't expired
- Make sure you copied the token from the correct channel
The error message in v0.1.4+ will show detailed API responses to help debug.
- Ensure webhook URL is publicly accessible (https required)
- Verify "Use webhook" is enabled in LINE console
- Check webhook URL matches exactly in LINE console
- Test webhook verification in LINE console
- Ensure n8n workflow is activated
- Check User ID format is correct (starts with
U) - For replies, ensure reply token is valid (only usable once, expires in 1 minute)
- Verify message content meets LINE's requirements (e.g., URLs must be HTTPS)
- Check rate limits haven't been exceeded
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Built with n8n - Fair-code workflow automation
- Powered by LINE Messaging API
- Developed by @warnyin
Made with ❤️ for the n8n community
