dvanoni / notero

A Zotero plugin for syncing items and notes into Notion
https://download.notero.vanoni.dev
MIT License
2.29k stars 99 forks source link

[Feature Request] Support multiple Notion Databases #119

Open d-walsh opened 2 years ago

d-walsh commented 2 years ago

Is your feature request related to a problem? Please describe. I have different Zotero Collections (on different topics) and I want them to be synced to different Notion Databases (I have different information in each database). Currently Notero only allow you to sync multiple collections to a single database.

Describe the solution you'd like For each Notion Database I would like to select specific Zotero Collections that should be synced.

Describe alternatives you've considered Installing different instances of Zotero with Notero configured differently on each..

Additional context Add any other context or screenshots about the feature request here.

dvanoni commented 2 years ago

Hi @d-walsh, thanks for the feedback!

This was discussed previously in https://github.com/dvanoni/notero/issues/6#issuecomment-1012813567. The decision was made at the time to sync to a single database instead of multiple for a few reasons:

To achieve an equivalent to syncing different collections to different databases, we proposed #30. The idea with that solution is that you'd still have a single Notion database, but you could create views of that database filtered to whichever collection(s) you want.

Would #30 and filtered database views provide an adequate solution for you?

d-walsh commented 2 years ago

Hi @dvanoni thanks for explaining that!

Would https://github.com/dvanoni/notero/issues/30 and filtered database views provide an adequate solution for you?

Ideally I would have each collection Synced to a different database - because each collection for me is a completely different subject and I heavily customize each Notion Database. However it's not urgent and in the interm I think the solution proposed would be an improvement.

zmek commented 1 year ago

@dvavoni thanks for the brilliant work on Notero. I would also like to have the feature requested by @d-walsh - ie have multiple Notion databases each synced to different Zotero collections. However as you say the proposed interim solution should provide the same functionality

KB22222 commented 1 year ago

Thank you for creating this! I agree with those who commented above, an option to create a separate database would be ideal. However, if that's not possible, the ability to input the Zotero folder name into notion would be great, so that I could at least sort by project in Notion.

dvanoni commented 1 year ago

@KB22222, you should be able to achieve this if you add a multi-select property named Collections to your Notion database. Let me know if that works for you!

zmek commented 1 year ago

@dvanoni Awesome. That works for me. Thanks.

KB22222 commented 1 year ago

Thank you for the reply! Does this populate automatically with each reference added or does it need to be added manually? (If automatic, how do you set this up? I have only been able to do it manually) Thank you for the help!

dvanoni commented 1 year ago

@KB22222, once you've added the Collections property into your Notion database, it should populate automatically whenever you add a new reference into one of your monitored Zotero collections. If you also want to populate the property for existing items that were previously synced into your database, you can use the "Sync to Notion" context menu item that's available in Zotero by right-clicking on either a collection or item(s) in the main Zotero window.

Let me know if that works!

KB22222 commented 1 year ago

Thank you so much, that was very helpful!

alvorithm commented 1 year ago

Hi @dvanoni -- I think I can make a case for the ability to sync to multiple notion databases, in the way you implemented in #32 .

The key idea is permissions, and it has presumably not been mentioned by commenters AFAICT because they might be running single-user Notion instances. But consider the following two scenarios:

Until and unless Notion supports row-level permissioning*, the only way so far as I know to deal with this is to split databases according to access control lists (ACLs).

This by itself is a quite important scenario, besides the diverging schemas (i.e. different sets of augmentation columns) that were mentioned by the first poster.

I hope you can reconsider this feature, it'd be very valuable for people collaborating for their research (which is nearly everybody in Academia.

sohaamir commented 11 months ago

I seem to have an issue where my Zotero Collections are synced up to my Notion database and are integrated just fine, however Collections (a multi-select property) doesn't populate within my database. Not sure if I am the only one with this problem?

dvanoni commented 11 months ago

Hi @sohaamir, would you be able to share a screenshot of the configuration for your Collections property in Notion? I'm wondering if there's something slightly off that's causing Notero to not sync properly.

sohaamir commented 11 months ago

Hi @dvanoni, thanks for the quick response! I have attached two screenshots, one is of the general structure of my Notion database, the other is of the Collections property. I feel that the cause is something basic and in plain sight (as it usually is!).

Screenshot 2023-10-18 at 09 11 43 Screenshot 2023-10-18 at 09 12 33
dvanoni commented 11 months ago

@sohaamir, you're right! 😄 It's just a small typo. The property name needs to be plural. It should be Collections instead of Collection.

I'm hoping to make this more dynamic in the future so that the database properties can be named however you prefer, and you can specify mappings between Zotero fields and Notion properties.

sohaamir commented 11 months ago

Duh! Not sure how I didn't see that! Thanks for the help and for developing the tool 😄

mdecroly commented 11 months ago

Would #30 and filtered database views provide an adequate solution for you?

Hi @dvanoni, thank you for this solution which is very useful. However, I still have some issues having two separate database. For context, I would like to have two different database : one for papers related to my thesis and another one for papers related to my intership work. I tried to copy my original database (used for my thesis) that is already linked to zotero in an other page, and filtered the view to have only the collections I wanted. However, even though I copied the original database, it has a different ID, and thus new papers in Zotero are not synced with the copy of the original database. Also, if I use a synced block, I cannot have different filters in each page, since it automatically changes my filter for both databases. Would you have any solutions to have two dabatases which can be both synced with zotero?

dvanoni commented 11 months ago

Hi @mdecroly, instead of duplicating the database, it sounds like you want to use a linked database.

I created a short video below to show how you can use this. I start with my original database, and then I go to a page where I want to add a linked database as a child of that page. I create a new page and start with the "table" option. Then, I select my original database as the source for this new page (i.e. the linked database) and add the filter I want to use for the linked database. The filters on the linked database should stay separate from the filters on your original database.

Let me know if this helps!

https://github.com/dvanoni/notero/assets/299357/1e3cd6f7-9956-4435-9cd0-1f08f8fe7b84

mdecroly commented 11 months ago

Thank you very much, this helps a lot @dvanoni !

qiutiantxwd commented 10 months ago

@KB22222, you should be able to achieve this if you add a multi-select property named Collections to your Notion database. Let me know if that works for you!

This is a really powerful trick