Skip to main content

LINE Notifications

Get a LINE message every time one of your bot orders fills. This is the preferred notification channel for users in Thailand, Japan, and Taiwan.

Requirementsโ€‹

LINE notifications require your GridFlow server to have a valid HTTPS domain (e.g. https://gridflowbot.com) because LINE webhooks only work over HTTPS. If you're running on a plain IP address without a domain and SSL, use Telegram instead.

Step 1 โ€” Create a LINE Messaging API channelโ€‹

  1. Go to developers.line.biz
  2. Log in with your LINE account
  3. Click Create โ†’ Create a new provider (name it anything, e.g. GridFlow)
  4. Click Create a new channel โ†’ Messaging API
  5. Fill in:
    • Channel name: GridFlow Alerts (or anything you like)
    • Channel description: A short description
    • Category / Subcategory: Choose any
  6. Agree to terms and click Create

Step 2 โ€” Get your credentialsโ€‹

Inside the channel settings:

Channel Secret (Basic settings tab):

  • Copy the value under Channel secret

Channel Access Token (Messaging API tab):

  • Scroll down to Channel access token (long-lived)
  • Click Issue if no token exists
  • Copy the token

Step 3 โ€” Set the webhook URLโ€‹

Still in the Messaging API tab:

  1. Under Webhook settings, click Edit
  2. Set the webhook URL to:
    https://yourdomain.com/line/webhook
    Replace yourdomain.com with your actual domain.
  3. Click Update, then Verify โ€” you should see "Success"
  4. Toggle Use webhook to ON

Also under LINE Official Account features:

  • Set Auto-reply messages โ†’ Disabled
  • Set Greeting messages โ†’ Disabled

Step 4 โ€” Add credentials to your serverโ€‹

SSH into your server:

cd /root/gridflow
nano .env

Add your credentials:

LINE_CHANNEL_ACCESS_TOKEN=your-long-access-token-here
LINE_CHANNEL_SECRET=your-channel-secret-here

Restart the backend:

docker compose restart backend

Step 5 โ€” Connect your LINE account in the dashboardโ€‹

  1. Open your GridFlow dashboard โ†’ Settings โ†’ Notifications
  2. Under LINE, click Connect LINE
  3. You'll see a 6-character code (e.g. GF7X3K)
  4. Open LINE on your phone and find your bot (search by its LINE ID shown on the channel page)
  5. Send the 6-character code to the bot
  6. The dashboard will refresh and show Connected

Test itโ€‹

Click Send test notification. You should receive a LINE message within a few seconds.

Troubleshootingโ€‹

"Webhook verification failed" โ€” Make sure your domain has valid HTTPS (via Cloudflare or Let's Encrypt). LINE rejects plain HTTP.

Bot doesn't respond to my code โ€” Make sure you sent the exact code shown (all caps, no spaces) and that the webhook is enabled and verified in the LINE console.

I restarted the server and my code expired โ€” Codes expire after 10 minutes. Go back to the dashboard and get a new code.