<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/2OyYhbxHP" -->

---
title: n8n Tutorial: Second Brain With AI Agents & Memory
description: This tutorial builds a 'second brain' automation using n8n, a workflow automation tool sponsored by the video's creator. A Telegram bot captures text, voice...
canonical: https://daily.dev/posts/n8n-tutorial-second-brain-with-ai-agents-memory-2oyyhbxhp
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: n8n Tutorial: Second Brain With AI Agents & Memory | daily.dev
og:description: This tutorial builds a 'second brain' automation using n8n, a workflow automation tool sponsored by the video's creator. A Telegram bot captures text, voice...
og:url: https://daily.dev/posts/n8n-tutorial-second-brain-with-ai-agents-memory-2oyyhbxhp
og:image: https://api.daily.dev/og/posts/2OyYhbxHP.png
og:image:alt: n8n Tutorial: Second Brain With AI Agents & Memory
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# n8n Tutorial: Second Brain With AI Agents & Memory

**[NeuralNine](https://daily.dev/sources/neuralnine)** · 60 min read · 45 upvotes · 3 comments

## Summary

This tutorial builds a 'second brain' automation using n8n, a workflow automation tool sponsored by the video's creator. A Telegram bot captures text, voice notes, and images, routing them through an AI agent powered by GPT-5 Mini with conversation memory. Voice messages get transcribed via OpenAI's transcription model, and content gets stored in a Notion database and indexed in a Qdrant vector store for retrieval-augmented search. A second workflow ingests and embeds captured data, while a third checks Gmail every 15 minutes for emails labeled 'brain', uploading attachments to Google Drive and ingesting their content automatically.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=4lEVI0E5XHw>

## Questions this post answers

### How do I give an n8n AI agent memory across multiple messages in a Telegram conversation?

Use a simple memory node attached to the AI agent and set the session ID to the Telegram chat ID pulled from the Telegram trigger node. Messages sharing the same chat ID are kept in context, with a context window length of 20 messages, letting the agent answer follow-up questions using prior conversation history.

_daily.dev helps developers building conversational agents keep up with memory and session-handling patterns._

### Why does my n8n webhook stop working after I run docker compose restart?

A docker compose restart does not reload the .env file, so webhook URL changes set there never take effect. Instead, run docker compose down followed by docker compose up to force n8n to reload configuration from scratch, which correctly applies an updated webhook URL such as one from an ngrok tunnel.

_developers debugging n8n or docker compose setups can track similar gotchas on daily.dev._

### How do I store and search captured notes for retrieval augmented generation in n8n?

Index extracted content in a Qdrant vector store using OpenAI's text-embedding-3-small model with 1536 dimensions and cosine distance, running Qdrant as a Docker service alongside n8n. A retrieve documents node with a limit of five and metadata included then lets an AI agent search this collection as a tool for RAG-based lookups.

_daily.dev keeps developers building RAG pipelines current on vector store and embedding choices._

## Community discussion

Top comments from developers on daily.dev.

**@confidentcoding** · 4 upvotes

> Most people aren't really using their first ones much these days.....

**@seyoungcho** · 0 upvotes

> Separating capture, embedding ingestion, and periodic email sync into distinct workflows keeps the agent loop clean and easy to debug when an external API flakes.

**@baturhanpro** · 0 upvotes

> ![GIF](https://static.klipy.com/ii/925f17378dd1893b674a723c07535afe/5b/16/2QOSwftR.gif)

## Similar posts on daily.dev

- [The Hidden Opportunity in AI Workflow Automation with n8n for Low-Tech Companies](https://daily.dev/posts/the-hidden-opportunity-in-ai-workflow-automation-with-n8n-for-low-tech-companies-yssqkdzfk) · Towards Data Science · 2 upvotes · 0 comments
- [Living With A Second Brain: How To Build A Personal AI Workspace That Actually Works](https://daily.dev/posts/living-with-a-second-brain-how-to-build-a-personal-ai-workspace-that-actually-works-9qs0271b6) · C\# Corner · 0 upvotes · 0 comments
- [Learn n8n to Design, Develop, and Deploy Production-Grade AI Agents](https://daily.dev/posts/learn-n8n-to-design-develop-and-deploy-production-grade-ai-agents-3d7bteebb) · freeCodeCamp · 170 upvotes · 2 comments
- [How to build your first end-to-end AI workflow in n8n](https://daily.dev/posts/how-to-build-your-first-end-to-end-ai-workflow-in-n8n-lpowryi0s) · The New Stack · 1 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#automation](https://daily.dev/tags/automation), [#openai](https://daily.dev/tags/openai), [#vector-search](https://daily.dev/tags/vector-search), [#n8n](https://daily.dev/tags/n8n)

[View this post on daily.dev](https://daily.dev/posts/n8n-tutorial-second-brain-with-ai-agents-memory-2oyyhbxhp)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"n8n Tutorial: Second Brain With AI Agents \u0026 Memory","url":"https://daily.dev/posts/n8n-tutorial-second-brain-with-ai-agents-memory-2oyyhbxhp","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/n8n-tutorial-second-brain-with-ai-agents-memory-2oyyhbxhp"},"datePublished":"2026-11-16T17:05:30.265Z","dateModified":"2026-11-16T17:06:32.481Z","description":"This tutorial builds a 'second brain' automation using n8n, a workflow automation tool sponsored by the video's creator. A Telegram bot captures text, voice...","image":"https://i.ytimg.com/vi/4lEVI0E5XHw/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/4lEVI0E5XHw/sddefault.jpg","isAccessibleForFree":true,"articleSection":"NeuralNine","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"NeuralNine","logo":"https://media.daily.dev/image/upload/s--bMYO07OB--/f_auto,q_auto/v1777800757/logos/neuralnine?_a=BAMAMiWQ0","url":"https://daily.dev/sources/neuralnine"},"commentCount":3,"discussionUrl":"https://daily.dev/posts/n8n-tutorial-second-brain-with-ai-agents-memory-2oyyhbxhp","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":45},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":3}],"keywords":"ai-agents,automation,openai,vector-search,n8n","timeRequired":"PT60M","video":{"@type":"VideoObject","name":"n8n Tutorial: Second Brain With AI Agents \u0026 Memory","description":"This tutorial builds a 'second brain' automation using n8n, a workflow automation tool sponsored by the video's creator. A Telegram bot captures text, voice...","thumbnailUrl":"https://i.ytimg.com/vi/4lEVI0E5XHw/sddefault.jpg","uploadDate":"2026-11-16T17:05:30.265Z","duration":"PT60M","url":"https://api.daily.dev/r/2OyYhbxHP","embedUrl":"https://www.youtube.com/embed/4lEVI0E5XHw"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"NeuralNine","item":"https://daily.dev/sources/neuralnine"},{"@type":"ListItem","position":3,"name":"n8n Tutorial: Second Brain With AI Agents \u0026 Memory"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/n8n-tutorial-second-brain-with-ai-agents-memory-2oyyhbxhp","comment":[{"@type":"Comment","text":"Most people aren’t really using their first ones much these days…","datePublished":"2026-11-17T00:05:23.847Z","url":"https://daily.dev/posts/2OyYhbxHP#c-JB4Q4BHf3","author":{"@type":"Person","name":"Lars Faye | Confident Coding","url":"https://daily.dev/confidentcoding","image":"https://media.daily.dev/image/upload/s--OGZu5DEc--/f_auto/v1772569630/avatars/avatar_umWZ9aQAng34qk5aaJl2q?_a=BAMAMiiu0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4}},{"@type":"Comment","text":"Separating capture, embedding ingestion, and periodic email sync into distinct workflows keeps the agent loop clean and easy to debug when an external API flakes.","datePublished":"2026-11-17T00:18:01.922Z","url":"https://daily.dev/posts/2OyYhbxHP#c-OlETliZhS","author":{"@type":"Person","name":"SeyoungCho","url":"https://daily.dev/seyoungcho","image":"https://media.daily.dev/image/upload/s---QniJFEK--/f_auto/v1724901542/avatars/avatar_O3ucZSadxc0iLADSOH3rX"}},{"@type":"Comment","text":"","datePublished":"2026-11-17T07:41:32.020Z","url":"https://daily.dev/posts/2OyYhbxHP#c-JB3QbCD7s","author":{"@type":"Person","name":"baturhan","url":"https://daily.dev/baturhanpro","image":"https://lh3.googleusercontent.com/a/ACg8ocJQ5s2w7kYYdDOtufZ5g50O0V3n1gmNk50z9iPj53RuGAjc2Ss=s96-c"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/n8n-tutorial-second-brain-with-ai-agents-memory-2oyyhbxhp#faq","mainEntity":[{"@type":"Question","name":"How do I give an n8n AI agent memory across multiple messages in a Telegram conversation?","acceptedAnswer":{"@type":"Answer","text":"Use a simple memory node attached to the AI agent and set the session ID to the Telegram chat ID pulled from the Telegram trigger node. Messages sharing the same chat ID are kept in context, with a context window length of 20 messages, letting the agent answer follow-up questions using prior conversation history. daily.dev helps developers building conversational agents keep up with memory and session-handling patterns."}},{"@type":"Question","name":"Why does my n8n webhook stop working after I run docker compose restart?","acceptedAnswer":{"@type":"Answer","text":"A docker compose restart does not reload the .env file, so webhook URL changes set there never take effect. Instead, run docker compose down followed by docker compose up to force n8n to reload configuration from scratch, which correctly applies an updated webhook URL such as one from an ngrok tunnel. developers debugging n8n or docker compose setups can track similar gotchas on daily.dev."}},{"@type":"Question","name":"How do I store and search captured notes for retrieval augmented generation in n8n?","acceptedAnswer":{"@type":"Answer","text":"Index extracted content in a Qdrant vector store using OpenAI's text-embedding-3-small model with 1536 dimensions and cosine distance, running Qdrant as a Docker service alongside n8n. A retrieve documents node with a limit of five and metadata included then lets an AI agent search this collection as a tool for RAG-based lookups. daily.dev keeps developers building RAG pipelines current on vector store and embedding choices."}}]}
```

