notion-potion
notion-potion copied to clipboard
a telegram bot for Notion
๐งช Notion-Potion
Effortlessly brew new Notion pages with Notion-Potion Telegram Bot!
Notion-Potion is a Telegram bot that lets you quickly and easily save new notes, tasks, events etc... to your Notion workspace.
๐ช Inspiration
The idea behind this bot is heavily inspired by David Allen's book Getting Things Done. And, is the upgrade to the method used in this previous blog post: Implementing a GTD inbox in Notion
๐ฎHow it Works
https://github.com/ShoroukAziz/notion-potion/assets/27028706/8d2933bd-9206-4f2c-9e3f-438ec0d29ace
๐ฌ Sending text messages
-
You send a message to your bot. It get's automatically saved to your Notion Inbox database
- You then can then do any of the following
- Rename the page
- Move the page to another database ex: tasks, notes, etc...
- Link the page to a specific project
- link the page to a specific Topic
- Delete the page
- You then can then do any of the following
-
Or, you can tell the bot directly where to save the page
- for example to save a page to your notes you append or prepend your message with
@note
- for example to save a page to your notes you append or prepend your message with
๐ Sending URLs
- Links that matches a specific website you have set up before will get saved directly to the specified database
- Ex: a URL of Youtube video gets added to the Bookmarks database while a URL of an Amazon product gets saved in the Shopping database
- Text you send with the URL gets saved inside the page as a text block.
๐ Documentation
๐ง Coming soon
โ ๏ธ Prerequisites
- You have a telegram bot
- Use BotFather to create one and obtain your token
- Yon know your telegram user id
- use jsondumpbot to get it.
- You have a Notion API Token
- You have your Notion workspace setup [๐ง tutorial coming soon]
๐ Getting Started
- Fork this repository and clone it to your local machine.
- Copy
.env.exampleand rename it.envand fill in your tokens and telegram user idTELEGRAM_BOT_TOKEN=Your telegram bot token MY_USER_ID=your telegram user id NOTION_TOKEN=your Notion token - copy
notion.example.sqliteand rename it tonotion.sqlite- Replace the example databases with your databases [๐ง tutorial coming soon]
- Install all the dependencies
npm install - Run the bot ๐ฅณ
npm run
๐งฑ File Structure
โโโ docs # screenshots for readme
โโโ src
โ โโโ bot # All the bot code like the event handlers, keyboards, state, etc...
โ โโโ classes # All the Classes used by the bot
โ โโโ databases # Connection to the database and all the data retrieval
โ โโโ lib # Helper classes like Logger and Util
โโโโ __test__ # Testing code.
โโโโ .env.example # example env file.
โโโโ notion.sqlite.example # example database file.
โโโโ app.js # Entry point for the bot.
โโโโ package-lock.json
โโโโ package.json
โโโโ README.md
๐ฆ Dependencies
- ๐ณ @notionhq/client
- ๐ค node-telegram-bot-api
- ๐ฐ axios
- ๐จ chalk
- ๐ dotenv
- ๐ node-html-parser
- ๐ nodemon
- ๐ sqlite3
๐งฐ Development Dependencies
- ๐ข jest