Copying 2FA codes from email?

Hi MPUers, any way to automate copying 2FA code from email? It’s a pain to open email and copy the code. 2FA send via text messages is so easy with macOS/iOS.

I’m using gmail app on iOS (and website on macOS) right now but open to using mail if it makes it easier.

Watching this. Please tag me for solutions. I want this too!!!

I use the mail app with gmail account and is still a pain because gmail does not push the emails like other providers. I am slowly moving to just use my iCloud account since it works same as messages, most of the time. However, I have created an alias to not share my “real” iCloud email and that way protect that no one will be able to login to my main account. Sorry, just a ramble basically.