bring a gmail message out of trash
bring back the email you meant to keep. tell the bot which gmail account, who sent it and roughly when.
it finds the message in trash and restores the match you choose. restoration needs write access and does not automatically pause. ask to see the subject and date first so a familiar title does not pick the wrong email.

what it does
you emptied a newsletter folder and took the flight confirmation with it. the bot can search trash and restore that message. give it the account, sender, date or subject so it can separate similar results.
restoring removes the email from trash. this action has no destination-folder choice, so you may still need to find where gmail put it.
permanently deleted mail is beyond this action’s reach.
when you would use it
- rescue a travel confirmation. get it back before checking the ticket number.
- undo a bad cleanup. restore the customer approval you still need.
- find proof of purchase. recover the warranty email before a repair visit.
try it
paste this into a chat with your bot
find the email from [email protected] i deleted last week, show me the subject and date, and restore it when i say yes. use my work gmail account. restore only that message. never empty trash or restore other mail.- when
- once, when you ask to recover the email
- needs
- gmail connected with read and write to restore messages
what comes back looks like this (an example)
1 match in work gmail trash
from: [email protected]
subject: your q3 return is ready to sign
date: 5 november 2026
restore this message?set it up
- name the account. label your gmail connection so the bot searches the right mailbox.
- find before restoring. read only can find the message; restoration needs read and write.
- choose the match. read its sender, subject and date, then say yes to that email.
- open gmail afterwards. confirm the message has left trash and find its new location.
what it needs from you
| input | required | what it is |
|---|---|---|
message_id | yes | Required. |
from composio's catalog for Gmail (action GMAIL_UNTRASH_MESSAGE, read 12 november 20264). your bot fills these in from what you tell it.
how dusk bot handles it
dusk bot counts Untrash Message 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.
where it stops
- permanently deleted mail cannot come back here. search trash before asking this action to restore it.
- work and personal trash are different places. name the account in the request.
try it in 2 minutes
- name the gmail account
- describe one trashed email
- ask to see its subject and date first
- restore that match and find it in gmail
mistakes people make
restoring every matching subject
compare sender and date too. similar subjects can hide different messages.
expecting a chosen folder
restore first, then ask separately if you need the email moved.
questions
does restore always put the message in my inbox?
no destination choice comes with this action. it removes the email from trash. look for it in gmail afterwards.
can it recover every message from a conversation at once?
this action restores one message. the untrash thread action restores the whole conversation. ask for the list first either way.
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].
clear one gmail message without deleting it forever
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