n8ntools-line

N8N Tools LINE Enhanced node with comprehensive LINE Messaging API support

Package Information

Released: 9/16/2025
Downloads: 10 weeklyΒ /Β 248 monthly
Latest Version: 1.0.3
Author: N8N Tools

Documentation

N8N Tools - LINE Enhanced

npm version
npm downloads
License: MIT

Complete LINE messaging platform integration with 50+ operations covering the full LINE ecosystem. This N8N community node provides comprehensive access to Messaging, Bot API, Rich Content, Friends management, and Webhook APIs specifically designed for the Japanese market and LINE's unique features.

✨ Features

  • πŸ’¬ Messaging API: Send text, image, video, audio, and rich messages to users and groups
  • πŸ€– LINE Bot Management: Complete bot profile, rich menu, and interaction management
  • πŸ‘₯ Friends & Groups: Manage friend relationships, group memberships, and user profiles
  • 🎨 Rich Content: Create interactive flex messages, carousels, and quick reply buttons
  • πŸ“Š Insights & Analytics: Track message delivery, user engagement, and bot performance
  • πŸ”” Webhook Management: Handle real-time events from LINE platform
  • πŸͺ LINE Official Account: Manage official account features and business tools
  • πŸ“± LIFF Integration: LINE Front-end Framework for web app integration
  • 🎯 Audience Management: Create and manage targeted user segments
  • πŸ’³ LINE Pay Integration: Process payments through LINE Pay ecosystem
  • πŸ”’ Secure API: Powered by N8N Tools platform with usage tracking and validation

πŸš€ Quick Start

Installation

Install this node in your N8N instance:

Via Community Nodes (Recommended)

  1. Go to Settings > Community Nodes in your N8N interface
  2. Click Install a community node
  3. Enter n8n-nodes-n8ntools-line
  4. Click Install

Via npm

npm install n8n-nodes-n8ntools-line

Setup Credentials

  1. Sign up at N8N Tools and get your API key
  2. In N8N, create new N8N Tools API credentials
  3. Enter your API URL: https://api.n8ntools.io
  4. Enter your API key

πŸ“‹ Available Resources

πŸ’¬ Messaging (8 Operations)

Complete messaging capabilities for the Japanese market:

Operation Description Features
Send Text Message Send plain text messages Emoji support, Japanese characters
Send Rich Message Send interactive messages Flex templates, carousels
Send Image Send image messages JPEG, PNG support
Send Video Send video messages MP4 format support
Send Audio Send audio messages M4A, MP3 format support
Send Location Share location data GPS coordinates, address
Send Sticker Send LINE stickers Official sticker packages
Reply to Message Reply to specific messages Reply tokens

πŸ€– Bot Management (6 Operations)

Advanced bot configuration and management:

  • Get Bot Info: Retrieve bot profile and settings
  • Set Bot Profile: Update bot display name and status message
  • Create Rich Menu: Design interactive bottom menus
  • Update Rich Menu: Modify existing rich menus
  • Delete Rich Menu: Remove rich menus
  • Link Rich Menu: Associate rich menus with users

πŸ‘₯ Friends & Groups (7 Operations)

User relationship and group management:

  • Get Profile: Retrieve user profile information
  • Get Friend List: List bot friends with pagination
  • Get Group Member Profile: Get member info in groups
  • Get Group Summary: Group information and member count
  • Leave Group: Remove bot from groups
  • Get Room Member Profile: Get member info in multi-person chats
  • Leave Room: Remove bot from rooms

🎨 Rich Content (5 Operations)

Create engaging interactive content:

  • Create Flex Message: Design flexible layouts
  • Create Carousel: Multi-card content display
  • Create Quick Reply: Add quick response buttons
  • Create Confirm Template: Yes/no confirmation dialogs
  • Create Button Template: Action buttons with links

πŸ“Š Insights (4 Operations)

Analytics and performance tracking:

  • Get Message Delivery: Track message delivery rates
  • Get Followers: Monitor follower count statistics
  • Get Demographic: User demographic insights
  • Get User Interaction: Track user engagement metrics

πŸ”” Webhooks (3 Operations)

Real-time event handling:

  • Set Webhook Endpoint: Configure webhook URL
  • Test Webhook: Validate webhook connectivity
  • Get Webhook Info: Check current webhook settings

πŸͺ Official Account (4 Operations)

Business account management:

  • Get Account Info: Retrieve account details
  • Update Account Info: Modify account settings
  • Get Greeting Message: Manage welcome messages
  • Set Greeting Message: Configure auto-responses

πŸ“± LIFF (3 Operations)

LINE Front-end Framework integration:

  • Create LIFF App: Register new LIFF applications
  • Update LIFF App: Modify LIFF app settings
  • Delete LIFF App: Remove LIFF applications

🎯 Audience (4 Operations)

Targeted messaging capabilities:

  • Create Audience: Define user segments
  • Update Audience: Modify audience criteria
  • Get Audience: Retrieve audience information
  • Delete Audience: Remove audience segments

πŸ’³ LINE Pay (3 Operations)

Payment processing integration:

  • Create Payment: Initiate LINE Pay transactions
  • Check Payment: Verify payment status
  • Refund Payment: Process payment refunds

πŸ’‘ Usage Examples

Send Rich Flex Message

// Configuration
Resource: "Messaging"
Operation: "Send Rich Message"
Request Body: {
  "to": "U4af4980629...",
  "messages": [{
    "type": "flex",
    "altText": "Restaurant Menu",
    "contents": {
      "type": "bubble",
      "hero": {
        "type": "image",
        "url": "https://example.com/restaurant.jpg",
        "size": "full",
        "aspectRatio": "20:13"
      },
      "body": {
        "type": "box",
        "layout": "vertical",
        "contents": [{
          "type": "text",
          "text": "γŠγ™γ™γ‚γƒ¬γ‚Ήγƒˆγƒ©γƒ³",
          "weight": "bold",
          "size": "xl"
        }, {
          "type": "text", 
          "text": "ηΎŽε‘³γ—γ„ζ—₯ζœ¬ζ–™η†γ‚’γŠζ₯½γ—みください",
          "size": "sm",
          "color": "#666666"
        }]
      },
      "footer": {
        "type": "box",
        "layout": "vertical",
        "contents": [{
          "type": "button",
          "style": "primary",
          "action": {
            "type": "uri",
            "label": "δΊˆη΄„γ™γ‚‹",
            "uri": "https://example.com/reserve"
          }
        }]
      }
    }
  }]
}

// Output
{
  "resource": "messaging",
  "operation": "sendRichMessage",
  "success": true,
  "messageId": "468579482754",
  "timestamp": "2024-01-15T10:30:00Z",
  "creditsUsed": 1,
  "creditsRemaining": 99
}

Create Interactive Rich Menu

// Configuration
Resource: "Bot Management"
Operation: "Create Rich Menu"
Request Body: {
  "size": {
    "width": 2500,
    "height": 1686
  },
  "selected": true,
  "name": "Main Menu",
  "chatBarText": "パニγƒ₯γƒΌ",
  "areas": [{
    "bounds": {
      "x": 0,
      "y": 0,
      "width": 1250,
      "height": 843
    },
    "action": {
      "type": "postback",
      "data": "menu_products",
      "displayText": "商品一覧"
    }
  }, {
    "bounds": {
      "x": 1250,
      "y": 0,
      "width": 1250,
      "height": 843
    },
    "action": {
      "type": "postback",
      "data": "menu_support",
      "displayText": "γ‚΅γƒγƒΌγƒˆ"
    }
  }, {
    "bounds": {
      "x": 0,
      "y": 843,
      "width": 2500,
      "height": 843
    },
    "action": {
      "type": "uri",
      "uri": "https://example.com/store"
    }
  }]
}

Handle Webhook Events

// Configuration
Resource: "Webhooks"
Operation: "Set Webhook Endpoint"
Request Body: {
  "endpoint": "https://your-app.com/webhook/line",
  "events": [
    "message",
    "follow",
    "unfollow",
    "join",
    "leave",
    "postback",
    "beacon"
  ]
}

// Example webhook handler for message events
{
  "destination": "Uea8c0de6b7...",
  "events": [{
    "type": "message",
    "message": {
      "type": "text",
      "id": "444573482754",
      "text": "こんにけは"
    },
    "timestamp": 1462629479859,
    "source": {
      "type": "user",
      "userId": "U4af4980629..."
    },
    "replyToken": "nHuyWiB7yP5Zw52FIkcQobQuGDXCTA"
  }]
}

Create Targeted Audience

// Configuration
Resource: "Audience"
Operation: "Create Audience"
Request Body: {
  "description": "Tokyo Premium Users",
  "isIfaAudience": false,
  "uploadDescription": "High-value customers in Tokyo area",
  "audiences": [{
    "id": "u1",
    "userId": "U4af4980629..."
  }, {
    "id": "u2", 
    "userId": "U5bg5091730..."
  }],
  "audienceMatchingType": "userId"
}

Process LINE Pay Payment

// Configuration
Resource: "LINE Pay"
Operation: "Create Payment"
Request Body: {
  "amount": 1000,
  "currency": "JPY",
  "orderId": "ORDER-2024-001",
  "packages": [{
    "id": "package-1",
    "amount": 1000,
    "name": "γƒ—γƒ¬γƒŸγ‚’γƒ γƒ—γƒ©γƒ³",
    "products": [{
      "name": "ζœˆι‘γ‚΅γƒ–γ‚Ήγ‚―γƒͺプション",
      "quantity": 1,
      "price": 1000,
      "imageUrl": "https://example.com/product.jpg"
    }]
  }],
  "redirectUrls": {
    "confirmUrl": "https://example.com/confirm",
    "cancelUrl": "https://example.com/cancel"
  }
}

βš™οΈ Configuration Options

Environment Settings

  • Channel Access Token: Bot channel access token from LINE Developers
  • Channel Secret: Bot channel secret for webhook verification
  • Environment: Development or Production

Message Options

  • Alt Text: Alternative text for rich messages
  • Quick Reply: Add quick reply options
  • Sender: Custom sender information
  • Emoji: Include LINE emoji in messages

Advanced Features

  • LIFF Integration: Web app embedding
  • Beacon Support: Physical beacon interactions
  • Push Notifications: Proactive messaging
  • Multi-language: Japanese, English, Chinese support

πŸ› οΈ Example Workflows

Customer Support Bot

[User Message] β†’ [LINE Enhanced: Receive Message] β†’ [Process Intent] β†’ [LINE Enhanced: Send Reply] β†’ [Log Interaction]

E-commerce Integration

[Order Placed] β†’ [LINE Enhanced: Send Order Confirmation] β†’ [Payment Required] β†’ [LINE Pay: Create Payment] β†’ [Send Receipt]

Marketing Campaign

[Create Audience] β†’ [LINE Enhanced: Create Audience] β†’ [Design Message] β†’ [LINE Enhanced: Send Rich Message] β†’ [Track Engagement]

Event-driven Automation

[LINE Webhook] β†’ [LINE Enhanced: Process Event] β†’ [Update CRM] β†’ [Trigger Follow-up] β†’ [Send Personalized Message]

πŸ“Š Comparison with Official LINE Node

Feature Category Official Node LINE Enhanced Improvement
Messaging 2 operations 8 operations +300%
Bot Management 0 operations 6 operations ∞ (new)
Friends & Groups 1 operation 7 operations +600%
Rich Content 0 operations 5 operations ∞ (new)
Insights 0 operations 4 operations ∞ (new)
Webhooks 0 operations 3 operations ∞ (new)
Official Account 0 operations 4 operations ∞ (new)
LIFF 0 operations 3 operations ∞ (new)
Audience 0 operations 4 operations ∞ (new)
LINE Pay 0 operations 3 operations ∞ (new)
Total Operations 3 operations 47 operations +1467%

πŸ”§ API Endpoints

All operations are routed through N8N Tools API for consistent authentication and usage tracking:

Resource Base Endpoint
Messaging /api/v1/line/messaging/
Bot Management /api/v1/line/bot-management/
Friends & Groups /api/v1/line/friends-groups/
Rich Content /api/v1/line/rich-content/
Insights /api/v1/line/insights/
Webhooks /api/v1/line/webhooks/
Official Account /api/v1/line/official-account/
LIFF /api/v1/line/liff/
Audience /api/v1/line/audience/
LINE Pay /api/v1/line/line-pay/

🚨 Error Handling

The node provides comprehensive error handling with detailed messages:

{
  "error": "INVALID_CHANNEL_ACCESS_TOKEN",
  "success": false,
  "resource": "messaging",
  "operation": "sendTextMessage",
  "details": {
    "issue": "The channel access token is invalid or expired",
    "field": "channelAccessToken",
    "code": 401
  }
}

πŸ’Έ Pricing & Limits

  • Standard Operations: 1 credit per API call
  • Rich Content Operations: 2 credits (flex messages, carousels)
  • Analytics Operations: 1 credit per query
  • Monthly Quotas: Based on your N8N Tools subscription plan
  • Rate Limits: 1000 requests/minute (based on LINE API limits)
  • Usage Tracking: Real-time credit monitoring

πŸ”§ Troubleshooting

Common Issues

Authentication Errors

  • Verify N8N Tools API key is valid and active
  • Check API URL is set to https://api.n8ntools.io
  • Ensure LINE channel access token is correct

Message Delivery Issues

  • Verify user has added your bot as friend
  • Check message format and size limits
  • Ensure images/videos are accessible via HTTPS

Rich Menu Problems

  • Validate rich menu image dimensions (2500x1686px)
  • Check area bounds don't overlap
  • Ensure image is under 1MB

Webhook Issues

  • Verify webhook URL is publicly accessible with HTTPS
  • Check channel secret for signature validation
  • Ensure endpoint handles LINE webhook format

πŸ“ˆ Performance Tips

  1. Message Optimization: Use appropriate message types for content
  2. Rich Menu Caching: Cache rich menu images on CDN
  3. Webhook Processing: Process events asynchronously
  4. Audience Segmentation: Use targeted messaging to reduce costs
  5. Japanese Localization: Properly handle Japanese text encoding

πŸ†˜ Support

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Made with ❀️ by N8N Tools

Discussion