Gmail: How to Mark All Unread Emails as Read and Automate the Process

If you’re overwhelmed by unread emails in your Gmail inbox and want to mark them as “read”—either all at once or automatically after a set period—this guide will walk you through both processes.

Part 1: Marking All Unread Emails as Read in Gmail
• Log in to Gmail.
• In the search bar, type is:unread and press Enter. This will display all unread emails.
• Click the checkbox at the top left corner of the email list to select all emails on the current page.
• A message will appear saying, “All 50 conversations on this page are selected.” Click on “Select all conversations that match this search” to select all unread emails.
• Click the three-dot menu (More) at the top and choose “Mark as read”.

Part 2: Setting Up an Automated Script to Mark Emails as Read After a Set Period
For those looking for an automated way to mark emails as read after a certain number of days, you can use Google Apps Script with the following steps:
Step 1: Open Google Sheets
• Go to Google Sheets and create a new blank spreadsheet.
Step 2: Open the Script Editor
• Click on Extensions > Apps Script.
Step 3: Add the Script
• Copy and paste the script below into the code editor:
You can change 'older_than:7d' to any time frame you prefer (e.g., 'older_than:2d' for 2 days).

Step 4: Save and Run the Script
• Save the script by selecting File > Save and giving it a name.
• Click the Run button (▶️) to execute the script for the first time.
• Authorize the script when prompted by following the permission steps.

Step 5: Set Up a Trigger for Automation
• In the Apps Script editor, click on Triggers (the clock icon).
• Select Add Trigger.
• Choose the markEmailsAsRead function, set the deployment to Head, and select Time-driven as the event source.
• Set how frequently the function should run (e.g., daily).

Customizing Your Script
Adjust the Time Frame: Modify "older_than:7d” in the script to fit your needs (e.g., "older_than:14d” for 14 days).
Run Frequency: Choose between daily, weekly, or another preferred interval when setting up the trigger.

Final Thoughts
With these steps, you can regain control over your Gmail inbox by marking all emails as read at once and setting an automated process to ensure future emails are marked as read after a specific period. This simple automation can help reduce email clutter and keep your inbox more manageable.

Scroll to Top