Mindket

LINE chatbot that answers with Claude

Newversion 1 · updated

Overview

An n8n workflow for a LINE Official Account. LINE sends each message to a webhook, Claude writes a short reply in the same language, and the workflow sends it back through LINE’s reply API.

LINE chatbot that answers with Claude is an n8n workflow in the Business category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

At a glance

Runs in
  • n8n Cloud: import the file into a new workflow there
  • Your own n8n server: the same file, behind an HTTPS address LINE can reach
  • A LINE Official Account: the channel’s webhook URL points at the workflow
  • Another chat app: swap the reply node for that app’s API

Platform

Connects 2 apps

How it works

Trigger

LINE message

It starts when LINE posts a chat event to the webhook, with:

  • The text of the first text message
  • Its reply token
  • The sender’s user ID

Actions

  1. Extract Message picks the first text message and keeps its text, reply token and user ID
  2. Claude (claude-opus-4-5) writes a reply of up to 500 tokens, in the language the person used
  3. LINE’s reply API sends the answer back to the chat
  4. Return 200 answers LINE with OK

Result

The person gets Claude’s reply as a text message in LINE

Integrations

What you need before you start.

LINE

Chat channel

Delivers each message to the webhook and carries Claude’s reply back to the person.

NeedsA LINE Official Account with the Messaging API on, and its channel access token, read from LINE_CHANNEL_ACCESS_TOKEN

Anthropic

Language model

Runs claude-opus-4-5 to write a short reply.

NeedsAnthropic API key, read from ANTHROPIC_API_KEY

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
5 steps, starting when its webhook is called
AI
No step calls an AI model
Sign-ins
No sign-in
API keys
No API key is left in the file
Step types
Mindket’s checker reads all 4 of its step types

Read from the workflow’s file, not from a run.

About

What it is

This n8n workflow lets a LINE Official Account answer with Claude. LINE posts every message to the webhook. A Code node picks out the first text message, and Claude writes a short reply in the language the person used. The workflow sends that reply back with LINE’s reply API. Five nodes do the work, and none of them is a sticky note.

Who it suits

Small shops, community managers and developers who run a LINE account and want a first-line assistant. Skip it if you need the bot to remember a customer or to hand over to a person. As imported, each message is answered alone, and nothing checks that LINE sent it.

Who uses it, and how
IndustryWho uses itHow they use itExample
RetailShop ownersAnswer common questions from customers on LINEA bakery adds its opening hours to the system line, and the bot answers when someone asks about Sunday.
CommunitiesGroup adminsGive members a helper that replies in their own languageA language club’s account answers an Indonesian message in Indonesian.
SoftwareBot buildersStart from a working webhook and reply loopA developer adds a second Claude call that summarizes long messages.
EducationTutorsLet students practice writing by chattingA tutor’s account answers an English practice sentence with a short correction.

You need some n8n and a LINE developer account: import a file, set two environment values and paste in a webhook address.

Where to use it

Any n8n that LINE can reach over HTTPS will run it. The reply lands in the same LINE chat as the question.

  • n8n Cloud: import the file into a new workflow there
  • Your own n8n server: the same file, behind an HTTPS address LINE can reach
  • A LINE Official Account: the channel’s webhook URL points at the workflow
  • Another chat app: swap the reply node for that app’s API

Setup

Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. The two secrets are read from the server’s environment.

What you need first
NeedDetail
n8nReachable over HTTPS, on n8n Cloud or on a server of your own
LINEAn Official Account with the Messaging API on, and its channel access token, read as LINE_CHANNEL_ACCESS_TOKEN
AnthropicAn API key, read as ANTHROPIC_API_KEY
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. Give n8n the key and the token. Set ANTHROPIC_API_KEY and LINE_CHANNEL_ACCESS_TOKEN as environment variables on the server, or replace the two $env expressions in Ask Claude and Reply via LINE with the values.
  3. Save and publish the workflow, then copy the production address from LINE Webhook.
  4. In the LINE Developers console, paste that address as the webhook URL, click Verify and turn Use webhook on.
  5. Send the account a text message and wait for Claude’s reply.

How to use it

Message the account in LINE. Claude’s reply follows in the same chat. Stickers, images and other kinds of event get no reply.

What to change for a different result
To changeWhere
The bot’s characterThe system line in Ask Claude
The length of a replymax_tokens in the same node
The modelmodel in the same node
What it answersThe code in Extract Message

Example

A club member writes in Indonesian to ask how to join next week’s meetup.

Claude answers in Indonesian, in a few sentences, within its 500-token cap. The LINE chat shows the reply as a text message from the account.

For newcomers and experts

If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. LINE’s call enters at the left, the middle boxes ask Claude, and the box on the right sends the answer back to LINE. Message the account once, then open the run to see what each box handled.

For experts. The reply token in each event is what lets the workflow answer without a user ID.

Where to look closer
NodeWhat it doesWhat to know
LINE WebhookWebhook 2 on POST, with the answer sent by a Respond to Webhook nodeIt hands the call to Extract Message and to Return 200
Extract MessageA Code node that finds the first text event in body.eventsAny other event returns nothing, which ends that branch
Ask ClaudePosts to https://api.anthropic.com/v1/messages with claude-opus-4-5Up to 500 tokens, one message and no history
Reply via LINEPosts to https://api.line.me/v2/bot/message/replyUses the event’s reply token and sends one text
Return 200Respond to Webhook 1 with the text OKIt runs last, after the reply branch

Good to know

Nothing checks that a call came from LINE, and the bot has no memory.

  • Models: Anthropic’s deprecations page, read on 12 November 2026, lists claude-opus-4-5 as active, with a retirement date no sooner than 24 November 2026 and no replacement named. Check the page, or set a newer Claude model in Ask Claude
  • Repairs: the original copy read the request from the wrong place, so it never found a message and never replied. Its two JSON bodies broke on any line break or quote, and a comment claimed a signature check that was not there. Mindket’s copy fixes the first two and corrects the comment
  • Signature: LINE signs each webhook with an x-line-signature header. Nothing here checks it, so anyone who finds the address can send fake events that spend your key. LINE’s documentation says to verify it before processing an event
  • Waiting: Return 200 runs after the reply branch, so LINE waits for Claude. When the Claude call or the reply fails, LINE does not get its OK
  • No memory: Claude sees only the one message, and only the first text event in a call is answered
  • Billing: LINE’s pricing page, read on 12 November 2026, leaves reply messages out of a plan’s message count. Anthropic bills one call for each message
  • Your data: the message goes to Anthropic, and the answer goes back through LINE
  • Credentials: the JSON holds none

README and files

README

LINE chatbot that answers with Claude

An n8n workflow that connects a LINE Official Account to Claude. LINE sends each message to a webhook, the workflow pulls out
the first text message, Claude writes a short reply in the same language, and the workflow sends it back through LINE's reply
API.

What is inside

  • workflow.json: the workflow as n8n exports it, five nodes, none of them a sticky note. It holds no credential.
  • README.md: these notes.

What we changed from the original copy

  • Extract Message read the call as $input.first().json. A Webhook node hands over headers, params, query and body,
    so the events list was never found and the bot never replied. It now reads $input.first().json.body.
  • Its first comment said it validated the LINE signature. The code never did, so the comment now says it does not.
  • The Claude request and the LINE reply placed raw text between quotes in their JSON bodies, so any message or answer with a
    line break or a quote broke them. Each value now goes through JSON.stringify(...).slice(1, -1).
  • The webhook ID is gone.
  • Nothing else. The key, the token and the model are the file's own.

Before you start

  • An n8n instance reachable from the internet over HTTPS, on n8n Cloud or your own server. LINE's webhook URL must use HTTPS with a
    certificate from a widely trusted authority, and self-signed ones are refused.
  • A LINE Official Account with the Messaging API turned on, and its channel access token.
  • An Anthropic API key.
  • A way to set two environment variables on the n8n server, or a willingness to type the values into the nodes.

Set it up

  1. In n8n, create a workflow, open its menu and choose Import from File. Pick workflow.json.
  2. Give n8n the two secrets. The file reads them as {{ $env.ANTHROPIC_API_KEY }} in the x-api-key header of Ask Claude,
    and as Bearer {{ $env.LINE_CHANNEL_ACCESS_TOKEN }} in the Authorization header of Reply via LINE. Set both as
    environment variables on the server, or replace each expression with the value itself.
  3. Save and publish the workflow. Copy the production address from LINE Webhook.
  4. In the LINE Developers console, paste that address as the channel's webhook URL, click Verify and turn Use webhook on.
  5. Send your account a text message and wait for Claude's reply.

How a run goes

  1. LINE Webhook (Webhook 2) takes LINE's POST and passes the call to Extract Message and to Return 200.
  2. Extract Message (Code) looks through body.events for the first event that is a text message, and keeps userId,
    replyToken and the text. Stickers, images and other events end that branch here.
  3. Ask Claude posts the text to https://api.anthropic.com/v1/messages with claude-opus-4-5, up to 500 tokens and a system
    line that asks for a short reply in whatever language the person wrote.
  4. Reply via LINE posts Claude's answer to https://api.line.me/v2/bot/message/reply with the reply token.
  5. Return 200 answers LINE with OK. n8n finishes the upper branch first, so this comes last.

Change the look

  • The bot's character: the system line in Ask Claude.
  • The model and the length: model and max_tokens in the same node.
  • What it answers: the Code node. Add more event types, or keep earlier messages by userId.

Good to know

  • Anthropic's deprecations page, read on 12 November 2026, lists claude-opus-4-5 (claude-opus-4-5-20251101 there) as active,
    with a retirement date no sooner than 24 November 2026 and no replacement named yet. Check the page before relying on it,
    or change model in Ask Claude to a newer Claude model.
  • Each message is answered alone. Claude sees only the one message, with no earlier turns.
  • LINE signs every webhook with an x-line-signature header. Nothing in this workflow checks it, so anyone who finds the
    address can send fake events, and each text one spends your Anthropic key. LINE's documentation says to verify the signature
    before processing an event.
  • Return 200 runs after the reply branch, so LINE waits for Claude. When the Claude call or the reply fails, the run stops before
    Return 200 and LINE does not get its OK.
  • The workflow answers only the first text event in a call.
  • Reply messages do not count toward a LINE plan's monthly message count, according to LINE's pricing page, read on
    12 November 2026.
  • A LINE reply holds up to five message objects. This one sends a single text.
  • The message goes to Anthropic, and the answer goes back through LINE.
Files
NOTICE.md  583 B
README.md  4 KB
workflow.json  4 KB

3 files, 9 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Nanosaur2-670M

well9472 · Kit

Makes illustrations from text prompts with a small 670M-parameter diffusion model, run through ComfyUI. Built as a low-budget research model for people who wan…

New

Reads handwritten Arabic text from images and returns it as text. A fine-tuned PaddleOCR-VL model for people digitizing Arabic handwriting.

New

Makes video clips from a text prompt or an image plus text, at up to 720P and 24 frames per second, in the Diffusers format for a single consumer GPU.

New

Similar in Business

See all in Business

pplx-decider-v1.1-27b

perplexity-ai · Kit

Picks the best option for a decision from text and images, such as which team should handle a request, with a probability for each choice, for developers who b…

New

NuExtract3

numind · Kit

Reads documents as text or images and fills a JSON template with the fields you ask for, or converts the pages to Markdown. A 4B model for teams that process s…

New

Drex DLM

nace-ai · Kit

Scores yes or no, multiple choice and rating questions about a document in one pass, with a probability for every option. An 8B decision model from Nace.AI tha…

New