Skip to content

ShoroukAziz/notion-potion

Repository files navigation

🧪 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

Notion-Potion.mp4

💬 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
  • 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

🔗 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
  • 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.example and rename it .env and fill in your tokens and telegram user id
    TELEGRAM_BOT_TOKEN=Your telegram bot token
    MY_USER_ID=your telegram user id
    NOTION_TOKEN=your Notion token
  • copy notion.example.sqlite and rename it to notion.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

🧰 Development Dependencies

About

a telegram bot for Notion

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published