dusk bot
integrationschange message labels in bulk

dusk botintegrationsgmail

apply one gmail filing decision to a batch of messages

clear the delivery notices without losing the customer replies beside them. the bot finds individual gmail messages and adds or removes labels.

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

that can archive mail or mark it read. one request covers up to 1,000 messages. filing skips sending approval, so tell it to show the matches and ask before changing them.

pixel art: a purple pixel bot, a coral pixel bot and an orange pixel bot beside the Gmail mark on a white tile, a folder of papers and a mailbox with a letter, on a lemon field in front of snowy hills and green fields, one saying "ready to archive notices"

what it does

turn a pile of delivery notices into a clear inbox. removing inbox archives a message. removing unread marks it read. work on individual messages, so a customer reply in the same conversation stays put.

the bot searches first and looks up custom labels by name. gmail's success response means it accepted the request. have the bot read back the saved labels to see which changes stuck.

when you would use it

  • archive delivery notices after the parcels arrive
  • mark a chosen group of newsletters read
  • label workshop registrations from one named sender
  • remove an old project label from emails you have reviewed

try it

paste this into a chat with your bot

on the second wednesday of each month at 4, find last month's delivery notices from heron parcel notices in work gmail. show every sender, subject and date here. ask me before you change anything. after i agree, remove only the inbox label from those messages. read back their labels and report any failures. never delete mail or include customer-written messages.
when
second wednesday of the month at 16:00
needs
work gmail; read and write for message search and label changes

what comes back looks like this (an example)

archive proposal
- heron parcel notices, 3 october: delivered to studio
- heron parcel notices, 9 october: delivery window updated
remove inbox from these messages?

set it up

  1. connect work gmail. allow the search and label actions with read and write.
  2. try a small group first. ask for the matching messages without any changes.
  3. name the exact label to add or remove. keep the preview-and-agree step in the routine.
  4. inspect the labels after it finishes. Pause stops future runs if the search catches too much.

what it needs from you

inputrequiredwhat it is
messageIdsyesList of message IDs to modify.
userIdnoUser's email address or 'me' for the authenticated user.
addLabelIdsnoList of label IDs to add to the messages.
removeLabelIdsnoList of label IDs to remove from the messages.

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

how dusk bot handles it

dusk bot counts Batch modify Gmail messages 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

  • file up to 1,000 messages in one request. split larger approved groups and keep the message list for each.
  • look up custom labels before filing. an unmatched label name can leave mail unchanged without a clear failure.
  • read back the labels to see what stuck. an accepted request can still leave individual messages unchanged.

try it in 2 minutes

  1. connect gmail and allow search plus label changes
  2. ask for five newsletter matches, without changing them
  3. read the list, then ask it to mark only those messages read
  4. ask it to read back their saved labels

quick checklist

  • the account and date window match the job
  • every selected message belongs in this group
  • the requested change names the label to add or remove
  • the saved labels show the filing worked

mistakes people make

filing whole conversations from one matching message

review individual messages. a customer reply can share a thread with a notice.

trusting the word success

have the bot inspect the labels after the batch.

questions

does archiving delete the emails?

no. archiving removes the inbox label. it leaves the email in gmail.

can it mark a group of messages unread?

yes. it adds unread to the messages you choose.

will it ask me before it files anything?

tell it to ask before filing. sending settings do not cover labels. read only blocks filing entirely.

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