-
Creat google developer profile https://developers.google.com/profile/u/me/dashboard
-
Enable advanced google services https://developers.google.com/apps-script/guides/services/advanced
-
Enable advanced services https://developers.google.com/apps-script/guides/services/advanced#enable_advanced_services
3.1. Create a apps script project https://developers.google.com/apps-script
3.2. Goto app script project and create script https://script.google.com/home
3.3 Add your code API reference: https://developers.google.com/apps-script/reference/gmail/gmail-app#movethreadtoarchivethread https://support.google.com/mail/answer/7190?hl=en
3.4 Create a trigger which executes according your time
Reference link: https://www.jessespevack.com/2018-09-06-how-to-create-a-gmail-filter-with-google-apps-script/