dvanoni / notero

A Zotero plugin for syncing items and notes into Notion
MIT License
2.25k stars 96 forks source link

Exporting Notes from Zotero to Notion does not include figures #385

Open FelixLangot opened 9 months ago

FelixLangot commented 9 months ago

When trying to export a zotero note to Notion, the figures included in the zotero note are not included in the corresponding Notion page. Text export from zotero notes works fine.

To Reproduce Steps to reproduce the behavior:

  1. In Zotero, open the .pdf of any of your library entries
  2. On the top right, click on 'Notes' and '+' to add an Item Note for the .pdf
  3. Add a figure in the Item Note (using the "select area" tool). You can also add highlighted text using the "Highlight text" tool.
  4. Sync the note to notion (in the library, right click on the new note > sync to notion)
  5. Go to your Notion database and open the page for the test entry. There should be a "toggle heading 1" item called Zotero note, with only your highlighted text in it (if you included some), not the figure.

Expected behavior The figure should also be exported to Notion as it is part of the zotero note

Additional context Zotero v.6.0.30 Notero 0.4.13

dvanoni commented 9 months ago

Thanks for reporting, @FelixLangot! This is indeed a current limitation.

The Notion API does not yet support uploading files, so the only way to support this is to upload the figures to a separate storage service. This is certainly possible, but it's probably beyond the immediate scope of the Notero plugin.

I'd like to keep this issue open in hopes that we'll be able to support this in the future.

FelixLangot commented 9 months ago

Glad I could help! I thought the limitation concerning file uploads was only for uploading .pdfs from Zotero to Notion. Maybe there could be a way to embed images in the Zotero note before exporting to Notion? I am far from a specialist so I wouldn't know how to do it though. Thanks anyway!

dvanoni commented 9 months ago

The Notion API treats all files and images the same way, so the same limitation for PDFs (and other file types) applies to images as well, unfortunately.

I did try a quick experiment to see if it was possible to add an image by encoding it as text (base64), but unfortunately the Notion API doesn't support this either.

For folks who use Zotero Sync, it does look like it syncs images extracted from notes to the Zotero servers. If I can find a way to get the URL of the synced images, it may be possible to use these to upload to Notion.

Polaris-F commented 1 month ago

https://github.com/flaribbit/zotero-link/tree/master. I've seen a project from other developers that converts content copied by Zotero into links that the software can jump from Notion to specific markup paragraphs or images from Zotero