This will filter your mail and archive it. This can filter by email. Create a new project in Google App Script https://script.google.com/home. Create a main script and copy the code from main. Paste the code in emailFilterLabelArchive script from emailFilterLabelArchive