Package Information
Documentation
n8n-nodes-line-messaging
This is an n8n community node. It lets you use LINE Messaging API in your n8n workflows.
LINE Messaging API enables developers to build chatbots and integrate messaging features into their services with the LINE platform, which is especially popular in Japan, Thailand, Taiwan, and other parts of Asia.
n8n is a fair-code licensed workflow automation platform.
Installation
Follow the installation guide in the n8n community nodes documentation.
npm install @aotoki/n8n-nodes-line-messaging
Operations
This node provides the following operations:
Line Messaging Node
- Reply: Reply to a user's message using the replyToken
- Send: Proactively send messages to users using their User ID
- Multicast: Send messages to multiple users simultaneously (up to 500 recipients)
- Get Profile: Retrieve user profile information
Line Messaging Data Node
- Get Content: Retrieve content (images, videos, audio, files) from message IDs
Line Messaging Trigger Node
- Webhook: Receive events from LINE Messaging API
Credentials
You need to set up a LINE Bot channel in the LINE Developers Console before using this node.
- Create a new provider and channel in the LINE Developers Console
- Enable the Messaging API option
- Get your Channel Secret and Channel Access Token from the Basic Settings and Messaging API tabs
- Use these credentials when setting up the node in n8n
Compatibility
- Requires n8n version 1.0.0 or later
- Built without external dependencies to comply with n8n verified node requirements
Usage
Setting up a LINE Bot Webhook
- Create a workflow with the LINE Messaging Trigger node
- Configure the node to listen for the events you're interested in
- Copy the webhook URL from the trigger node
- Set this URL as your webhook URL in the LINE Developers Console
- Add a verification step in your workflow to validate the signature using the Channel Secret
Responding to Messages
- When a message is received, your workflow will be triggered
- You can access the
replyTokenfrom the trigger output - Use the LINE Messaging node with the "Reply" operation to send a response
- Set the reply token and add the messages you want to send
Sending Proactive Messages
- Use the LINE Messaging node with the "Send" operation
- Provide the User ID of the recipient (format: U1234567890abcdef...)
- Add the messages you want to send
- This allows sending messages without waiting for user interaction
Sending Bulk Messages (Multicast)
- Use the LINE Messaging node with the "Multicast" operation
- Provide comma-separated User IDs (e.g., "U1234..., U5678..., U9012...")
- Add the messages you want to send to all recipients
- Supports up to 500 recipients per operation for efficient bulk messaging
Getting User Profiles
- Use the LINE Messaging node with the "Get Profile" operation
- Provide the User ID to retrieve profile information
- Get user's display name, profile picture, and status message
Retrieving Media Content
- When a media message (image, video, audio, file) is received, you get a message ID
- Use the LINE Messaging Data node with the "Get Content" operation
- Provide the message ID to download the content as binary data
- The content can then be processed, saved, or sent to other services
Example: Simple Echo Bot
This example workflow receives messages and echoes them back to the user:
- Add a LINE Messaging Trigger node and configure it to listen for "message" events
- Add a LINE Messaging node configured to "Reply"
- Set the "Reply Token" field to use the replyToken from the trigger output:
{{$json.replyToken}} - Add a text message with the content:
You said: {{$json.message.text}}
Features
- Multiple Messaging Types: Reply to messages, send to individuals, or multicast to groups
- Bulk Messaging: Send to up to 500 recipients simultaneously with multicast operation
- Text Messages (V2): Send text messages with quote tokens and quick reply buttons
- Quick Replies: Add postback and message action buttons to messages
- Quote Messages: Reference previous messages in conversations
- User Profiles: Retrieve user display names, pictures, and status messages
- Media Content: Download images, videos, audio files, and documents
- Webhook Events: Receive all LINE webhook events for comprehensive bot functionality
- No External Dependencies: Built using only n8n-workflow types and Node.js built-ins
Development
To develop and test this node locally:
# Clone the repository
git clone git@github.com:elct9620/n8n-nodes-line-messaging.git
cd n8n-nodes-line-messaging
# Install dependencies
pnpm install
# Start the development server
pnpm n8n-node dev
The pnpm n8n-node dev command will start a local n8n instance with the node loaded for development and testing. This replaces the previous Docker-based development setup.
For more development commands, see the available scripts:
# Build the project
pnpm build
# Run linting
pnpm lint
# Format code
pnpm format