Actions4
Overview
This node integrates with the Line Messaging API to send messages directly to a specified user. The "Send" operation allows users to compose and deliver custom text messages, optionally quoting previous messages or including interactive quick reply buttons. This is useful for automating personalized communication in chatbots, customer support workflows, or notification systems where direct messaging to individual Line users is required.
Practical examples:
- Sending a welcome message to a new user who just signed up.
- Delivering order updates or alerts to a specific customer.
- Providing interactive options via quick replies to guide user responses.
Properties
| Name | Meaning |
|---|---|
| User ID | The unique identifier of the Line user to whom the message will be sent. |
| Messages | A collection of one or more messages to send. Each message can be: - Text Message (V2): A plain text message with optional quoting of a previous message. - Quote Token: Token to quote a previous message (optional). - Text: The actual text content. - Quick Reply: Optional set of quick reply items, each with: • Label: Text shown on the quick reply button. • Action Type: Either "Postback" (sending data back to the bot) or "Message" (sending a predefined message). • Data: JSON string or message text associated with the quick reply action. |
Output
The node outputs an array of JSON objects representing the response from the Line Messaging API after sending the message(s). The exact structure depends on the API response but typically includes status information about the sent messages.
If binary data were involved (e.g., images or files), it would be included in the output's binary property, but this operation focuses on text messages only.
Dependencies
- Requires an API key credential for authenticating with the Line Messaging API.
- The node must be configured with valid credentials that have permission to send messages.
- Network access to the Line Messaging API endpoints is necessary.
Troubleshooting
- Invalid User ID: If the provided User ID is incorrect or does not exist, the API will return an error. Verify the User ID format and ensure the user has interacted with your Line bot before.
- Missing or Invalid Credentials: Authentication errors occur if the API key is missing or invalid. Ensure the API key credential is correctly set up in n8n.
- Malformed Quick Reply Data: Quick reply data must be valid JSON strings when action type is postback. Invalid JSON will cause the request to fail.
- Empty Message Content: Sending a message without text or any content will result in an error. Always provide meaningful text in the message.
- API Rate Limits: Exceeding Line Messaging API rate limits may cause temporary failures. Implement retry logic or reduce message frequency.