Well... I don't know about google sheets, but you can do this from a programming standpoint. (I am sure you can do this from google sheets, but this is a suggestion).
Im not sure where your programming skill level is, but it is possible to "check" emails with php programming. You can have it look for specific codes that you keep in a mysql table, and iff it locates a code in the email, modify the mysql table. After all, an google spreadsheet is basically like a mysql table.
Its a bit elaborate for your specific use, but if your looking to automate a process like that, programming is the way.