App Logo
mail.google.com

Archive Gmail thread

Automatically archive Gmail thread on mail.google.com. Archive a Gmail thread by its hex threadId: it leaves the Inbox and stays in All Mail. Returns archived and threadId, plus already_archived:true when the thread was not in the Inbox (nothing was changed). Fails with an error, rather than reporting success, when the thread cannot be found or Gmail does not confirm it left the Inbox.

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: it leaves the Inbox and stays in All Mail. Returns archived and threadId, plus already_archived:true when the thread was not in the Inbox (nothing was changed). Fails with an error, rather than reporting success, when the thread cannot be found or Gmail does not confirm it left the Inbox.
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
You do not need one. "Archive Gmail thread" drives the real mail.google.com pages in a browser, so it works whether or not mail.google.com offers an API for this.
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, booking or buying 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