Productivity · n8n

Save Telegram Bot Messages Instantly to a Notion Database

Capture any message you send to your personal Telegram bot and automatically log it as a new entry in a Notion database. Never lose a quick idea, note, or reminder again.

difficulty Beginnersetup 30 minresult Every message sent to your Telegram bot is saved as a timestamped row in your chosen Notion database within seconds.
  1. 1

    Create a Telegram Bot and connect it

    Open Telegram and message @BotFather. Send /newbot, follow the prompts, and copy the API token. In n8n add a Telegram Trigger node, paste your token into a new Telegram credential, and set the Updates field to message. This node fires every time you message the bot.

  2. 2

    Extract the message text and timestamp

    Add a Set node after the trigger. Create two fields: set messageText to the expression {{ $json.message.text }} and receivedAt to {{ $now.toISO() }}. This cleans the data before it reaches Notion.

  3. 3

    Filter out empty or command messages

    Add an IF node. Set the condition: messageText is not empty (check that {{ $json.messageText }} exists and does not start with /). Connect the true branch to the next step so only real notes are saved.

  4. 4

    Create a new page in your Notion database

    Add a Notion node set to operation Create and resource Database Page. Connect your Notion credential (grant n8n access in Notion integrations settings). Set Database ID to your target database ID (found in the database URL). Map the Name property to {{ $json.messageText }} and add a text property Received At mapped to {{ $json.receivedAt }}.

  5. 5

    Send a confirmation back to Telegram

    Add a Telegram node set to operation Send Message. Use the same credential. Set Chat ID to {{ $('Telegram Trigger').item.json.message.chat.id }} and Text to Saved to Notion!. This gives you instant feedback that your note was logged.

Frequently asked questions

How do I find my Notion database ID?

Open your Notion database in a browser. The URL looks like `https://notion.so/yourworkspace/DATABASE_ID?v=...`. Copy the 32-character string between the last `/` and the `?` — that is your database ID.

Will this work if I send photos or voice messages?

This workflow is configured for text messages only. The IF node filters out non-text content. To support photos or voice notes you would need additional nodes to handle those Telegram update types separately.

Do I need to keep n8n running all the time?

Yes. The Telegram Trigger uses a webhook, so your n8n instance must be reachable from the internet. On n8n Cloud this is handled automatically. For self-hosted n8n, make sure your server is always on and the webhook URL is publicly accessible.

About this recipe. Recipes on FlowRecipesHub are written for business owners, not developers, and are tested before publishing — how recipes get made. Some ingredient links are affiliate links that cost you nothing — full disclosure.