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.
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:
To use the LINE Messaging API, you need to create a LINE Official Account and set the following settings:
- 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.
- 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.
- Scroll to the topic Using the feature
- Click Allow to join the group > Confirm by clicking OK
- 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
- Go to https://developers.line.biz/
- Click the Console button
- Select the Provider name you created
- Click the Channel name you created
- 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)
-
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
- 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
npm install -g n8n- Go to LINE Developers Console
- Create Messaging API Channel
- Enable Bot
- Collect Channel Access Token and User ID (UID)
mkdir -p ~/.n8n/custom
cd ~/.n8n/custom
npm init -y
npm install n8n-LineMessagegit 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-LineMessageThen run:
n8n start- Go to the Credentials menu on n8n
- Create a new Credential:
accessToken= Channel Access Token
-
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
-
Function: Send stickers (Sticker Message) via LINE Messaging API
-
Usage:
-
Set the
packageIdandstickerIdof the stickers you want to send -
Example:
packageId = 446andstickerId = 1988
ℹ️ For more details, please visit Stickers
-
Function: Send images (Image Message) via LINE Messaging API
-
Usage:
-
Enter the URL of the image you want to send in the
originalContentUrlfield -
Enter 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
-
Function: Send videos (Video Message) via LINE Messaging API
-
Usage:
-
Enter the video URL in the
originalContentUrlfield -
Enter the preview image URL in the
previewImageUrl -
Note: URL must be HTTPS only
-
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
-
Function: Send location (Location Message) via LINE Messaging API
-
Usage:
-
Enter the location name (title)
-
Address (address)
-
Latitude (latitude)
-
Longitude (longitude)
-
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
-
Function: Send a template message (Template Message) via LINE Messaging API
-
Usage:
-
Set
title,text, andthumbnailImageUrl -
Add multiple Action buttons, such as
-
Message (send a message back)
-
Postback (send hidden data)
-
URI (open a webpage)
-
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
-
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!
Easily send messages and stickers to users via LINE Bot:
Developed by Phoovadet Noobdev
MIT License © 2025


