How do I connect Obsidian with n8n for learning?

My idea:
When I read books, I would like to save this information in Obsidian, but I don’t want to forget it. So here’s the task/idea: connect Obsidian to n8n and set up queries via Telegram. You can query anything you want. For example, when learning a new language, you could query vocabulary, or you could use it to understand a topic.

How should I set up a workflow like this?

Telegram Trigger Node > Function Node 1 > HTTP Request Node > Function Node 2 > Function Node 3 (prepare prompt) > AI Agent Node > Telegram Send Message Node

Thanks in advance.

Best regards,

S.P

Hey! Good idea!

I would recommend connecting Obsidian to n8n via API:

Then, you can learn how to build an AI Agent workflow in n8n that utilizes RAG - a vector database made up of your Obsidian files. You load your files into the database, then AI can query the them and answer. You can trigger it through telegram (n8n has a Telegram trigger node). Here is a simple starter template:

If you decide to build this, there are tons of educational videos and content here and on youtube. Just search for N8N RAG (Retrieval-Augmented Generation). You will later use vector stores such as Pinecone to vectorize the Obsidian files.

Hope it helps!

Thanks for your message. I already know the video, but unfortunately it’s not the right one because it adds information to Obsidian (put), whereas I need the information to be retrieved (goes).

The same plugin used - Rest API for Obsidian, can also query your notes. This enables you to use the HTTP node in n8n, which will make a GET request to Obsidian, fetch the text, then output it to the vector database I mentioned earlier. This usually is only required once, if you use a vector db like Pinecone, which will then stay online and wait to be queried by the AI Agent.

Obsidian API methods: Local Rest API for Obsidian: Interactive API Documentation

So, the approach is very similar, just the request you make will be different. But you will still need hands on experience in actually building this workflow with the AI + the vector DB (RAG) so you are confident in using it and also extending it as needed in the future :slight_smile:

I recommend checking out the starter template and any other tutorials on that. If you need help with the HTTP node and making the requests to Obsidian, we will also be happy to help!

Hey krisn0x thank you.

I had already installed the REST API plugin in Opsidian.
I’ll keep trying with AI, but the problem is that different approaches are generated, and these don’t lead to the desired result. I’ll try the vector database (RAG) option, thanks.

I’ve attached a screenshot to illustrate my workflow. Perhaps you can give me a better tip for building a workflow.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.