Hi everyone, in this post, I want to show you how I experimented with the Quarkus framework to solve a problem I had with saving articles to read them later from different PCs and from my smartphone.
For work and in my personal life I use 3 devices:
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 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 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!
Once configured, the result is what you can see in this video:
Here is some information about the project:
- to interact with the telegram bot I used the library: Telegram Bots 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 and the Postman collection;
- to create the app documentation I used Docs.page by Invertase;
- the app documentation is available at Telegram2Notion Quarkus Docs;
- I used jsoup: Java HTML Parser 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
The general operation is schematized as follows:
You can always follow the development of the application by referring to the repo on GitHub: Telegram2Notion Quarkus and on the issues page, currently the next feature to be implemented is the possibility to specify a custom title for the link you want to save (#5).