Line Message Builder icon

Line Message Builder

Builds a message object for the LINE Messaging API.

Overview

This node constructs message objects for the LINE Messaging API, supporting various message types including text, image, video, audio, location, sticker, and flex messages. It is useful for automating the creation of LINE messages in workflows, such as sending images with preview thumbnails, videos with tracking IDs, or rich flex messages with custom JSON content.

Use Case Examples

  1. Sending an image message with a specified original content URL and preview image URL.
  2. Creating a text message with user mentions or emojis using substitution.
  3. Building a flex message with custom JSON content for rich formatting.

Properties

Name Meaning
Original Content URL URL of the content to be sent, such as an image or video. Must be HTTPS and up to 1000 characters.
Preview Image URL URL of the preview image shown before the original content is loaded. Must be HTTPS and up to 1000 characters.

Output

JSON

  • message
    • type - Type of the LINE message (e.g., image, text, video).
    • originalContentUrl - URL of the original content for image, video, or audio messages.
    • previewImageUrl - URL of the preview image for image or video messages.
    • text - Text content for text messages.
    • substitution - Substitution data for text messages with mentions or emojis.
    • trackingId - Tracking ID for video play completion statistics.
    • duration - Duration of audio messages in milliseconds.
    • 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

  • Ensure URLs for original content and preview images use HTTPS and do not exceed 1000 characters to avoid errors.
  • For audio messages, only M4A format is supported; using other formats may cause failures.
  • Flex message contents must be valid JSON; invalid JSON will cause an error with a message indicating the item index.
  • Missing required parameters for each message type (e.g., originalContentUrl for image messages) will result in incomplete message objects and potential API errors.

Links

Discussion