Google Inbox is shutting down, and Gmail doesn’t sort your emails by the date the way Inbox did. Happily, you can re-create the feature yourself with a little bit of hackery.

Blogger Jeff Atwood was complaining on Twitter about potentially missing Inbox’s automatic date grouping, which doesn’t exist in Gmail. Jerome Leclanche pointed out that you can make something similar in Gmail.

This is a great trick that solves the issue entirely using Gmail’s multiple inboxes feature. It’s a little confusing to set up, though, so let’s dive in.

Step One: Switch to Gmail’s Default Inbox, With Tabs Disabled

Gmail’s Multiple Inboxes feature will not show up if your Inbox isn’t configured correctly, so let’s change that first. Open your Gmail settings.

Head to the Inbox tab and select “Default” as the Inbox. Next, disable all categories except for “Primary.” Like this:

Click “Save Changes” when you’re done, and Gmail will reload.

Step Two: Enable Multiple Inboxes

Next, we’ll enable the Multiple Inboxes feature. Head to the “Advanced” tab and ensure that “Multiple Inboxes” is enabled.

Click “Save Changes” when you’re done, and Gmail will reload…again. Only one more time, I swear.

Step Three: Create Your Inboxes

Once Gmail reloads, you should see a new “Multiple Inboxes” tab on the Settings page. Click that, and you can set up your inboxes sorted by date.

We’ll create four inboxes: one for today, another for Yesterday, a third for Last Week, and a fourth for “Older.” The search queries for this are as follows:

newer_than:1d

older_than:1d newer_than:2d

older_than:2d newwer_than:7d

older_than:7d

I wanted only to see emails currently in my inbox, so I added label:inboxto every query. Here’s a list of supported search operators, if you’d like to customize things further.

Decide how many emails you’d like to see per inbox, and where the inboxes should show up. Click “Save Changes,” and you should see your new inbox. Here’s how mine looks:

Not bad, right? These inboxes take a few seconds to fill in after you load Gmail, but aside from that, it works pretty much as the feature did in Google Inbox. It also nicely replicates the way Outlook sorts things by default.

And you don’t have to use this feature just to sort by date! You can create custom inboxes for just about anything.

— Jerome Leclanche (@Adys) September 13, 2018