claude code for email: clean up one slice first
find that old contract without spending lunch in gmail search. a claude code bot in dusk can read one sender's mail and propose labels.12 start read only, open the full threads and choose what belongs together.
then allow the label changes you want. leave deletion out; ongoing inbox triage is a separate job.

pick a cleanup you can finish over coffee
pick the sender whose mail you keep hunting for. add a date range and decide what you are collecting.
- old reference mail
- threads from a finished project
- newsletters you no longer read
ask for candidate threads and a reason for each. leave deletion out. unclear mail should stay uncertain. use email triage for ongoing sorting and reply drafts.
give the bot reading access
get the first shortlist while your mail stays untouched. choose claude code for a dusk bot. connect gmail under connected apps and allow that bot to read only.13
you sign in on google's page. composio holds the connection; dusk stores no gmail sign-in credentials.1
label separate inboxes and name the one you mean. dusk supports up to five usable accounts per app. an empty search might mean the wrong mailbox.1
your claude sign-in runs on anthropic's terms, not ours. read them (checked 12 november 2026) before you put it on a schedule.6
read the conversation before choosing the label
an old subject can hide a reply you still owe. have the bot fetch the whole thread before proposing a label.2
ask for the sender, the reason it matches your date range and the proposed label. open the messages before saying yes.
the gmail guide lists the search actions. keep the candidate list short enough to read in full.
allow one visible change
file the messages you chose under the label you agreed. allow only the actions the job needs.12
modify email labels happens to count as a send in dusk, so it waits for Allow. the thread and batch versions don't wait. leave those two out. a daily sending amount also permits changes without asking.24
for this step, allow modify email labels and create label. leave deletion and outgoing email out. the thread action is modify thread labels; the batch action is batch modify gmail messages.
find the contract under its new label
open the new label and find the mail you meant to keep. ask what changed and what the bot could not finish. compare the report with gmail, including messages outside your chosen sender and date range.
if the grouping is wrong, fix the criteria before widening the job. keep bulk deletion out.
careful with Full access: a bot there with no sending rule can send up to 25 a day without asking. give it Ask every time.14
know when a label job becomes an account-settings job
labels get you organised; filters need extra permissions. so do vacation replies, imap, pop, forwarding, send-as and delegates. the standard gmail connection cannot use those settings.1
your own composio project can add them. on dusk cloud, ask support. the bot should tell you about the limit rather than retrying.
a label won't change gmail settings or explain why you kept a message. tell the bot that context. for microsoft mail, start with outlook's actions.
finish once before making it repeat
finish the backlog, then stop. a cleanup is usually a one-off. schedule a separate review only if new work keeps arriving. name the source, time, result and quiet rule.5
local dusk routines need an awake computer and open app. dusk cloud keeps them running.
if choosing the bot is unfamiliar, start with the non-developer guide. the win is finding that contract in five seconds next month.
try it in 2 minutes
- connect gmail to the bot with read only
- choose one sender and date range
- ask for five candidate threads and reasons
- open those threads before permitting labels
before allowing the label pass
- the account, sender and dates match your request
- you read the full candidate conversations
- only single-message label changes and label creation are allowed
- sending is on ask every time; deletion stays outside the job
mistakes people make
judging a thread by its old subject
read the conversation before calling it finished.
giving every gmail action to a label helper
allow only the specific label actions you reviewed.
questions
can i use claude code to clean up my gmail inbox?
yes, connect gmail and start with one sender. use read only for the shortlist. open the full threads, then choose the label changes to allow.123
will it ask before changing labels?
the action matters. single-message label changes follow sending approval. thread and batch label changes do not. leave those out of the allowed list.24
can it set up filters instead?
filters need extra google permissions. the catalog includes a filter action, but the standard connection cannot use it.12
sources
- dusk bot docs: files and apps
- composio: gmail actions, checked 12 november 2026
- dusk bot docs: ai setup
- dusk bot docs: approval settings
- dusk bot docs: routines
- anthropic: legal and compliance, checked 12 november 2026
drafted with ai help from the dusk bot docs and the sources listed on this page, then checked against them. if something here is wrong or out of date, write to hello@dusk.bot.
a gmail assistant that sorts, drafts and briefs you
ai email triage: let a bot sort your inbox and draft the replies
an outlook bot for the mail around your meetings
claude code for non-developers: start with one folder
draft gmail replies with ai, then send them yourself
apply one gmail filing decision to a batch of messages