How to make file paths clickable links in n8n Chat (RAG output metadata)

Hello everyone,

I’m currently building a RAG workflow in n8n where an AI agent retrieves documents from a database (PDFs / internal company files). At the end of each response, the AI also outputs the file name and file path of the sources it used.

My current system prompt in the AI node looks like this:

If metadata “Dateipfad” exists, include it in the response.

Always return a source section at the end:

Format:

:page_facing_up: Source:
:link: File Path:

This works well so far — the AI correctly returns both the document name and the file path.


:red_question_mark: My question

I would like the file path to appear as a clickable link inside the n8n Chat UI.

Is this possible in n8n Chat, and if yes, what is the correct way to implement it?

What I tried / wondering:

  • Can this be handled directly in the AI system prompt (e.g. Markdown like [open file](path))?

  • Or do I need to add a Code Node after the AI node to format the output properly?

  • Or is Markdown not supported in the n8n Chat UI for clickable links at all?


Any guidance on the correct approach would be highly appreciated.

Thank you!

Good day, @Leon22
Yes, but I’d say you need to convert it into something like a signed URL or your own download endpoint, for example.