clear one gmail message without deleting it forever
clear the old shipping notice and keep the booking you still need. a bot can move a gmail message to trash while leaving the rest of its conversation alone.
you can recover it until trash empties. it still uses storage until then. trash moves don't use sending approval, so put 'ask me before moving anything' in the request.

move to trash, in plain words
trash one email without wiping the conversation. the bot searches for the message and checks its subject and first lines. other replies stay where they are.
trash keeps a recovery path until it empties. it doesn't free storage on its own. for a large clear-out, ask about a bulk action rather than repeating this one.
a routine to copy
paste this into a chat with your bot
every saturday at 10, find this week's 'your order has shipped' emails from mossgate outfitters. show each date and subject here. ask me before moving anything to trash. move only the emails i approve, then list what moved. never empty trash or touch other mail.- when
- saturdays at 10:00
- needs
- gmail connected with read and write access for message moves
what comes back looks like this (an example)
mossgate outfitters: 2 shipping emails this week
- thursday: your order has shipped
- friday: your order has shipped
move both to trash? the other replies will stay put.good jobs for it
- drop the old delivery notice. keep the replacement that has the right date.
- remove a duplicate booking email. leave the amended confirmation alone.
- clear a shipping notice. keep the replies around it.
before it runs
dusk bot counts Move to Trash as a change: it alters something in Gmail, and the sending setting does not cover it. a bot you allow only to read can never call it.
the permissions Gmail asks for to run it: https://mail.google.com/, gmail.modify.
how to start
- connect the gmail account in connected apps with read and write access.
- start with a search preview showing the sender, subject and first lines.
- add 'ask me before moving anything to trash' to the routine.
- pause the routine if its matches drift. fix the search before another run.
limits worth knowing
- trash still uses storage. space only clears when trash empties.
- one email moves. the rest of its conversation stays put.
- put the pause in the request. say when the bot should show its matches and ask you to choose.
the details it works from
| input | required | what it is |
|---|---|---|
message_id | yes | Required. |
from composio's catalog for Gmail (action GMAIL_MOVE_TO_TRASH, read 12 november 20264). your bot fills these in from what you tell it.
try it in 2 minutes
- pick a harmless old email
- ask the bot to find it without changing anything
- match the sender and subject to the email you meant
- approve that message only, then look in trash
before the move
- the connected inbox is right
- the sender and first lines match
- you approved individual messages
- the request forbids emptying trash
mistakes people make
trashing mail to free space immediately
it still counts toward storage. don't confuse moving with permanent removal.
matching only a common subject
add the sender and date range. read the preview before saying yes.
questions
can i get the email back after the bot trashes it?
yes, until trash empties. ask the bot to restore it, or move it back from gmail's trash yourself.
will this erase all replies with the same subject?
no. it targets one email. ask to see every selected message. matching subjects don't mean you approved a whole conversation.
sources
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 [email protected].
bring a gmail message out of trash
a gmail assistant that sorts, drafts and briefs you
claude code for email: clean up one slice first
apply one gmail filing decision to a batch of messages
draft gmail replies with ai, then send them yourself
permanently delete one gmail conversation with ai