get the gmail attachment you actually need
walk into the call with the signed agreement open. give the bot the sender, subject and filename.
it finds the gmail message, selects the attachment and returns a download in your chat. you get a copy. the original email and attachment stay in gmail, ready to find again.

what it does
last month's unsigned contract is no help on today's call. the bot finds the email, reads its attachment list and downloads the file you mean. it can name the downloaded copy so you recognise it.
give it the sender and rough date as well as the filename. open the returned file and look for the signature.
when you would use it
- bring the signed agreement to the call. fetch it from the venue booking email.
- use the corrected drawing. choose the supplier message that replaced the earlier version.
- find the travel receipt again. start from the airline email instead of guessing where you saved it.
try it
paste this into a chat with your bot
every tuesday at 9:30, find emails received since last tuesday from yasmin at fenwick hall. retrieve pdf attachments that the messages describe as signed agreements. return each download here with its email subject and date.
if two files could be the signed version, ask which i mean. if no new agreement arrived, say so briefly. never forward files or change messages.- when
- tuesdays at 9:30
- needs
- gmail read only, with message searches and attachment downloads allowed
what comes back looks like this (an example)
new agreement from fenwick hall
- sender: yasmin
- subject: countersigned venue terms
- file: fenwick-signed-venue.pdf
copy ready here. the original stays in gmail.set it up
- connect the inbox holding the file. give this bot gmail read-only access.
- describe the email and attachment. include sender and subject. ask it to inspect the message first.
- open one returned copy. look for the signature and version date, then set the collection routine. pause it when agreements stop arriving.
what it needs from you
| input | required | what it is |
|---|---|---|
file_name | yes | Desired filename for the downloaded attachment. |
message_id | yes | Immutable ID of the message containing the attachment. |
attachment_id | yes | The internal Gmail attachment ID (NOT the filename). |
from composio's catalog for Gmail (action GMAIL_GET_ATTACHMENT, read 12 november 20264). your bot fills these in from what you tell it.
how dusk bot handles it
dusk bot counts Get Gmail attachment 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
- same filename, different emails. name the sender and rough date to distinguish them.
- local schedules need an awake computer. a run under 12 hours late runs once when you return. older runs skip; dusk cloud runs on time.
try it in 2 minutes
- connect the right gmail account, read only
- name the sender, subject and file
- ask for the newest signed copy
- open the download and find the signature
mistakes people make
asking for contract.pdf with no context
add who sent it and roughly when. filenames repeat.
assuming newest means signed
read the email and open the file. a newer attachment can still be a draft.
questions
can i ask for an attachment by filename?
yes, as a clue. the bot still finds the email and checks its attachments before downloading.
does downloading remove the attachment from gmail?
no. you get a copy. the original email and file stay where they were.
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].
find the gmail drafts you have left unfinished
a gmail assistant that sorts, drafts and briefs you
a file organizer bot that lists its moves first
send a gmail email by telling your bot what to say
claude code for email: clean up one slice first
apply one gmail filing decision to a batch of messages