Auto-copy SMS verification codes from messages app

Would it be possible to program something in bettertouchtool so that when a message is received in the native messages app that contains the words "verification, code, pin", it will automatically copy that code to clipboard? I know safari on mac gives the option to autofill codes, but its not as efficient in chrome.

I don't think this is possible as everything iMessage related is encrypted and can't easily be accessed by third parts apps. The autofill only works because it is deeply integrated in the system.