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
- The code of the LINE chatbot built with the HackMD API has been made public GitHub。
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 orgit clone
down. You can Fork it! - Get HackMD API
Token
, fill inHACKMD_API_TOKEN
, and assign anTEMP_NOTE_ID
inconfig.py
. - Create an exclusive Channel in LINE Developers, get
Token
,Secret
, fill inCHANNEL_ACCESS_TOKEN
andCHANNEL_SECRET
. - Get the Imgure
Client ID
, and fill inIMGURE_CLIENT_ID
inconfig.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.