·
Guides
ChatGPT
Claude
Attachments

Can ChatGPT Read Email Attachments? Yes, Including Invoices

Yes, ChatGPT and Claude can read email attachments and pull invoices and receipts out of any inbox. What works in each app, prompts to copy and the limits.

Searching “can ChatGPT read email attachments” usually means a pile of invoices and receipts is waiting for you, and the answer is yes, with one catch that decides how you set it up. ChatGPT and Claude can find the invoice emails, read the amounts, open the attached files and turn a month of mail into a table for your accountant. The catch is the PDF itself. Text attachments (CSV, TXT, calendar invites) reach the assistant as readable text, photos of receipts arrive as images in Claude, Codex and Cursor, while a PDF reaches it as raw encoded bytes that have to be decoded first. Assistants that can run code, like Claude Code, handle that well. In the ChatGPT and claude.ai chat windows the reliable route is the email body, which for most invoice and receipt emails already carries the vendor, the date and the total.

Can ChatGPT read email attachments on its own?

Partly, and only for two providers. ChatGPT's built-in apps cover Gmail and Outlook. OpenAI's help pages describe searching and reading mail with the Gmail app but do not spell out how it handles attachments, and user reports are mixed: text-based PDFs often open, scans and large files less reliably. If it works on your account, keep using it. Sending is the clear gap: as of October 2026 people were still asking OpenAI for a way to attach a file to an email ChatGPT sends.

Claude is more clear-cut. Anthropic's documentation for its Gmail connector says it reads attachment metadata, “not attachment content”. Claude can tell you an invoice PDF exists, with its name and type, and cannot open it. And for iCloud, Yahoo, OVH, Zoho or a mailbox on your own domain, neither assistant has a built-in connector at all.

That is the gap anymailmcp.com fills: one custom connector URL, https://anymailmcp.com/mcp, that gives ChatGPT, Claude, Claude Code, Cursor, Codex, Grok and Meta Muse the same mail tools on any IMAP mailbox, Gmail included, attachments included. Setup for a non-Google mailbox is in our IMAP guide, and iCloud users have their own walkthrough. One exception for now: Outlook.com and Microsoft 365 mailboxes cannot be connected through anymail yet (Microsoft sign-in is coming), so on those, stick with your assistant's built-in Microsoft connector.

How the assistant gets to the attachment

Three tool calls, in this order, every time:

  1. search_emails finds candidates by sender, subject, body text and date range (since, before), up to 50 results per page. Filters match substrings, so a month is usually two or three searches: “invoice”, “receipt”, and whatever word your suppliers use in your language.
  2. read_email returns the headers, the text body (converted from HTML when the email has no plain-text part) and the list of attachments with filename, type, size and a partId. No file bytes yet, which keeps this step cheap.
  3. get_attachment takes the UID and part id and downloads that one file live from your mail server. You get JSON with filename, mimeType, size, a sha256 and the file: decoded text for text files (CSV, TXT, ICS, HTML, read in their declared charset), an image block for photos and screenshots (PNG, JPEG, GIF, WebP) in clients that show images to the model, or content_base64 for everything else, PDFs included. The cap is 25 MB per file.

Two things people ask. There is no download link: the file travels inside the tool result, and the temporary copy on our server is deleted within about fifteen minutes. Every attachment is also an MCP resource with an attachment:// address, so clients that read MCP resources can fetch the same file by its URI. And the server does not extract text from PDFs or run OCR. What happens next depends on which assistant receives the file.

Claude Code reads the PDFs, chat windows read the email

In Claude Code, a tool result longer than 50,000 characters is saved to a file in the session's tool-results folder, and Claude gets the path instead of the wall of text. Any invoice PDF over about 35 KB lands there. Claude then does the boring part in its shell: pull content_base64 out with jq, base64 -d it into a real PDF, compare the sha256, run pdftotext. A photographed receipt comes back as an image Claude looks at directly, and Claude Code also saves the original to a file. Codex and Cursor show images the same way and have a shell for the PDFs; how they treat a very long tool result varies, so keep batches small.

On claude.ai and in Cowork, a photographed receipt shows up as an image Claude can read. A PDF does not: Claude's hosted connectors don't accept a PDF inside a tool result, so it arrives as base64 text, and a PDF's content is compressed inside the file, so the model can't read the invoice out of it. In ChatGPT (developer mode), images from tools aren't reliably passed to the model either, so everything but text files arrives as base64. Either way, don't ask a chat window for the PDFs. Ask it to work from the email body and to list the emails where the amount only exists in the PDF. Text attachments read fine everywhere: a CSV export from your bank or a TXT statement comes back decoded.

Extract invoices from email: a month of bookkeeping in one prompt

This is the prompt to run on the first working day of the month. It works in any client, because it only opens attachments when it has to:

Monthly invoice table (any client)Find every invoice and receipt I received between 2026-10-01 and 2026-10-31. Search subjects and bodies for invoice, receipt, facture and order confirmation, read each match, and build a table: vendor, invoice date, invoice number, amount excl. VAT, VAT, total, currency, and where you found the numbers (email body or attachment). Copy VAT exactly as written; if it is not stated, leave the cell empty instead of calculating it. After the table, list the emails where the amount is only in a PDF you could not read.

Expect two or three searches, one read_email per match, and a table where most rows say “email body”. Subscription and marketplace receipts almost always print the total in the email. The rows that come back empty are usually freelancers and small suppliers who send a bare PDF with “please find attached”. That short list is what Claude Code is for:

Read the PDFs (Claude Code)For each October email with a PDF attachment that you could not total from the body, call get_attachment, decode content_base64 into ./invoices/2026-10/ as vendor-date.pdf, check the sha256 matches, run pdftotext on it and pull out the invoice number, total and VAT. If the text layer is empty, it is a scan: render the first page to PNG and read it. Write everything to invoices-2026-10.csv and print the rows you are unsure about.

Receipts work the same way and are where totals matter more than line items:

Extract receipts from emailSearch my inbox for receipts from October 2026 and total them per currency, without converting anything. Group them by type (software, travel, meals, hardware, other) and list the five largest with the date and the sentence you took the amount from.

Asking for the source sentence is the cheapest accuracy check there is. When a row looks wrong you can see in two seconds whether the assistant grabbed the subtotal, the VAT line or last month's balance.

Subscription driftCompare the subscription receipts I got in September and October 2026. Which vendors billed me in both months, which amounts changed, and which ones appeared for the first time in October?

Once the table is right, filing is one more step. With the mailbox on Read & organize, the assistant can create a folder like Invoices/2026-10 and move every match into it (the same filing moves as in organizing a Gmail inbox with Claude). With Full access, forward_email sends each invoice on to your accountant with the original PDF carried over server-side, so nothing is downloaded or re-uploaded through the chat. For vendors whose invoice never arrived, have it draft a short request for you to review first, as described in drafting emails with Claude.

File and forwardCreate the folder Invoices/2026-10, move every invoice email from the table into it, then forward each one with its attachment to my accountant's address with the note "October invoices, see attached". Show me the list before you send anything.

Limits worth knowing before month end

  • No PDF reading on our side. The server hands over the bytes, as a tool result and as an MCP resource; reading them is the client's job. In ChatGPT and claude.ai that means the email body is your source for PDF-only invoices, or you open those PDFs yourself.
  • Only text/* files come back as text. A standalone XML e-invoice sent as application/xml, a spreadsheet or a Word file arrives as base64 like a PDF does.
  • 25 MB per attachment. Larger parts are refused before any bytes are downloaded.
  • Search is substring matching, not semantic. An invoice titled “Your October statement” is missed by a search for “invoice”. Add the sender of anything you know is missing, and remember to search Sent when the invoices are the ones you issued.
  • The free plan is for a test run. It allows 15 calls a day, and a month of bookkeeping takes one read per email plus the searches, so 30 to 60 calls is normal. Solo is 4.99 €/month excl. VAT with unlimited calls and up to five mailboxes.
  • The model can still misread. It will occasionally take a subtotal for a total or invent a VAT figure if you let it. Ask for the source line, forbid calculated VAT, and check the total against your bank statement before it goes to the accountant.

For extraction alone, the Read access level is enough: the assistant can search, read and download attachments and cannot move, delete or send anything.

Try it on last month's invoices

Pick your mail provider and your assistant below. Connect with Read access, run the monthly invoice prompt on October, and see how many rows come back from the email body alone.

Set up

Ready to let your assistant into your inbox?

Get started, free