N8N Tools LINE icon

N8N Tools LINE

Interact with LINE Messaging API

Overview

The node interacts with the LINE Messaging API to perform various operations related to Rich Menus, which are customizable menus that can be displayed in LINE chat interfaces. Specifically, the "Get Rich Menu" operation retrieves detailed information about a specified Rich Menu by its ID.

This node is beneficial when you want to programmatically manage or query Rich Menus within your LINE bot workflows. For example, you might use it to fetch the configuration of a Rich Menu to display or modify it later, or to verify the existence and details of a Rich Menu before linking it to users.

Practical example:

  • Retrieve the details of a Rich Menu by its ID to confirm its layout and settings before assigning it as the default menu for users.

Properties

Name Meaning
Rich Menu ID The unique identifier of the Rich Menu to retrieve.

Output

The output is a JSON object containing the detailed data of the requested Rich Menu as returned by the LINE Messaging API. This typically includes properties such as the menu's size, name, chat bar text, areas (interactive regions), and other configuration details.

No binary data output is involved in this operation.

Example output structure (simplified):

{
  "richMenuId": "string",
  "size": {
    "width": 2500,
    "height": 1686
  },
  "selected": false,
  "name": "string",
  "chatBarText": "string",
  "areas": [
    {
      "bounds": {
        "x": 0,
        "y": 0,
        "width": 2500,
        "height": 843
      },
      "action": {
        "type": "postback",
        "data": "action=buy&itemid=123"
      }
    }
  ]
}

Dependencies

  • Requires an API key credential for authentication with the LINE Messaging API.
  • Optionally uses an additional API validation service if configured, which validates subscription and API key before making requests.
  • The node depends on the bundled LineApi helper class to interact with the LINE API endpoints.

Troubleshooting

  • Invalid or missing Rich Menu ID: If the provided Rich Menu ID is empty or incorrect, the API will return an error indicating the resource was not found. Ensure the ID is valid and corresponds to an existing Rich Menu.
  • Authentication errors: If the API key credential is invalid or missing, the node may throw errors related to unauthorized access. Verify that the API key is correctly set up in n8n credentials.
  • API validation failure: If the optional external API validation fails due to invalid subscription or API key, the node will throw an error prompting to check credentials.
  • Network issues: Connectivity problems with the LINE API endpoint can cause request failures. Check network connectivity and endpoint availability.

Links and References

Discussion