[GH-ISSUE #16511] feat: Export chat as markdown / zip with optional Obsidian compatibility #17935

Closed
opened 2026-04-19 23:49:55 -05:00 by GiteaMirror · 14 comments
Owner

Originally created by @Lucy-dot-dot on GitHub (Aug 12, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/16511

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

I often find myself trying to save my chats to Obsidian / Markdown for archival purposes. Right now I copy each message and paste them into Obsidian, excluding images right now

Desired Solution you'd like

The ability to export a chat as Markdown, if images are contained, those may result in a zip or inline rendered. Inline render may result in external editors lagging.

Alternatives Considered

Writing my own rust based solution to transform the json export into the obsidian format

Additional Context

No response

Originally created by @Lucy-dot-dot on GitHub (Aug 12, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/16511 ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description I often find myself trying to save my chats to Obsidian / Markdown for archival purposes. Right now I copy each message and paste them into Obsidian, excluding images right now ### Desired Solution you'd like The ability to export a chat as Markdown, if images are contained, those may result in a zip or inline rendered. Inline render may result in external editors lagging. ### Alternatives Considered Writing my own rust based solution to transform the json export into the obsidian format ### Additional Context _No response_
Author
Owner

@rgaricano commented on GitHub (Aug 12, 2025):

are you tried some json-markdown obsidian plugin?
(e.g. https://github.com/farling42/obsidian-import-json or https://github.com/ethanolivertroy/obsidian-markitdown)

<!-- gh-comment-id:3178032328 --> @rgaricano commented on GitHub (Aug 12, 2025): are you tried some json-markdown obsidian plugin? (e.g. https://github.com/farling42/obsidian-import-json or https://github.com/ethanolivertroy/obsidian-markitdown)
Author
Owner

@Lucy-dot-dot commented on GitHub (Aug 12, 2025):

It seems like the obsidian-import-json plugin requires manual configuration for each user. It does seem to do what I need. Obsidian-markitdown seems like a bad choice since PDFs are notoriously hard to transform into any other good format and keep the style. Having an easy to use export option may be the easiest for compatibility and usage.

I can try to implement this myself however I'm sure a more skilled developer may create a better experience with that

<!-- gh-comment-id:3178128736 --> @Lucy-dot-dot commented on GitHub (Aug 12, 2025): It seems like the obsidian-import-json plugin requires manual configuration for each user. It does seem to do what I need. Obsidian-markitdown seems like a bad choice since PDFs are notoriously hard to transform into any other good format and keep the style. Having an easy to use export option may be the easiest for compatibility and usage. I can try to implement this myself however I'm sure a more skilled developer may create a better experience with that
Author
Owner

@rgaricano commented on GitHub (Aug 12, 2025):

Obsidian-markitdown also can import json files.
(I didn't try, I didn't use obsidian since months, will try later)

<!-- gh-comment-id:3178202638 --> @rgaricano commented on GitHub (Aug 12, 2025): Obsidian-markitdown also can import json files. (I didn't try, I didn't use obsidian since months, will try later)
Author
Owner

@Lucy-dot-dot commented on GitHub (Aug 12, 2025):

Thanks for trying, I have written a CLI tool for myself that does what I need but that isn't a general user friendly solution

<!-- gh-comment-id:3178221935 --> @Lucy-dot-dot commented on GitHub (Aug 12, 2025): Thanks for trying, I have written a CLI tool for myself that does what I need but that isn't a general user friendly solution
Author
Owner

@rgaricano commented on GitHub (Aug 12, 2025):

Lucy,
From what source do you convert it? pdf, json or plain text?
can you share the conversion function that give you a good markdown rendering?

<!-- gh-comment-id:3178281468 --> @rgaricano commented on GitHub (Aug 12, 2025): Lucy, From what source do you convert it? pdf, json or plain text? can you share the conversion function that give you a good markdown rendering?
Author
Owner

@Lucy-dot-dot commented on GitHub (Aug 12, 2025):

I use json as the source, I will upload the source code in a seperate repository, it's quick written so it's not pretty and I haven't gotten around to image

<!-- gh-comment-id:3178300103 --> @Lucy-dot-dot commented on GitHub (Aug 12, 2025): I use json as the source, I will upload the source code in a seperate repository, it's quick written so it's not pretty and I haven't gotten around to image
Author
Owner

@Lucy-dot-dot commented on GitHub (Aug 12, 2025):

https://github.com/Lucy-dot-dot/json-to-md/blob/main/src/main.rs

There you go, if you need a precompiled binary or need me to provide an example, tell me about it

<!-- gh-comment-id:3178318008 --> @Lucy-dot-dot commented on GitHub (Aug 12, 2025): https://github.com/Lucy-dot-dot/json-to-md/blob/main/src/main.rs There you go, if you need a precompiled binary or need me to provide an example, tell me about it
Author
Owner

@Lucy-dot-dot commented on GitHub (Aug 12, 2025):

Looking at the json with images, it seems like it's only possible to get the image seperately and it needs authentication, which makes it harder for me, but not impossible to produce a working cli application

<!-- gh-comment-id:3178347238 --> @Lucy-dot-dot commented on GitHub (Aug 12, 2025): Looking at the json with images, it seems like it's only possible to get the image seperately and it needs authentication, which makes it harder for me, but not impossible to produce a working cli application
Author
Owner

@rgaricano commented on GitHub (Aug 12, 2025):

yes, images should also be downloaded as local files.
An option is as zip, with related files inside assets folder, and Obsidian can import it with the own textbundle importer.
As it's done in own open-webui instance auth shouldn't be a problem.

<!-- gh-comment-id:3178669295 --> @rgaricano commented on GitHub (Aug 12, 2025): yes, images should also be downloaded as local files. An option is as zip, with related files inside _assets_ folder, and Obsidian can import it with the own [textbundle importer](https://github.com/obsidianmd/obsidian-importer/blob/master/src/formats/textbundle.ts). As it's done in own open-webui instance auth shouldn't be a problem.
Author
Owner

@Lucy-dot-dot commented on GitHub (Aug 12, 2025):

Ah sorry for the confusion, the authentication only is an issue for my own cli application. I think the zip idea is great. Should I edit my initial feature request to include this as my preferred proposal?

<!-- gh-comment-id:3178695867 --> @Lucy-dot-dot commented on GitHub (Aug 12, 2025): Ah sorry for the confusion, the authentication only is an issue for my own cli application. I think the zip idea is great. Should I edit my initial feature request to include this as my preferred proposal?
Author
Owner

@rgaricano commented on GitHub (Aug 12, 2025):

Lucy,
I found an easier way: export it as text and rename as .md
Text export is rendered as markdown

Image

<!-- gh-comment-id:3178894120 --> @rgaricano commented on GitHub (Aug 12, 2025): Lucy, I found an easier way: export it as text and rename as .md Text export is rendered as markdown ![Image](https://github.com/user-attachments/assets/5b8015a1-5c9c-46dc-9db0-a33a3db1fa02)
Author
Owner

@Lucy-dot-dot commented on GitHub (Aug 12, 2025):

In this case, at least for me, images generated using the image generation feature are not included by the txt export (which is part of the files section in the json) and thus is not rendered in the txt file. Although I will absolutely use the txt export now for most of my stuff. Thanks for the heads up there

<!-- gh-comment-id:3178932171 --> @Lucy-dot-dot commented on GitHub (Aug 12, 2025): In this case, at least for me, images generated using the image generation feature are not included by the txt export (which is part of the files section in the json) and thus is not rendered in the txt file. Although I will absolutely use the txt export now for most of my stuff. Thanks for the heads up there
Author
Owner

@rgaricano commented on GitHub (Aug 12, 2025):

Text of text exported chat with iframe embedded it's a little odd (but it's for iframe heights not setted, it's just a test in my end)
(I test md with typora, iframe content is operative)

Image

Image

<!-- gh-comment-id:3178952465 --> @rgaricano commented on GitHub (Aug 12, 2025): Text of text exported chat with iframe embedded it's a little odd (but it's for iframe heights not setted, it's just a test in my end) (I test md with typora, iframe content is operative) ![Image](https://github.com/user-attachments/assets/0fb3a7b0-ae6f-4997-ab64-cd886e00ac09) ![Image](https://github.com/user-attachments/assets/023f8a1e-3036-477d-a991-6ed1719aed50)
Author
Owner

@rgaricano commented on GitHub (Aug 12, 2025):

In this case, at least for me, images generated using the image generation feature are not included by the txt export (which is part of the files section in the json) and thus is not rendered in the txt file. Although I will absolutely use the txt export now for most of my stuff. Thanks for the heads up there

ok, then it's only necessary add the local generated images to text exporter and download its also, or embedd raw data of those images as base64 in same file ... I'm going to take a look for the easier way and do some test with images.

<!-- gh-comment-id:3179009271 --> @rgaricano commented on GitHub (Aug 12, 2025): > In this case, at least for me, images generated using the image generation feature are not included by the txt export (which is part of the files section in the json) and thus is not rendered in the txt file. Although I will absolutely use the txt export now for most of my stuff. Thanks for the heads up there ok, then it's only necessary add the local generated images to text exporter and download its also, or embedd raw data of those images as base64 in same file ... I'm going to take a look for the easier way and do some test with images.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#17935