App Logo
mail.google.com

Archive Gmail thread

Archive a Gmail thread by its hex threadId (removes it from the Inbox; it stays in All Mail). Returns archived, threadId, and the Inbox page it was found on. Acts on the thread's row in the Inbox list, scanning the first 4 Inbox pages (~200 newest threads), and confirms the row actually left the list rather than trusting a toast. If the thread is not in those pages it throws: it is then already archived (nothing to do) or older than that. It never acts from the conversation view, where Gmail's Archive control is offered whatever the thread's state and so cannot confirm anything.

Input

threadId required

Hex legacy thread id (as returned by search_emails).

account optional

Google account email to act as (authuser=). Without it Gmail picks u/0, nondeterministic in a multi-account browser jar.

Output

archived required
threadId required
page optional

Which Inbox page the thread was found on (1-based), or null when it was located through search instead.

already_archived optional

true = the thread was already out of the Inbox; nothing was clicked.

FAQ

Archive a Gmail thread by its hex threadId (removes it from the Inbox; it stays in All Mail). Returns archived, threadId, and the Inbox page it was found on.
Required: threadId. Optional: account.
It returns page, archived, threadId, already_archived.
Yes. It acts as you on mail.google.com: on your own Chrome it reuses your session, and on a Reduck-hosted browser it loads the mail.google.com cookies saved by the Reduck extension.
It makes changes on mail.google.com, like sending, posting or booking something.
Ask an AI agent connected to Reduck to run reduck/mail.google.com/archive_email, or run it from a terminal with the Reduck CLI: npx @reduck-ai/cli@latest run --script reduck/mail.google.com/archive_email
It is part of Reduck's official curated catalogue.

Start building not clicking