dusk bot
integrationsrestore trashed message

dusk botintegrationsgmail

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.

by the dusk bot team · checked · how we made this

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.

pixel art: a pink pixel bot, a cyan pixel bot and a mint pixel bot beside the Gmail mark on a white tile, a mailbox with a letter and a magnifying glass, on a lemon field in front of sand dunes by the sea, one saying "bring this email back"

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

  1. name the account. label your gmail connection so the bot searches the right mailbox.
  2. find before restoring. read only can find the message; restoration needs read and write.
  3. choose the match. read its sender, subject and date, then say yes to that email.
  4. open gmail afterwards. confirm the message has left trash and find its new location.

what it needs from you

inputrequiredwhat it is
message_idyesRequired.

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

  1. name the gmail account
  2. describe one trashed email
  3. ask to see its subject and date first
  4. 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

  1. dusk bot docs: files and apps
  2. dusk bot docs: routines
  3. dusk bot docs: a bot's computer
  4. composio, Gmail toolkit (catalog version 20261105_00), 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 [email protected].