dusk bot
integrationsfetch emails

dusk botintegrationsgmail

find gmail messages from a half-remembered detail

find the booking email before you ask someone to resend it. give the bot a sender, date, subject fragment or label.

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

it brings matching gmail messages into chat without marking them read or moving them. ask for the full message when you need a reference number, and for any results that failed to load. a quick subject list is only the start.

pixel art: an orange pixel bot and a cyan pixel bot beside the Gmail mark on a white tile, a magnifying glass and a mailbox with a letter, on a grassy meadow in front of a calm sea with one small island, one saying "found the booking email"

what it does

start with the clue you still have. “the hotel confirmation before the conference” gives the bot somewhere to look. it returns subjects, senders and dates you can recognise.

labels narrow the search. ask for two labels and the email must have both.

a quick search gives basic details. for a booking reference or promise, ask it to open the full email. the subject alone cannot answer that.

when you would use it

  • find the tracking reference. recover a delivery confirmation before calling the courier.
  • rebuild the conversation. gather a venue’s emails from the month you booked.
  • find the missing attachment. search unread mail under the right project label.
  • look beyond the inbox. include spam and trash when a booking seems to have vanished.

try it

paste this into a chat with your bot

each tuesday at 8, search my personal gmail for hotel and train confirmations from the last seven days. keep fetching results until none remain and open each matching email. list the trip dates and booking references here. flag any email whose details you could not load. never change labels, mark mail read or send anything.
when
tuesdays at 8:00
needs
personal gmail connected with read only

what comes back looks like this (an example)

travel mail found

alder row inn: check-in friday; reference ar-482.
westmere rail: outbound saturday; reference wr-716.
searched to the end. every matching message loaded.

set it up

  1. pick the mailbox. connect the intended gmail account with read only.
  2. try a message you know. give its sender and approximate date, then recognise its subject in the results.
  3. get the useful detail. ask for the full email and all remaining results, including any that failed to load.
  4. save the useful search. read the routine card’s next runs and edit the time if needed.

what it needs from you

inputrequiredwhat it is
querynoGmail advanced search query (e.g., 'from:user subject:meeting').
verbosenoIf false, uses optimized concurrent metadata fetching for faster performance (~75% improvement).
ids_onlynoIf true, only returns message IDs from the list API without fetching individual message details.
label_idsnoFilter by label IDs; only messages with all specified labels are returned (AND logic).
page_tokennoToken for retrieving a specific page, obtained from a previous response's `nextPageToken`.
max_resultsnoMaximum number of messages to retrieve per page.

from composio's catalog for Gmail (action GMAIL_FETCH_EMAILS, read 12 november 20264). your bot fills these in from what you tell it.

how dusk bot handles it

dusk bot counts Fetch emails as a read: it looks and changes nothing. a bot you allow only to read can use it.

the permissions Gmail asks for to run it: https://mail.google.com/, gmail.modify, gmail.readonly.

where it stops

  • a failed load can hide your answer. gmail sometimes skips an email’s details. ask the bot to list those gaps alongside the matches.
  • one batch tops out at 500 emails. have the bot keep going until none remain.
  • spam and trash need an explicit request. include them before deciding the message is gone.
  • a sleeping laptop misses the search. a run under 12 hours late runs once when you return. dusk cloud runs it on time.

try it in 2 minutes

  1. connect the mailbox with read only
  2. name a sender and rough date
  3. ask for matching subjects
  4. pick one and ask it to read the full message

mistakes people make

searching every mailbox at once

name work or personal so private mail stays out of the result.

treating the first batch as everything

ask for all results and a note about anything that failed to load.

questions

can it find an email if i do not know the subject?

yes. give it a sender, rough date or phrase. it can combine those clues in a gmail search.

will opening search results mark them as read?

no. this action reads messages without changing their labels. marking them read needs a separate change.

why did the search show a sender but no email body?

the quick search returns basic details. ask it to open the full email before answering questions about the contents.

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].