# Save Bookmarks to Notion Database with Telegram and Quarkus

Hi everyone, in this post, I want to show you how I experimented with the [Quarkus framework](https://quarkus.io/) to solve a problem I had with saving articles to **read them later** from different PCs and from my smartphone.

## Background

For work and in my personal life I use 3 devices:

- Business PC with [Ubuntu](https://ubuntu.com/)
- Personal PC with [Pop! _OS](https://pop.system76.com/)
- Smartphone with Android

On all these devices when I browse it often happens that I want to save articles, web pages, and guides to read later. I have been using [Notion](https://www.notion.so/) for some time to organize my bookmarks list, in which I created a database where I save my links, add tags, date, and if I have already read them or not.
But using 3 different devices I wanted a quick way to save the links directly in Notion without having to open the web or the Android app, create a new line, choose tags, and put a title and a date.

So I thought of creating a simple [Telegram Bot](https://core.telegram.org/bots) to which I can send a message and it, using the Notion APIs, saves the web page in my database. The Bot is powered by a **Quarkus** application.

Let's see how I did it!

## Application

The source code of the application is available in this repo on GitHub: [Telegram2Notion Quarkus](https://github.com/polilluminato/telegram2notion-quarkus) released under [MIT license](https://github.com/polilluminato/telegram2notion-quarkus/blob/main/LICENSE.md).

Once configured, the result is what you can see in this video:

%[https://vimeo.com/763926082]

Here is some information about the project:

- to interact with the telegram bot I used the library: [Telegram Bots](https://mvnrepository.com/artifact/org.telegram/telegrambots) which allows you to interact with a Telegram bot from a Java application;
- to interact with the Notion API I used the documentation here: [Introduction](https://developers.notion.com/reference/intro) and the [Postman collection](https://www.postman.com/notionhq/);
- to create the app documentation I used [Docs.page](https://docs.page/) by [Invertase](https://invertase.io/);
- the app documentation is available at [Telegram2Notion Quarkus Docs](https://docs.page/polilluminato/telegram2notion-quarkus);
- I used [jsoup: Java HTML Parser](https://jsoup.org/) to obtain information on the webpage sent to the bot;
- to get information on the status of the app I have enabled [Quarkus SmallRye Health](https://quarkus.io/guides/smallrye-health)

The general operation is schematized as follows:

![new-link-to-save.jpg](https://cdn.hashnode.com/res/hashnode/image/upload/v1666815342165/mDWN9Ng-i.jpg align="left")

## Future

You can always follow the development of the application by referring to the repo on GitHub: [Telegram2Notion Quarkus](https://github.com/polilluminato/telegram2notion-quarkus) and on the [issues page](https://github.com/polilluminato/telegram2notion-quarkus/issues), currently the next feature to be implemented is the possibility to specify a custom title for the link you want to save ([#5](https://github.com/polilluminato/telegram2notion-quarkus/issues/5)).

Bye, Alberto


