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.
- 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 aTelegram Triggernode, paste your token into a new Telegram credential, and set theUpdatesfield tomessage. This node fires every time you message the bot. - 2
Extract the message text and timestamp
Add a
Setnode after the trigger. Create two fields: setmessageTextto the expression{{ $json.message.text }}andreceivedAtto{{ $now.toISO() }}. This cleans the data before it reaches Notion. - 3
Filter out empty or command messages
Add an
IFnode. Set the condition:messageTextis not empty (check that{{ $json.messageText }}exists and does not start with/). Connect thetruebranch to the next step so only real notes are saved. - 4
Create a new page in your Notion database
Add a
Notionnode set to operationCreateand resourceDatabase Page. Connect your Notion credential (grant n8n access in Notion integrations settings). SetDatabase IDto your target database ID (found in the database URL). Map theNameproperty to{{ $json.messageText }}and add a text propertyReceived Atmapped to{{ $json.receivedAt }}. - 5
Send a confirmation back to Telegram
Add a
Telegramnode set to operationSend Message. Use the same credential. SetChat IDto{{ $('Telegram Trigger').item.json.message.chat.id }}andTexttoSaved 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.