I have Gmail filters set up to label and categories incoming mail. How do I automatically archive my mail when it reaches a predefined age, with different ages defined for each label and category? For example, I want mail labelled "Personal" archive after one day, and mail categorized as "Updates" after five days.
Gmail does not have this functionality built in, but it can be achieved using a Google script. Here is a list of such solutions:
GMail Archive old messages by label and category by Warwick Allen. This script reads the configuration values from a Google sheet.
Add the Auto-Sweep Feature of Outlook to Gmail by Amit Agarwal.
How to configure Gmail to automatically delete some emails after certain number of days? by IR. This solution was provided as an answer to the Web Applications question Automated solution to delete certain Gmail messages older than n days