Line Messaging API icon

Line Messaging API

Line Messaging API

Overview

This node integrates with the Line Messaging API to send and manage messages within the Line platform. It supports sending reply messages, push messages to specific recipients, multicast messages to multiple recipients, and retrieving message content or user/group profile information.

Common scenarios include:

  • Sending automated replies to users interacting with a chatbot.
  • Broadcasting announcements or updates to multiple users or groups.
  • Fetching message content for processing or storage.
  • Retrieving user or group profile details for personalization or analytics.

Practical example: A customer support bot can use this node to reply to user queries, push notifications about ticket status, or multicast promotional messages to subscribed users.

Properties

Name Meaning
Message The message payload to send. Can be a single message object or an array of message objects.
ReplyToken The token used to reply to a specific incoming message, enabling direct responses in conversations.
Target Recipient The ID of the recipient (userId, groupId, or roomId) to whom the message will be pushed if no replyToken.

Output

The node outputs an array of items corresponding to each input item processed:

  • For sending messages (Send Message operation), it returns the original input data unchanged.
  • For fetching message content (getMessageContent operation), it outputs binary data representing the raw message content (e.g., images, audio) along with appropriate MIME type metadata.
  • For profile or group-related operations, it outputs JSON objects containing the requested information such as user profiles or group summaries.

If binary data is output, it is provided under the binary.data field with the correct content type.

Dependencies

  • Requires an API authentication token (channel access token) for the Line Messaging API.
  • Uses the official Line SDK's messaging API clients internally.
  • The node expects credentials configured in n8n that provide the necessary access token.

Troubleshooting

  • Missing or invalid authentication: If the channel access token is not provided or invalid, the node throws an error indicating no authentication was provided. Ensure the credential is correctly set up with a valid token.
  • Invalid recipient IDs: Providing incorrect user, group, or room IDs may cause message sending to fail. Verify recipient IDs are accurate and correspond to existing entities.
  • Reply token issues: When replying to messages, ensure the reply token is valid and has not expired; otherwise, the reply will fail.
  • Message format errors: The message payload must conform to the expected structure defined by the Line Messaging API. Invalid message formats will result in API errors.
  • Network or API errors: Temporary network issues or API rate limits may cause failures. Retrying after some time or checking API usage limits can help.

Links and References

Discussion