Using both Gmail and Gmail Contacts will create two entries starting with "oauth://" in KeePass, which prevents auto-detection.
I use two entries. I solved that conflict by not using '@gmail.com' on the username of Calendar. On Mail I have my full email as username, while on Calendar I have just the first part and configured Calendar application accordingly. There are two oauths, but they have different usernames, so it works :)
Note: edited to correct the app to Calendar.
Thanks, but the Gmail calendar can't be used anymore. I still hope it can be distinguished at the program level, such as adding a category in the additional attributes for differentiation.
That would be great!
I just tested it and you should be able to use only one entry for both. For testing you can simply hide one of the entries from the browser integration in KeePassXC and the auto-detection should work.