Overview
This node constructs and outputs different types of LINE messaging API message objects based on the selected operation. It supports sending text, image, video, audio, location, flex, and sticker messages by preparing the appropriate message payload for each type.
A common use case is automating LINE chatbot responses or broadcasting messages with rich content such as images, videos, or audio clips. For example, you can send an audio message to users with a specified duration or share a video with tracking enabled to monitor when users finish watching it.
Properties
Name | Meaning |
---|---|
URL | The URL of the media file (image, video, or audio) to be sent. Must be a valid URL up to 2000 characters. |
Tracking ID | An identifier used to track video viewing completion events. Applicable for audio and video operations. |
Duration | The length of the audio clip in seconds. Required for audio messages. |
Note: These properties are shown depending on the selected operation:
URL
is required for image, video, and audio.Tracking ID
is available for audio and video.Duration
is required only for audio.
Output
The node outputs an array of JSON objects, each containing a message
field structured according to the LINE Messaging API message format. The structure varies by operation:
- Text:
{ type: "text", text: string }
- Image:
{ type: "image", originalContentUrl: string, previewImageUrl: string }
- Video:
{ type: "video", originalContentUrl: string, previewImageUrl: string }
- Audio:
{ type: "video", originalContentUrl: string, duration: number }
(Note: There is a likely typo in the source code where audio messages are assigned type"video"
instead of"audio"
.) - Location:
{ type: "location", title: string, address: string, latitude: number, longitude: number }
- Flex:
{ type: "flex", altText: string, contents: object }
(contents parsed from JSON) - Sticker:
{ type: "sticker", packageId: string, stickerId: string, quoteToken: string }
If binary data were supported, it would typically represent media files, but this node only outputs JSON message objects.
Dependencies
- No external services or API keys are directly handled by this node; it prepares message payloads for the LINE Messaging API.
- Users must ensure that the URLs provided are accessible and valid.
- Proper authentication and sending of these messages must be handled downstream or by other nodes configured with LINE credentials.
Troubleshooting
- Incorrect message type for audio: The node sets audio messages with type
"video"
, which may cause issues when sending audio messages. Verify and correct the message type if necessary. - Invalid or inaccessible URLs: Media URLs must be publicly accessible; otherwise, the message will fail to deliver properly.
- JSON parsing errors for Flex messages: The
flexContent
property is parsed from a JSON string. Invalid JSON will cause errors. - Missing required properties: Ensure all required fields like
originalContentUrl
andduration
(for audio) are provided to avoid runtime errors.