Simple housekeeping script for gmail
Based on this post -> https://web.archive.org/web/20160907161732/http://www.johneday.com/422/time-based-gmail-filters-with-google-apps-script
Usage:
Create a trigger to run Housekeep() to suit your needs
Add a deleteFrom call for each label you wish to housekeep:
deletefrom( Label, days_to_keep )