Package Information
Available Nodes
Documentation generatingβ¦
Documentation
π¬ n8n-nodes-line-messaging
Plug-in to connect LINE Messaging API to n8n to easily send various types of messages such as text, stickers, videos, and templates via LINE.
π¦ Features
This plug-in fully supports sending various types of messages via LINE Messaging API:
- β Text Message β Send plain text messages
- β
Sticker Message β Send stickers from LINE (must specify
packageIdandstickerId) - β
Image Message β Send images from URL (
originalContentUrlandpreviewImageUrl) - β Video Message β Send videos from URL With preview images
- β Audio Message β Send audio files from a URL
- β Location Message β Share location (location name, address, latitude, longitude)
- β Imagemap Message β Send interactive images that can be clicked
- β Template Message β Messages with interactive buttons, such as Confirm or Buttons
- β Flex Message β Design messages flexibly with Flex Layout (similar to HTML + JSON)
- β Use expressions from other nodes in the workflow
βΉοΈ For more details, see LINE Message Types Documentation
Here you go! The following is a README that seamlessly integrates the "Creating and Setting Up a LINE Official Account" and "Finding a Chat Room ID" sections. Formatted for easy reading:
π οΈ Creating and setting up LINE Official Account
To use the LINE Messaging API, you need to create a LINE Official Account and set the following settings:
1. Create a LINE Official Account
- Go to https://account.line.biz/ and log in with your LINE account.
- Click the Create New button.
- Fill in all the information and press OK.
- When the system notifies you that you are done, press Go to LINE Official Account Manager.
2. Set up your basic profile.
- Press to accept the Terms of Use.
- Close the βWelcomeβ box by pressing the
Xin the upper right corner. - Change your profile picture by pressing Edit > Select a picture > Save.
- When the notification window appears, press Save.
3. Enable group participation.
- Scroll to the topic Using the feature
- Click Allow to join the group > Confirm by clicking OK
4. Enable Messaging API
- On the right menu, click Messaging API
- Click Use Messaging API
- Create an account administrator (Provider) by naming it and clicking Accept
- Click OK to confirm
- A summary window will appear, click OK
βοΈ Setting in LINE Developers Console
1. Access the LINE Developers Console
- Go to https://developers.line.biz/
- Click the Console button
- Select the Provider name you created
- Click the Channel name you created
2. Exit Channel Access Token
- Access the Messaging API menu
- Scroll down to find the Channel access token topic
- Click the button Issue
- Copy the obtained Token and save it (use in n8n Credential)
π Find User ID / Group ID for sending messages
How to view User ID with Webhook
Go to https://typedwebhook.tools/ and copy the Webhook link
Paste the link into the Webhook URL field of LINE Developers Console > then press Save
Send any message to the created LINE OA chat
Return to typedwebhook.tools:
- Press to view the data that appears
- Select to view in the JSON tab
- Find the
source.userIdvalue to use as UID for sending private messages
How to view the Group ID for sending to groups
- Invite LINE OA accounts to join the desired LINE group
- Send any message in the group
- Return to typedwebhook.tools:
- You will see a new entry (#2)
- Click to look in JSON
- Find the
source.groupIdvalue to use to send messages to groups
π Prerequisites
1. Install Node.js and n8n
npm install -g n8n
2. Create a LINE Channel
- Go to LINE Developers Console
- Create Messaging API Channel
- Enable Bot
- Collect Channel Access Token and User ID (UID)
π Installation
β Install via npm (recommended)
mkdir -p ~/.n8n/custom
cd ~/.n8n/custom
npm init -y
npm install n8n-LineMessage
π οΈ Local installation
git clone https://github.com/HakusaiTH/n8n-LineMessage.git
cd n8n-LineMessage
npm install
npm run build
npm link
# Connect to n8n's custom folder
mkdir -p ~/.n8n/custom
cd ~/.n8n/custom
npm init -y
npm link n8n-LineMessage
Then run:
n8n start
π LINE API Credentials Setup
- Go to the Credentials menu on n8n
- Create a new Credential:
accessToken= Channel Access Token
π§Ύ How to use Node Various
πΈ LineSendText
Function: Send plain text messages (Text Message) via LINE Messaging API
Usage:
Enter the message you want to send
You can use Expressions such as
{{ $json.message }}to retrieve messages from the previous Node
πΈ LineSendSticker
Function: Send stickers (Sticker Message) via LINE Messaging API
Usage:
Set the
packageIdandstickerIdof the stickers you want to sendExample:
packageId = 446andstickerId = 1988
βΉοΈ For more details, please visit Stickers
πΈ LineSendImage
Function: Send images (Image Message) via LINE Messaging API
Usage:
Enter the URL of the image you want to send in the
originalContentUrlfieldEnter the URL of the preview image in the
previewImageUrlfield (shown in the chat before clicking to view the full image)Note: The URL must be HTTPS only
Suitable for: Sending news illustrations, promotions, or general images
πΈ LineSendVideo
Function: Send videos (Video Message) via LINE Messaging API
Usage:
Enter the video URL in the
originalContentUrlfieldEnter the preview image URL in the
previewImageUrlNote: URL must be HTTPS only
πΈ LineSendAudio
Function: Send audio files (Audio Message) via LINE Messaging API
Usage:
Enter the URL of the audio file (MP3 or supported format)
Set the duration of the audio file (duration) in milliseconds
πΈ LineSendLocation
Function: Send location (Location Message) via LINE Messaging API
Usage:
Enter the location name (title)
Address (address)
Latitude (latitude)
Longitude (longitude)
πΈ LineSendImagemap
Function: Send interactive images (Imagemap Message) via LINE Messaging API
Usage:
Enter the URL Image (imagemap)
Set the size of the image and the user-clickable zones (action areas)
Set which message each button zone will send or which URL will open
πΈ LineSendTemplate
Function: Send a template message (Template Message) via LINE Messaging API
Usage:
Set
title,text, andthumbnailImageUrlAdd multiple Action buttons, such as
Message (send a message back)
Postback (send hidden data)
URI (open a webpage)
πΈ LineSendFlex
Function: Send a Flex Message, which is a freely designed message (similar to HTML + JSON layout)
Usage:
Send a customized JSON structure of Flex Message
You can design a complex message format, such as text blocks, images, buttons, frames, and more
πΈ LineWebhook
Function: Receive messages or events generated by the LINE Platform via Webhook
Usage:
Use this Node to set up a webhook endpoint in n8n
Wait for messages, button presses, tracking, or events that occur in LINE
If you need a sample code or more details on how to set up each Node, please let me know!
πΈ Workflow example
Easily send messages and stickers to users via LINE Bot:
π References
π§βπ» Maintainer
Developed by Phoovadet Noobdev
π License
MIT License Β© 2025