Telegram-integrated AI tool that leverages OpenAI's Assistant API for efficient tagging and categorization of thoughts and ideas. It simplifies thought organization by seamlessly syncing with your Notion DB.
- Dedicated compute instance to host the Telegram bot.
- OpenAI plus subscription plan.
- Telegram account.
- Deepgram account (optional).
- Follow this guide to create your bot.
- Place the obtained API key in the
.env
file: (TELEGRAM_API_KEY=<your key>
).
- Obtaining Notion API key (link). Add it to your
.env
file (NOTION_API_KEY
). - Obtaining OpenAI API key (link). Add it to your
.env
file (OPENAI_API_KEY
). - Optional: create a Deepgram account to get your API key (only required if you want to use speech recognition).
- Visit https://platform.openai.com/assistants.
- Create a new assistant.
- The instructions can be found here.
- Add
save_entry
function. The function's JSON can be found here. - Select the GPT-4 model and copy the assistant ID (formatted as
asst_
) to your.env
file (OPENAI_ASSISTANT_ID
).
- Create a new page and insert a database (guide).
- Click on the 3-dot menu in the header section of your database view and select
Copy link to view
. - The link you'll get will look like this:
https://www.notion.so/[YOUR_DATABASE_ID]?v[VIEW_ID]&pvs=[INT]
. - Copy your database ID from the url and add it your .env file (
NOTION_DATABASE_ID=
). - Click on the 3-dot menu in the top right corner of your page and click on
+ add connection
. Select the integration you created. If you haven't yet, please follow this guide.
Add the WHITELIST
property to your .env
, which should contain your Telegram username. This way only you can interact with your bot even if other people will discover it.
If you did everything right, your `.env' file should look something like this:
OPENAI_API_KEY=
OPENAI_ASSISTANT_ID=
TELEGRAM_API_KEY=
DEEPGRAM_API_KEY=
NOTION_API_KEY=
NOTION_DATABASE_ID=
WHITELIST=
You'll need a server with Git and Node.js installed.
Simply clone the project, run yarn build
(or npm build
) and create a .env
file in the dist
folder. Use a tool like PM2 to start a process on your server.