First you have to create a telegram bot using @BotFather. Once a conversation began use its commands and click on /start. Then follow the procedure:

  • On the command list select the command /newbot and choose a name for your bot, for example: MyAwesomeBot
  • Choose an username for your bot, it must end with bot, for example: myawesome_bot
  • At this point Botfather will tell you that the creation has taken place successfully and will send you a message with the token to be used to interact with the bot via HTTP API. We will use this token in the quarkus section
  • You can start a new conversation with your bot from the<bot_username> to verify that everything was created correctly.


First of all you must have a notion account, otherwise register one for free here: Notion. After that there are two configuration steps to make the bot works.

Create an integration#

First of all you have to create an integration which is the way in which Notion allows third-party applications to interact with their resources, to do this you have to go to this page: My integrations, and click on the + New Integration button

Create new integration

On the Basic Information page choose a name for your integration, select a workspace in which the extension will be enabled and click on Submit.

Basic Information

Now on the integration page you must get the Internal Integration Token which we will need later in the configuration of our application.

Copy Secret

Create a DB and connect to the integration#

At this point we need to create our Notion database which we will then connect to the integration we have just created. Create a new Page and put a new database, choose a title and set the column in this way:

Type: CheckboxType: TitleType: URLType: Multi-selectType: Date

Schema Table Notion

If you want to launch the project without any modification, give the name to the columns exactly as indicated in the table above.

Now click on the three dots in the upper right of the page, click on the add connections button, select the integration you created earlier and Confirm.

If you did everything correctly now your integration is correctly linked to your database. Congrats!


Within the Quarkus project, the application.yaml file must be created and positioned in the src->main->Resources folder, with this content:

    root-path: /health
    port: 30090
      url: ''
      scope: 'javax.inject.Singleton'
    username: <YOUR_BOT_USERNAME>
    token: <YOUR_BOT_TOKEN>
      response: 'Page with title: "%1$s" saved in Notion database with tags: %2$s'
  version: '2022-06-28'

Some indications:

  • <YOUR_BOT_USERNAME>: is the username that you choose for your bot in the Telegram section, ex: myawesome_bot
  • <YOUR_BOT_TOKEN>: is the token that Botfather sends you back when you create a new bot
  • <YOUR_NOTION_DATABASE_ID>: is the id of your notion database that you can read in the url of your database page
    Notion Database ID
  • <YOUR_NOTION_SECRET_KEY>: is the Internal Integration Token that you get in the Secrets tab of your integration