# How do I find every invoice across all my Gmail accounts?

> Combine Gmail search operators such as has:attachment, filename:pdf and newer_than with an AI assistant to list invoices from every inbox. Prompts and limits.

Updated: 2026-10-03 · Canonical: https://staging.nickbox.io/en/resources/find-every-invoice-across-your-gmail-accounts

Ask your assistant to search every connected inbox with a Gmail query such as `invoice has:attachment filename:pdf newer_than:90d`, and to list sender, date and inbox for each hit. A read-only server like Nickbox runs the same query across up to 5 Gmail inboxes and returns headers and snippets. You then open the messages that matter.

## Which Gmail search operators work for invoices?

The operators from [Gmail's own search help](https://support.google.com/mail/answer/7190) cover most invoice hunts: `has:attachment`, `filename:`, `from:`, `subject:`, `newer_than:`, `older_than:`, `category:` and `label:`. They can be combined, and Nickbox passes your query to Gmail as written, with a limit of 500 characters.

| Operator | What it does | Example |
|---|---|---|
| `has:attachment` | Messages with a file attached | `invoice has:attachment` |
| `filename:` | Attachment type or name | `filename:pdf` |
| `from:` | Sender | `from:billing@vendor.com` |
| `subject:` | Words in the subject | `subject:(invoice OR receipt)` |
| `newer_than:` / `older_than:` | Relative age, with d, m or y | `newer_than:90d` |
| `category:` | Inbox tab, such as purchases or updates | `category:purchases` |
| `label:` | One of your labels | `label:clients` |

Gmail's help lists `purchases` among the category values. Whether it fills with invoices depends on how Gmail sorted your mail, so use it as a filter to try, not as a guarantee.

## How do I ask an assistant to search all my inboxes for invoices?

Name the inboxes, give a time range and say what you want back. The assistant then calls `search_all_accounts`, which runs one query on the inboxes you list, and groups results by inbox. A first prompt that works well:

1. "Which accounts do you see?" This confirms your nicknames.
2. "Search all my accounts for `invoice has:attachment filename:pdf newer_than:90d`. List sender, subject, date and inbox, newest first."
3. "Show only the ones from `billing` and `work`."
4. "Read the top three and tell me the amount and due date if the email says them."

More prompts by situation are in [prompts to search all your inboxes](/en/resources/prompts-to-search-all-your-inboxes).

## What prompts find specific kinds of invoices?

Pick the prompt closest to your problem and swap in your nicknames and vendors.

- **Everything from one vendor:** "Search all my accounts for `from:vendor.com has:attachment` since January and group by month."
- **A client's invoices:** "In `acme`, find messages with `subject:invoice` that have a PDF, and list which month each covers."
- **Missing months:** "Search `billing` for invoices from `from:hosting.com`. Which months of 2026 have no invoice?"
- **Receipts for expenses:** "Search all my accounts for `receipt OR recibo newer_than:30d has:attachment` and list vendor and date."
- **Old invoices:** "Find invoices in `work` with `older_than:1y filename:pdf` and tell me which vendors appear."

For the missing-months prompt, check the answer against the actual list. The assistant sees only what the search returns.

## What are the limits when searching for invoices?

The assistant sees message headers, snippets and plain text. Nickbox lists attachments but does not open them, so the number inside a PDF is out of reach. Invoices sent as a link to a portal have no attachment and will not match `has:attachment`.

Other limits to expect:

- Results come in pages, and the assistant may stop early. Ask it to continue or to narrow the range.
- The assistant can misread a long thread. Verify any amount or date in Gmail before you pay or file.
- Nickbox cannot forward, label or move messages, because its permission is read-only. To save an invoice, open the message and download the file yourself.

## How does this change if I invoice in Mexico?

In Mexico, a CFDI invoice usually arrives as two attachments: an XML file and a PDF. A useful search is `has:attachment filename:xml`, which catches the XML even when the PDF is missing. Run `filename:pdf` next to it to see which messages carry both.

Some Mexican supplier manuals describe sending the [original PDF and XML in each email](https://assets.new.siemens.com/siemens/assets/api/uuid:a0d01e70-42ca-47ec-a4b6-0744610156ff/manual-ingreso-de-cfdi-iol.pdf), one CFDI per email, though each issuer decides what it sends. Treat that as common practice. For tax questions, such as which document is valid for a deduction, ask your accountant. The assistant can help you find the files, and it should not decide what counts for the SAT. The Spanish version of this guide has Mexico prompts: [encontrar facturas en todas tus cuentas de Gmail](/es/resources/encontrar-facturas-en-todas-tus-cuentas-de-gmail).

## How do I set this up?

Connect each inbox to Nickbox, give it a nickname and paste one MCP URL into your assistant. The steps for [Claude](/en/docs/claude), [ChatGPT](/en/docs/chatgpt) and [Cursor](/en/docs/cursor) are in the docs. Nickbox is in a limited beta, it requests only the read-only Gmail permission and it does not store message content. See the [security page](/en/security) for details and the [pricing page](/en/pricing) for the plan: US$5 a month or US$48 a year, with a 7-day trial that needs a card.

## FAQ

**Which Gmail search finds invoices with a PDF?**

Try invoice has:attachment filename:pdf. Add newer_than:90d for the last three months or from: to limit it to one sender.

**Can the assistant read the PDF itself?**

Not through Nickbox. It reads the message as plain text and lists attachments without opening them, so amounts inside a PDF are not visible to it. Amounts written in the email body or the snippet are.

**Will it download or save my invoices?**

No. Nickbox only searches and reads. You open each message in Gmail to download the file.

**Do these operators work in every inbox?**

They are standard Gmail search operators, so they work in any Gmail or Google Workspace inbox. Category tabs depend on whether you use them in that inbox.

## Sources

- [Refine searches in Gmail (Gmail Help)](https://support.google.com/mail/answer/7190)
- [50+ Gmail search operators (Mailmeteor)](https://mailmeteor.com/blog/gmail-search-operators)
- [Best AI email assistant for freelancers in 2026 (Replyless)](https://replyless.beehiiv.com/p/best-ai-email-assistant-for-freelancers-in-2026)
