Help · Channels

Connect a LINE Official Account to Puccha

Once connected, the AI answers customers in LINE from your knowledge base — 1:1 and in groups — and every conversation lands in the Puccha inbox for your team to review, reply, or take over. About 15–20 minutes, no code. Steps 1–2 and 4–5 happen in LINE; 3 and 6 in Puccha.

Last checked:

Before you start

You needWhyWhere
A LINE Official Account (OA) you administer The account customers will add. Admin rights are needed to enable Messaging API and change Response settings. manager.line.biz → account → Settings → Permissions
A LINE Developers login (same LINE or Business ID as the OA) To copy the Channel Secret, issue the Access Token and set the Webhook URL. developers.line.biz/console
Owner or Admin role in your Puccha organization Only these two roles can create, edit or verify channels. Editors and Viewers can see the page but not change it. Puccha → Settings → Members
A knowledge base with at least one processed document Without documents the AI answers “no information” to everything, so you cannot tell whether the connection works. Puccha → Documents (status must be Ready)

The six steps

  1. 1

    Prepare the LINE Official Account manager.line.biz ↗

    Skip to step 2 if the OA already exists. Creating one takes about 3 minutes.

    1. Open LINE Official Account Manager and sign in with your company’s LINE account or LINE Business ID.
    2. Click Create LINE Official Account, fill in the name, email and business category, and confirm.
    3. Set the profile picture and display name customers will see. This name is what Puccha shows after a successful Verify.
    4. Note the Basic ID (@xxxxxxx, top-left of the Home page) — you will add it as a friend when testing.
    5. Tip: for a first run, connect a separate test OA (e.g. “Company - Test”) before repeating on the real one, so customers never see test messages.
  2. 2

    Enable Messaging API and copy two values developers.line.biz ↗

    This step yields the Channel Secret and the Channel Access Token — the only two values Puccha needs. Paste them into a notepad; never send them over chat or email.

    1. Since September 2024 Messaging API is enabled from OA Manager only: Settings → Messaging API → Enable Messaging API → choose or create your company’s Provider → accept the privacy/terms prompts → OK. The page then shows Messaging API: Enabled.
    2. Channel Secret: LINE Developers Console → your Provider → the channel named after the OA → Basic settings tab → Channel secret → copy (32 characters).
    3. Channel Access Token: same channel → Messaging API tab → scroll to Channel access token (long-lived) → Issue → copy (about 170 characters, ends with “=”).
    4. Do not click Reissue afterwards — it invalidates the token Puccha holds and the bot stops replying until you update it (see After connecting).
  3. 3

    Add the channel in Puccha

    Puccha → Settings → Channels → + Add channel. The form slides in from the right.

    1. Platform: LINE Official Account (the default; it cannot be changed after creation).
    2. Channel name: what your team sees in Puccha — use the OA name. Customers never see it.
    3. Channel Secret and Access Token: paste the two values from step 2 (shown as dots — they are secrets).
    4. Group trigger word (optional): the word that calls the bot in LINE groups. Blank = “ปุจฉา” or “puccha”. Type your own (e.g. a brand name) to white-label it; the defaults then stop working. Has no effect on 1:1 chat.
    5. AI persona (optional): pick a persona from the Personas menu to set tone, document scope and tools. Default = the organization’s AI settings; you can change it later.
    6. Click Create. The card appears with an Active badge. Then click Verify on the card: Puccha calls LINE with the stored token and shows “✓ <OA name> (@basic-id)”. “Invalid or expired access token” means the token is wrong — Edit, paste again, Update channel.
  4. 4

    Set the Webhook URL in LINE Developers Console developers.line.biz ↗

    This tells LINE to forward incoming messages to Puccha. Do it only after step 3 — LINE’s Verify button succeeds only once Puccha has this channel with the matching Channel Secret.

    Your webhook URL has the shape https://app.puccha.ai/c/<organization>/api/channels/line. Copy it from the Webhook URL box in the channel form — don’t type it by hand.

    1. Copy the Webhook URL from the box at the bottom of the Puccha channel form.
    2. LINE Developers Console → the OA’s channel → Messaging API tab → Webhook settings → Webhook URL → Edit → paste → Update.
    3. Click Verify — it must show Success. LINE sends a test request signed with the Channel Secret; Puccha accepting it proves both the URL and the secret are right.
    4. Turn the Use webhook switch on. This is the most-missed step: Verify passes but the bot never replies.
    5. Recommended: enable Webhook redelivery. If Puccha is briefly slow, LINE resends and Puccha de-duplicates, so customers never get a doubled answer.
    6. One Puccha LINE channel serves one OA. Never put the same Webhook URL on several OAs — their Channel Secrets differ and the others are rejected with 401.
  5. 5

    Turn off Auto-response in LINE OA Manager manager.line.biz ↗

    The most important and most-skipped step. Leave it and customers get two bubbles — LINE’s own “this account cannot reply” notice followed by the real answer — and the first message after connecting can be lost entirely.

    1. OA Manager → your OA → Settings → Response settings.
    2. Webhooks: ON — forwards customer messages to Puccha (same switch as Use webhook in step 4; either place works).
    3. Auto-response messages: OFF — otherwise LINE competes with Puccha for the single-use reply token and answers get doubled or lost.
    4. Greeting message: OFF — Puccha already sends its own welcome to new friends; both on = two messages.
    5. Chat (manual replies from OA Manager): OFF recommended, so your team replies from the Puccha inbox and the history stays in one place. You may keep it on to reply from the LINE OA app too, but those replies never appear in Puccha.
    6. Older accounts show a Response mode: Bot / Chat selector instead — choose Bot, then set Webhooks on and Auto-response off as above.
  6. 6

    Test from a real phone

    Run these four checks in the LINE app with Puccha → Inbox open beside you.

    1. Add the OA as a friend via its Basic ID or QR → exactly one welcome message from Puccha (“สวัสดีค่ะ! 👋 ยินดีต้อนรับ…”). Nothing appears in Puccha yet — adding a friend does not open a conversation.
    2. Send a question your documents answer (e.g. opening hours) → typing indicator for 3–10 s → the answer, follow-up quick-reply buttons, and a “Sources” card when the answer comes from a knowledge pack. In Puccha a new conversation appears in Inbox with your LINE name and a LINE icon, plus a new ticket.
    3. Send a sticker → an instant “thanks for the sticker, type your question” reply; the sticker shows in the same conversation.
    4. Ask a follow-up (“and on holidays?”) → an answer that uses the previous turn; it continues the same conversation, no new one is opened.
    5. The first message after connecting may be slower than usual (cold start). No answer within 30 s → send the question once more before troubleshooting.

Using the bot in LINE groups

The bot works in LINE groups but only answers messages addressed to it, and only after a member opts the group in. Ordinary chat between members is never read or stored. First allow the OA to join groups: LINE Developers Console → Messaging API → Allow bot to join group chats = Enabled.

Type in the groupResult
ปุจฉา เปิด / puccha on Opt the group in (once per group)
ปุจฉา ปิด / puccha off Opt the group out
ปุจฉา เปิดกี่โมง The bot answers from the knowledge base
@BotName เปิดกี่โมง Same — an @mention of the OA needs no trigger word
(any message without the trigger) Ignored — not read, not stored

After connecting

To do thisHowNote
Change the channel name, AI persona or group trigger word Edit → change only those fields → Update channel Leave Channel Secret / Access Token blank (“Leave blank to keep current”) — the stored values stay. Takes effect on the next message.
Rotate the Access Token (suspected leak, or someone clicked Reissue) LINE Developers → Messaging API → Channel access token → Reissue → copy → Puccha → Edit → paste into Access Token → Update channel → Verify Do it back-to-back within minutes; in between the bot cannot send (incoming messages still reach the inbox).
Rotate the Channel Secret (after Issue in Basic settings) Copy the new value → Puccha → Edit → paste into Channel Secret → Update channel → LINE Developers → Webhook → Verify A mismatched secret rejects every LINE message (401) — customers get no answer at all.
Change the bot’s tone or document scope on LINE Create a persona under Personas, then pick it in the channel’s AI persona field You can use a different persona from the web widget — e.g. shorter, friendlier answers on LINE.
Pause the bot without deleting LINE Developers → Messaging API → turn Use webhook off Turn it back on when ready. Messages sent while off are not forwarded to Puccha and get no reply.
Disconnect permanently Delete → confirm “Delete channel” Webhook routing stops immediately; existing conversations stay in the inbox. Also turn Use webhook off on the LINE side, or LINE keeps posting to a URL with no channel (404).

Troubleshooting

SymptomUsual causeFix
Bot is silent — no reply at all Use webhook in LINE Developers is still off (Verify passed but the switch was never flipped), or Webhooks in OA Manager is off Turn on Use webhook (step 4) and Webhooks in Response settings (step 5), then send again
Silent, and Verify in LINE shows 401 Channel Secret in Puccha does not match this channel Edit → paste the Channel Secret again → Update channel → Verify again
Silent, and Verify shows 404 Wrong URL, or the LINE channel in Puccha was deleted Copy the URL from the Webhook URL box in the Puccha form again; recreate the channel if it is gone
Silent, but Verify passes and the conversation appears in the Puccha inbox Access Token no longer works (expired or reissued) — Puccha receives but cannot send Click Verify on the channel card; on “Invalid or expired access token”, issue a new token and paste it into Access Token
Two bubbles: “this account cannot reply…” then the real answer Auto-response messages in OA Manager is still on Turn it off (step 5)
First message after setup got no answer; later ones work Cold start plus Auto-response racing for the reply token Turn Auto-response off and resend; not a permanent fault
Two welcome messages after adding as friend Greeting message in OA Manager is still on Turn Greeting message off (Puccha sends its own welcome)
Bot says “no information” although the document has it Document still processing, not published for external channels, or the persona restricts document scope Check document status under Documents, that it is public for external channels, and the persona’s scope
Replies take longer than 10 s Long question, or high load Normal for short spells; if it persists check Reliability in Puccha
In a group, “ปุจฉา …” gets no reply Group not opted in, a custom trigger word is set, or the OA is not allowed to join groups Have a member type “<trigger> เปิด” first; check the channel’s trigger word; enable Allow bot to join group chats
Create fails with “A line channel already exists” This organization already has a LINE channel Edit the existing channel, or delete it before creating a new one
Bot stopped replying after a customer asked for a human Working as designed — the bot stays quiet until an agent picks the conversation up in Inbox Open the conversation and reply; the reply is pushed to the customer’s LINE

Still stuck after the table above? Contact Puccha support with four things: your organization slug (from the URL), the OA’s Basic ID, the time you sent the test message, and a screenshot of the Verify result in LINE Developers Console.

FAQ

Does this cost anything on the LINE side?

Replying to a message a customer sent (reply) is free and unlimited. Puccha replies that way by default and uses the push quota (your OA plan’s monthly message allowance) only when an answer takes over a minute or an agent replies from the inbox later.

Which language does the bot answer in?

The language the customer asked in, Thai or English, grounded in your documents. Tone is adjustable per persona.

Can one organization connect several OAs?

One organization = one LINE OA, alongside Facebook Messenger, Instagram, WhatsApp, Telegram and others, all in the same inbox. Several brands with their own OAs → one Puccha organization per brand.

Can agents reply to customers themselves?

Yes — open the conversation in Inbox and type. The message is sent to the customer’s LINE as the OA. Once an agent takes over, the bot stops replying in that conversation.

What if customers send audio, video, files or a location?

The bot cannot answer those but tells the customer it only handles text and images, and logs them in the conversation so agents see them. Images (PNG/JPEG/WebP/HEIC up to 5 MB) are read; images with ID cards, faces or payment cards are refused under PDPA policy.

What does Puccha store about LINE customers?

LINE user ID, display name, profile picture and the conversation messages. No phone number or email — LINE does not provide them. Per-person deletion is available under Customers (PDPA §33). Channel Secret and Access Token are stored write-only; they cannot be read back after saving.

Go-live checklist