Seems like this is kind of a duplicate.
Here is the other question: Is there a way to archive an email in Gmail once it has been read?
I'll leave this one here as the wording of others could be the same as mine.
I have been using a well written script for this that was designed to forward email to an Evernote account but works well for other use cases. The script utilizes a Google Sheet to make the appropriate settings and then checks a Gmail label every 5 minutes using a trigger, forwards the emails it finds, and then moves them to the archive or whatever other ...
I assume you create labels using a filter like "to:email@example.com". Your problem are presumably emails that are sent to both of your email addresses.
In order to avoid an email being labelled by both you can simple create a new filter set A', B' using a negation operator on one of the two:
So now messages that have ...
Example gmail XML code:
Here is my example of what you can import that is a compilation of what i have exported from my own gmail and examples pulled from @marikamitsos 's example of "Gmail Operators"
Note: I took out the, <id>, <updated>, <author>, <content>, <sizeOperator> and <sizeUnit> sections, as they are auto ...