Build LINE BOT with Hackmd | HackMD Blog
November 21, 2022

Build LINE BOT with Hackmd


Build LINE chat bot with Hackmd API

Why I use HackMD

  • I am a training/educator, often need to organize projects, teaching documents, but also need to assign homework and collect return homework, tried different software services in the market, HackMD is the most convenient, lightweight, based on the sharing of knowledge platform!
  • HackMD is already a part of life.

Awesome usage

  • Organize a series of 30 articles containing Youtube videos in HackMD book mode, and organize the articles through grammatical components Sliders with {%hackmd noteid %} are all done by HackMD.
  • Now I manage my favorites information centrally through the LINE APP, it will automatically sync to hackmd!

The LINE chatbot built with the HackMD API

What problems can be solved

  • You phone pictures, text, and links can eazily share to your LINE official account, and they will be automatically synced to HackMD for subsequent editing.
Photo/text/link/share to LINE APP Automatically sync to HackMD

How the chatbots works

  • There are many ways to build a LINE chatbot, for example, first you need to create an LINE Developers channel, then get the HackMD API, and get Imgure ID. You need to modify the code to add the necessary parameters and deploy it in the, and finally fill in the’s exclusive URL like https://[APP Name] to LINE WebHooks.
  • The easy steps are below to collapse the list, or refer to my tutorial.

easy steps
  • Download the code from GitHub, can be downloaded zip unzip or git clone down. You can Fork it!
  • Get HackMD API Token, fill in HACKMD_API_TOKEN, and assign an TEMP_NOTE_ID in
  • Create an exclusive Channel in LINE Developers, get Token, Secret, fill in CHANNEL_ACCESS_TOKEN and CHANNEL_SECRET.
  • Get the Imgure Client ID, and fill in IMGURE_CLIENT_ID in
  • Create a cloud service on and establish a development connection environment.
  • Finally, fill in your link https://[APP Name] into your LINE Channel Webhook, and enable Webhooks.