In the official documentation there is a email import condition listed. I’ve tried searching to see if this is a feature being worked on or not or if someone had a working solution and wouldn’t mind doing pull request! This is a feature I’m looking for and if I don’t have to reinvent the wheel it would be nice!
https://erpnext.org/docs/user/manual/en/setting-up/email/email-account