Build LINE BOT with Hackmd

Nov 21, 2022By@wiimax
#7th-anniversary
cover image

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 Fly.io, and finally fill in the Fly.io’s exclusive URL like https://[APP Name].fly.io/callback to LINE WebHooks.
  • The easy steps are below to collapse the list, or refer to my tutorial.

https://github.com/willismax/hackmd-line-bot-on-fly

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 config.py.
  • 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 config.py.
  • Create a cloud service on Fly.io and establish a development connection environment.
  • Finally, fill in your Fly.io link https://[APP Name].fly.io/callback into your LINE Channel Webhook, and enable Webhooks.
Get started for freePlay around with it first. Pay and add your team later.
Get started for free

Subscribe to our newsletter

Build with confidence. Never miss a beat. Learn about the latest product updates, company happenings, and technical guides in our monthly newsletter.