Templates / Email to Notion knowledge base with IMAP, Postgres dedup and Telegram alert

Email to Notion knowledge base with IMAP, Postgres dedup and Telegram alert

Ready for 3.0

by Ariyanto Catur Pamungkas · 621 views · created 2025-08-14 · Internal Wiki, Multimodal AI

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This workflow has 24 nodes and runs when a new email arrives over IMAP (plus 3 other triggers). Along the way it connects Postgres, Notion and Telegram.

How it runs

Trigger: When a new email arrives over IMAP (plus 3 other triggers).

  1. Code: runs custom JavaScript code
  2. Code: runs custom JavaScript code
  3. Execute a SQL query (Postgres): run a query
  4. Execute a SQL query (Postgres): run a query
  5. If: checks a condition and branches into true / false
  6. If: checks a condition and branches into true / false
  7. Create a database page (Notion): work with database page
  8. Create a database page (Notion): work with database page
  9. Send a text message (Telegram): uses Telegram
  10. Send a text message (Telegram): uses Telegram

…plus 10 more steps. See the full node list below.

Services it uses

PostgresNotionTelegram

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (6)

From the author

Filter incoming emails via IMAP, extract & clean the body into plain text, normalize (title/slug/snippet/date/from/url), check for duplicates in Postgres, store as a row in a Notion database, then send a Telegram notification. Perfect for building a knowledge…

Excerpt from Ariyanto Catur Pamungkas's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.