Line Message Builder icon

Line Message Builder

Builds a message object for the LINE Messaging API.

Overview

This node builds message objects for the LINE Messaging API, supporting various message types including text messages (with or without substitutions), images, videos, audio, locations, stickers, and flex messages. It is useful for automating the creation of LINE messages in workflows, such as sending customized text messages with user mentions or emojis, sharing media content, or sending location and sticker messages.

Use Case Examples

  1. Sending a simple text message to a LINE user.
  2. Creating a text message with dynamic substitutions like mentioning specific users or inserting emojis.
  3. Sending an image or video message with preview URLs.
  4. Sharing a location message with title, address, latitude, and longitude details.

Properties

Name Meaning
Text The text content of the message to be sent.
Substitution A collection of substitution items used in the text message for dynamic content like user mentions or emojis.

Output

JSON

  • message
    • type - The type of the LINE message (e.g., text, image, video, audio, location, sticker, flex).
    • text - The text content for text messages.
    • substitution - An object containing substitution mappings for text messages with substitutions.
    • originalContentUrl - URL of the original content for media messages (image, video, audio).
    • previewImageUrl - URL of the preview image for image and video messages.
    • duration - Duration of audio messages in milliseconds.
    • trackingId - Tracking ID for video play completion statistics.
    • title - Title for location messages.
    • address - Address for location messages.
    • latitude - Latitude coordinate for location messages.
    • longitude - Longitude coordinate for location messages.
    • packageId - Package ID for sticker messages.
    • stickerId - Sticker ID for sticker messages.
    • altText - Alternative text for flex messages.
    • contents - JSON object representing the contents of a flex message.

Dependencies

  • Requires an API key credential for the LINE Messaging API to send messages.

Troubleshooting

  • If the 'Flex message contents' JSON is invalid, the node throws an error indicating the JSON is not valid. Ensure the JSON structure is correct before inputting.
  • Missing required fields for specific message types (e.g., originalContentUrl for images) will cause message construction to fail. Verify all required parameters are provided.
  • Incorrect user IDs or product/emoji IDs in substitutions may result in mentions or emojis not rendering correctly in the message.

Links

Discussion