# 🧠 Second Brain on Telegram: save and search your links (Google Sheets + Supabase RAG)

**URL:** <https://community.n8n.io/t/second-brain-on-telegram-save-and-search-your-links-google-sheets-supabase-rag/304330>\
**Category:** Built with n8n\
**Created:** [July 22, 2026, 3:38pm UTC](https://community.n8n.io/t/second-brain-on-telegram-save-and-search-your-links-google-sheets-supabase-rag/304330 "2026-07-22T15:38:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohamed3nan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mohamed3nan/32/188347_2.png) [@mohamed3nan](https://community.n8n.io/u/mohamed3nan)\
**Post date:** [July 22, 2026, 3:38pm UTC](https://community.n8n.io/t/second-brain-on-telegram-save-and-search-your-links-google-sheets-supabase-rag/304330/1 "2026-07-22T15:38:23Z")

</div>

## 🧠 Second Brain - Link Library (Telegram Agent)

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/8/4/84902b22eeb77f95e7435771bc2a4dd653858394.png)

**Workflow:**

> **[Save, search, and summarize Telegram links with Google Sheets and Supabase |...](https://n8n.io/workflows/17387-save-search-and-summarize-telegram-links-with-google-sheets-and-supabase/)**
>
> Quick overviewThis workflow turns a Telegram bot into a “second brain” link library by saving shared URLs to Google Sheets, generating...

Send any link to your Telegram bot - the agent reads the page with Jina Reader (r.jina.ai), writes a concrete summary, picks a category (reusing existing ones), and files it into Google Sheets. Send the same link again and it updates the existing card - never a duplicate. Ask questions and it answers from your library, including semantic (RAG) search over the full text of every saved page via Supabase vectors.

## Who’s it for

Anyone who saves links every day and can never find them again - and n8n builders who want a clean AI Agent + tools + RAG pattern to extend.

## How it works

- A Telegram AI agent routes every message: URL → save, question → search, anything else → a short how-to reply. /clear resets the per-chat memory.
- save\_link calls a deterministic webhook path: normalize the URL (the dedup key) → read the page via Jina Reader → an AI librarian writes title + concrete summary and reuses existing categories → upsert matched on URL. Your comment stays on the card (My Note). If a page cannot be read, nothing is filed - the bot tells you to retry instead of saving guesses.
- On every save, old vectors are deleted and the full page text is re-chunked and re-embedded into Supabase - a true replace, so RAG never serves stale versions.
- Two search tools: search\_library (the Sheet - source of truth for lists, counts, categories) and search\_content (semantic search over full page text).

## Requirements

- Telegram bot token
- Google Sheets
- AI chat model + Google Gemini embeddings (or your own)
- Supabase project (free tier is fine)
- Jina Reader (r.jina.ai) - free, no API key needed (better with API)

## How to set up

1. Create the credentials above and select them on each node. Create ONE Header Auth credential and use it in TWO places: the ‘save link’ webhook and the save\_link agent tool (same header name + value).
2. Run the SQL from the Supabase note in your project’s SQL editor.
3. Click ‘Run Setup Once’ → Execute: it creates the spreadsheet; the last node (‘Spreadsheet Id’) outputs its ID.
4. Paste that ID into Document → By ID on 4 nodes: Find This Link · Read All Cards · Save to Library · search\_library.
5. In the save\_link tool, change the URL to your instance: [https://YOUR-DOMAIN/webhook/second-brain-save-link](https://YOUR-DOMAIN/webhook/second-brain-save-link)
6. Publish and send your bot a link 🎉

## How to customize

- Swap Google Sheets for Notion (or any wiki): storage is isolated inside the Save Link path - replace only those nodes; the agent and tools stay untouched.
- Add doorways: email, Slack or voice = another trigger feeding the same agent; each caller passes its own `source`.
- Tune the Librarian prompt (summary style, category rules), the model nodes (any OpenAI-compatible router), or RAG settings (chunk size, topK).

## About this workflow

This is my entry to the [#n8nAgentLightGiveaway challenge](https://www.linkedin.com/posts/mario-haarmann_n8nagentlightgiveaway-agentgiveawaythread-ugcPost-7485249610203066368-IUzh/) by **Mario Haarmann** @octionic

- sharing it here so anyone can import it and build their own version.

Feedback welcome!

---

<div class="post-metadata">

**Author:** ![mohamed3nan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/mohamed3nan/32/188347_2.png) [@mohamed3nan](https://community.n8n.io/u/mohamed3nan)\
**Post date:** [July 27, 2026, 10:15am UTC](https://community.n8n.io/t/second-brain-on-telegram-save-and-search-your-links-google-sheets-supabase-rag/304330/2 "2026-07-27T10:15:00Z")

</div>

The Templates team is unbelievably lazy, I honestly don’t understand what the problem is.

 ![image](https://europe1.discourse-cdn.com/n8n/original/3X/6/4/642b88e9b46a02334129043de62d9a4d789bec20.png)

I’ve submitted this workflow twice, and I’m confident there’s nothing wrong with it. Instead of explaining what the issue is, they just sent back the exact same workflow without any communication or feedback. I honestly have no idea what they expect me to change.

The template library is already full of low-quality templates, yet they seem determined to reject every minor issue they can find.

You’re just discouraging people from contributing.

And that’s before even mentioning the unnecessary bureaucracy and the AI-generated template descriptions that you have to fight with. The whole submission process has become a nightmare, gg 🙂

---

<div class="post-metadata">

**Author:** ![BramKn](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/bramkn/32/11894_2.png) [@BramKn](https://community.n8n.io/u/BramKn)\
**Post date:** [July 27, 2026, 11:05am UTC](https://community.n8n.io/t/second-brain-on-telegram-save-and-search-your-links-google-sheets-supabase-rag/304330/3 "2026-07-27T11:05:44Z")

</div>

Hi @mohamed3nan

Maybe this last message is better suited as a feedback topic. Also I would probably change the tone a bit. As an active member of the community you know that the team is always busy with a load of stuff, so would be good to give them the benefit of the doubt with regards their intent. 🙂

Nice submission though, we are working on one as well. 🙂

---

<div class="post-metadata">

**Author:** ![gwashark](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/gwashark/32/147758_2.png) [@gwashark](https://community.n8n.io/u/gwashark)\
**Post date:** [August 15, 2026, 5:17am UTC](https://community.n8n.io/t/second-brain-on-telegram-save-and-search-your-links-google-sheets-supabase-rag/304330/4 "2026-08-15T05:17:10Z")

</div>

This is a genius idea! Thanks for making this! Now I can finally save news in the technology field at ease!
