monicahq / monica

Personal CRM. Remember everything about your friends, family and business relationships.
https://beta.monicahq.com
GNU Affero General Public License v3.0
21.62k stars 2.16k forks source link

Owncloud/Nextcloud integration/synchronization for CardDav/CalDav #1444

Open privong opened 6 years ago

privong commented 6 years ago

I was reading in the README that two of the longer-term aims for the project are:

I think think exposing this type of information would be a great addition.

I did want to ask if there had been consideration of adding some sort of integration with owncloud or nextcloud. There's clearly some overlapping functionality in both, but neither Monica nor own/nextCloud fully duplicate the other. I could envision a scenario in which I manage a persona/work calendar from own/nextCloud and also get a calendar of birthdays and anniversaries from Monica. It would be nice if there were some way to integrate/synchronize contacts between the two.

I don't have a really concrete idea for how this could be done or what a balance would be, but I wanted to float the idea to see if this was something that might be possible as cardDav and calDav implementation was explored (cc #42).

finitenamespace commented 5 years ago

Just chiming in to throw some weight behind this idea too. I keep all my contacts and calendar entries synced to Nextcloud and Outlook via cardDav & calDav. Trying desperately to find a good friendship-focused CRM that ties into that.

altima commented 5 years ago

👍 I would also like to have this. :) maybe I can start with a PoC when I have spare time.

asbiin commented 5 years ago

I use nextcloud too. Each Monica or a nextcloud instance is a server of contacts (with some different features). If you want to synchronize each one, were do you want to do it ? Maybe consider a third client that do it, like SOGo Connector or DAVdroid client ?

privong commented 5 years ago

I currently sync my contacts between nextCloud and my laptop (phone) with vdirsyncer (whatever iOS uses). I guess I could set up another vdirsyncer cron job to synchronize to a Monica instance. But that would rely on my laptop being on to keep them all synchronized. Normally that's not an issue, but if I'm traveling and updating things it might be nice to have Monica be able to sync with nextcloud directly. I'm not sure if it would be something that would be better as a Primary/Secondary arrangement or with some sort of conflict resolution model?

asbiin commented 5 years ago

I really like Nextcloud and I would like very much to work with an integration. But one thing is we rely on standard, here it's Carddav. I don't want to create a dependance with Nextcloud, out of the standard (today it's Nextcloud, tomorrow it will be Gmail contact, then icloud... No.). I prefer to be able to connect Monica's contact and Nextcloud's contacts with a carddav service, based on standards.

Unless someone have a better idea that will blow our mind? 😉

finitenamespace commented 5 years ago

Nextcloud supports Carddav. It's how I'm currently syncing contacts between my Android phone, Nextcloud server, and Outlook client on my desktop. Also my Calendar with Calddav.

privong commented 5 years ago

@asbiin Yeah, as @finitenamespace said, nextcloud does support Card/caldav. In my message I just meant that it would be nice to directly sync Monica <-> Nextcloud (via Card/caldav) rather than having to do Monica <-> laptop <-> Nextcloud. Sorry I wasn't clear about that in my comment.

keunes commented 5 years ago

I'm currently using Nextcloud, and find Monica an interesting piece of software. Would it be possible to point Monica to Nextcloud's so that it takes what's there and add to it (or vice versa), so that basically there's only one 'database' rather than two that are being synced?

daniele-athome commented 5 years ago

I'm currently using Nextcloud, and find Monica an interesting piece of software. Would it be possible to point Monica to Nextcloud's so that it takes what's there and add to it (or vice versa), so that basically there's only one 'database' rather than two that are being synced?

I doubt that. Monica can store so much more information that a simple DAV server can. You could go out of standard by putting custom fields in Cards and Cals, but that wouldn't be good for interoperability because NextCloud also serves mobile clients, desktop clients, etc.

privong commented 5 years ago

@daniele-athome I don't think the idea (at least in my original feature request) was to sync all the monica information into nextcloud. What I'm interested in is:

I don't really think trying to add all the Monica-based information into a DAV contact is a good idea, for the reasons you mention. But I'd like to avoid having to add a new contact twice; once to nextxloud and once to Monica.

keunes commented 5 years ago

Apart from that basic synchronisation of new users via *DAV, what would be really great IMHO, is if in Nextcloud I'd be able to pull up information from Monica. In a way, Monica could be an app within Nextcloud, just like Spreed.me or Collabora.

Dreaming of potential integration, the following would be possible in an ideal world

I guess these more advanced integration features would need the API. Actually, they might be a bit outside of the scope of this ticket - let me know if I should create another ticket.

CorneliousJD commented 4 years ago

Any headway on this? I love Monica and would use it more if I could have Nextcloud be my primary source of adding/editing contact info such as name, photo, email, phone number, birthday, but then all the fun details and CRM features being managed via Monica itself still.

keunes commented 4 years ago

Nextcloud just had their conference this weekend, where they announced integrations.

Imagine a widget on the new Dashboard with upcoming important events & reminders. That'd be quite cool & powerful. Screenshot_20201006-080849.png

MadsMighty commented 4 years ago

This is incredibly important for me as well, Nextcloud is the repository for all of my contacts and maintaining two separate sets of contacts to work with Monica is a much bigger roadblock then I anticipated.

finitenamespace commented 3 years ago

Still watching this space two years on, third year's the charm! Godspeed team 🙌

davralin commented 3 years ago

Still watching this space two years on, third year's the charm! Godspeed team raised_hands

I just stumbled upon this, as I was looking for how to integrate nextcloud and monica better - and you should probably check out this: https://github.com/monicahq/monica/pull/3851

Looks like something is coming along just perfectly in the next release :+1:

asbiin commented 3 years ago

@davralin well, not yet in the next release, I still have to test it, increase the reliability of the system, and there is much UI to do, but it will be here soon!

natrius commented 2 years ago

If i understand https://github.com/monicahq/monica/issues/5654 this correct, its now possible to point Monica to Nextcloud Contacts CardDAV URL and in that way its possible to use Nextcloud for general contact-stuff and monica for in depth contact-managing without having to maintain two seprate databases?

If thats the case, @privong this might be solved? I mean, there is no extra app within Nextcloud yet, but the basic sync is there already?

meichthys commented 2 years ago

@natrius AFAIK, there are no plans for a Nextcloud app, but a one way sync from Nextcloud to Monica should be possible (although I haven't seen anyone successfully implement it since it's not in the GUI yet). I'm also not sure if there are plans to make the sync two-way, which would be awesome.

privong commented 2 years ago

@natrius I had missed that merged feature, and I haven't tried synchronizing monica to nextcloud via carddav. I will give it a try and report back. It might take me a bit to get to though.

For what it's worth, I probably didn't word my initial feature suggestion well enough. I wasn't seeking a nextcloud/owncloud app, but only wanted to be able to use carddav to keep my monica instance updated with the contacts in my nextcloud instance, so that I didn't have to add contacts manually to both sets of software. I think what @keunes suggested a couple years ago would be interesting to have, but is probably outside the scope of what I was thinking with this feature request.

meichthys commented 2 years ago

@privong Did you have any success getting things synchronized between monica and nextcloud? There's more work that needs to be done to make it work with the GUI (https://github.com/monicahq/monica/issues/5675), but perhaps the back-end sync is working?.

privong commented 2 years ago

I haven't been able to carve out time to test this. Unfortunately that will probably not change any time soon (party due to other demands on my time, partly because I stopped using monica late last year and so would need to install from scratch).

meichthys commented 2 years ago

partly because I stopped using monica late last year

Is there a reason why you stopped using Monica? And did you find a suitable alternative?

privong commented 2 years ago

I stopped using it due to the accumulation of several small, recurring headaches. I've tried to describe these below. But they probably have more to do with my not using docker and not devoting the time to figure out the various dependencies, than they do with Monica itself. Though I do have an unscientific feeling that the Monica dependencies are more numerous than I'm comfortable with.

With regard to an alternative, I didn't substitute anything for Monica. Even before Monica, I had been using Nextcloud contacts for event notifications (birthdays, anniversaries, etc.), so I've continued that. Without Monica, I'm no longer recording trivia about people or the data on phone calls / recent activities with people.

Despite the above, I do think that Monica solves problems in a useful, and I like the effort of the project. I just prefer self-hosted things for this kind of data, and the effort eventually wasn't justified, given the limited use I was making of Monica.

I'm happy to try and elaborate on this or answer other questions if it'd be helpful.

meichthys commented 2 years ago

Thanks for your thorough reply. I think like you mentioned, most of those issues can be resolved using a doctor compose set up. That would allow a simple one line command to update the Docker image but retain the Monica data. I have no issues with the Docker compose updates, but I have not used Monica significantly yet since it requires a separate contact address book separate from nextcloud where I also keep my primary address book. In my view I like to keep as much data as possible in Nextcloud and have other services reach in and grab that data if needed. It's just a preference of mine that often gets in the way when other services do not support nextcloud integration's, but I find it a worthwhile trade off when I can keep my data in a single data repository like Nextcloud.

I will definitely start using Monica much more once the nextcloud integration is finished👍

meichthys commented 2 years ago

To follow up on this, it looks like the subscription to remote CalDav resources does work via the cli now using: php artisan monica:newaddressbooksubscription --email monica_user_email@example.com

The subscription is successful but the subscribed address book contacts don't show up in the web interface. I believe the front-end hasn't yet been updated to support the calDav client contacts.

@asbiin Can you confirm this is the case? If so, @privong we will need to wait for #5520, #5521, #5522, #5523 to be completed before this issue can be closed.