Google is sunsetting access via “less secure” apps at May 30 2022. https://support.google.com/accounts/answer/6010255
After that day, it will no longer be possible to get emails from a gmail account using the IMAP integration. Please let us still get emails in June 2022.
Did you find a work around?
Yes, I use app passwords now. With these, the IMAP integration still works: https://support.google.com/accounts/answer/185833?hl=en