Setting up gmail in Nextcloud 21.0.1

Im having issues seting up my gmail account in Nextcloud 21.0.1

The error is unexpected error during account creation

Im pretty surprised there is nothing in the logs

While writing this I found this page and this has worked for me

https://support.google.com/mail/answer/7126229?hl=en

Hi, here you can find some docs on how to troubleshoot the mail app: mail/admin.md at master ¡ nextcloud/mail ¡ GitHub
You can use this to debug your connection attempts.