A personal Gmail example labels selected notifications and uses a daily Apps Script trigger to move older conversations to the trash. The author excludes starred conversations, limits each run to 100, and inspects the target list with DRY_RUN before moving anything. This addresses ordinary incoming-mail filters’ inability to continually reevaluate messages as they age. However, actions apply to entire conversations, Gmail permissions are broad, and transaction notifications can be valuable records. Authentication codes and financial records should not automatically receive the same retention period.
Back to Tech
Using Gmail labels and Apps Script to clear older notifications
Validate automation with a narrow label scope and dry runs, and exclude transaction records worth retaining.