This is a telegram bot, that sends text notes to the daily documents (or in a separate folder, just tagging date) in remnote. If the text contains a link, then this link will be extracted and used as a source for rem. Any additional notes, following the created rem, are possible.
The bot is intended to be run from heroku on a free tier. The installation guide below describes how to get the bot running.
- Send text notes directly to the daily page, or in a separate folder, still referencing today's page
- Share websites to the remnote (the same as text notes). If a link is found within the text, then it becomes a source, and page title becomes the rem text
- Add any subsequent notes to the created rem (right after the creation). All the notes will put inside created rem.
- Tags are only supported if they are one word ( underscore delimiter can be also used). In this case they can be added via ##example_tag while making a note. You can add multi-word tags via #[[example tag]]
- References are encapsulated in [[example reference]]. They can consist of several words.
- Send photos in the same way as text notes!
- Embed audios or voice messages in the daily notes or in a separate folder
- Embed videos by sending bideo file, or a link. If you are sending a link the additional question will be asked if this link is a video link (for example to youtube video)
- Make your text stands! You can use this guide to make your tect bold or add some headers!
For example: The one can share a link to a bot and follow it with several text messages, describing the ideas described in the website. Maybe "##Idea" can be tagged or [[example project]] referenced.
This version is prefered, as you would have all the control behind your data.
- Create a new bot via the @BotFather bot in Telegram. Just type
/newbot
command and follow the instructions - Install Git and Heroku CLI
- Clone this repo locally and go to the folder. Just type in terminal (or git bash)
git clone https://github.com/pavlohrab/RemNote-bot && cd RemNote-bot
- Then initialize an empty repo
git init
- Create a Heroku app.
heroku login
<- login to the Heroku CLI. If you don't have an account on Heroku, create one.heroku create
<- create an app
- Make API key for remnote (Make sure you registered in RemNote (; )). Please go here and add a new API key. Leave "Enter the name of the top-level folder to restrict this API key to. (Leave this empty for full access.)" field empty. Then Name the Key as you wish.
- Open
bot.py
file in any text editor (in a locally cloned copy of a repo) and add the following fields:TOKEN = ''
<- This is Telegram bot token. It must have been given from @BotFather bot. To remind it, you can list created bots via/mybots
-><your-bot-name>
->API Token
REMNOT_API= ''
<- This is created RemNote API key (in step 6).USER_ID = ''
<- User Id can be obtained from this page, where you have created your RemNote API. Copy the value fromUser ID
column.HEROKU_NAME = ''
<- is the name of your Heroku app when you typedheroku create
. Paste it in the formathttps://yourherokuappname.herokuapp.com/
.HOME_DIR = 'Saved Telegram'
<- Name of a directory (rem) where to save content. You can provide any name you want. If no Rem will be found, it will be created
- Save the
bot.py
file. - From a terminal in a repo directory type
heroku git:remote -a YourAppName
, where your app name should be obtained from the created link -https://yourherokuappname.herokuapp.com/
- Type
git push heroku master
- (optional) Go to the @BotFather bot in a Telegram. Go to the
/mybots
-><your-bot-name>
->Edit Bot
->Edit Command
and typestop - stop adding notes
. Then in the sameEdit Bot
menu go to theEdit Botpic
and upload the picture you like. I used this official one. All the official materials are available here - Congrats, all is done!
The general version of a bot depends on postgresql database on heroku. After the start you should just provide API key and UserID as a messages to a bot. For how to get API key and User Id please see above guide (step 6 and 7.3). There is a limit of users in one telegram bot (10000 in a free Heroku tier), therefore below is a list of maintained bots
List of telegram bots:
- @RemNoteBot - not full. Just find the bot and start the messaging! (Code is available on
remnote_postgres_1
branch of this repo)
The only input, that is needed from the user, is a sent text message. Then the conversation dialogue via incline keyboard will begin:
- Firstly, the user can choose if to save note directly to the daily document, or save it separately
- If a link is provided, then the bot will ask you if the link contains video (additional dialog)
- Secondly, the user can add some following notes. You can add as many notes as you wish. Every message will be treated as separate rem. Links will not be extracted in this mode and would be treated as text. If you finished adding notes, then send the
/stop
command.
Everything regarding how to use tags and references is in the Features section. If any API changes will be made, then this bot will change and evolve (:
Because the bot is hosted on a free Heroku tier, it will go asleep after 30 min of inactivity. What that really means is that it can take up to 1 min for the bot to wake up after sending a message (after a long inactivity period). To my mind, it makes no big deal, but if it bothers you, then you can use Kaffeine app. But do not forget then to add some more free dynos (+400) via adding a credit card to your account!