It’s easy to open Gmail and find 100 unread messages when only a handful need your attention. There are newsletters you rarely open, notifications that people accepted a meeting, cold pitches asking you to try a tool, and unsolicited emails about a job your company posted. Every time you sit down to clear them out, you spend time sorting through the same kinds of messages before you get to the customer who’s waiting for an answer.
You can set up Gmail filters, but they take work to maintain. The next pitch comes from a new sender or uses wording your filters miss. An AI agent like Claude can read the message and apply your criteria even when you’ve never heard from that sender before.
In this guide, you’ll connect Gmail to Claude Cowork through Nango, describe what you want archived in plain text, and preview the matches. Once you’re happy with what Claude picks, you’ll schedule it to clean up your inbox every hour.
To follow along, you’ll need Gmail, a Nango account, and access to Claude or ChatGPT for scheduled tasks that can use the Nango connector.
Step 1. Connect Gmail to Nango
- Sign in to Nango.
- Open Catalog and search for Gmail. Select the Gmail entry with the lightning icon, then click Add integration.
- Click Add test connection, select Gmail, and click Connect.

In the Link Gmail Account window, click Connect. Choose the Google account you want to clean up, then click Finish when Nango confirms the connection.

Step 2. Add the Nango connector to Claude
Open the Nango connector in Claude and select Connect to Claude. Sign in with the Nango account you used for Gmail and select Approve access. Back in Claude, the connector should show Connected.

Step 3. Ask Claude Cowork to schedule your inbox cleanup
Open Claude Cowork and start a conversation. Replace the email address below with yours and tell Claude which kinds of mail you tend to clear out.
Help me set up an hourly task to clean up my Gmail inbox using Nango. I’ve connected me@example.com to Nango. Look through my inbox and suggest what I could archive. I’m thinking of newsletters I rarely read, unsolicited PR and sales pitches, and routine meeting acceptances. What other kinds of clutter do you see? Give me a few examples from my inbox so we can decide what to keep. Leave everything in place while we work out the rules.

In this example, Cowork suggests categories such as vendor marketing and tool notifications and asks which ones to archive.
Refine the criteria in the same chat. For example, “Keep newsletters I’ve starred and any meeting reply where someone added a note. Also keep conversations I’ve replied to.” Once the suggestions look right, ask Claude to create the task.
Create a scheduled task called “Gmail inbox cleanup.” Every hour, use Nango to archive messages in my Gmail inbox that match the rules we agreed on. Leave anything uncertain in my inbox, and include a short summary of what you archived after each run.
Check the rules and schedule Claude proposes, then click Schedule if prompted. Open Scheduled → Gmail inbox cleanup and check that the task is Active and repeats Hourly.

After the task runs, open History and select the latest run to see what Claude archived. To fine-tune future runs, continue the chat from that run. For example, “Please update the scheduled task to keep PR pitches that mention our company by name.” Open the task’s instructions to check that the change was saved.

If your ChatGPT Business or Enterprise workspace has agents enabled, you can connect Nango to ChatGPT and schedule a workspace agent using the same Gmail connection.
Related reading