EML, MSG & MBOX to JSON - Emails & Attachments for RAG avatar

EML, MSG & MBOX to JSON - Emails & Attachments for RAG

Pricing

$0.50 / 1,000 message parseds

Go to Apify Store
EML, MSG & MBOX to JSON - Emails & Attachments for RAG

EML, MSG & MBOX to JSON - Emails & Attachments for RAG

Turn email archives into data. Give EML, MSG or MBOX files by URL or key-value store and get one JSON row per message: headers, text, thread ID, attachment list (saved to storage) and optional RAG-ready chunks. For e-discovery, mailbox RAG and CRM migrations.

Pricing

$0.50 / 1,000 message parseds

Rating

0.0

(0)

Developer

mohamed alaya

mohamed alaya

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

a month ago

Last modified

Security

Limited permissions

Share

Turn email archives into clean JSON. Give it .eml, .msg or .mbox files (by URL, from a key-value store, or pasted) and get one row per message with headers, plain text, a thread ID, the attachment list (files saved to storage) and, if you want, RAG-ready chunks. For e-discovery, mailbox search with an LLM and CRM migrations.

Runs offline in the Actor, no mail server access or login is needed.

Input examples

{ "fileUrls": ["https://example.com/archive/inbox.mbox"] }
{ "keyValueStoreId": "<store id>", "recordKeys": ["export.mbox", "invoice.eml"], "includeChunks": true, "chunkTokens": 400 }
{ "rawContent": "From: a@example.com\nTo: b@example.com\nSubject: Hi\n\nHello", "saveAttachments": false }

Empty input {} parses a small built-in sample mailbox.

Input guide

FieldWhat it does
fileUrlsDirect links to .eml, .msg, .mbox files. Format is detected from content.
keyValueStoreId, recordKeysPick a store with email records; empty keys means every .eml/.msg/.mbox record.
rawContentPaste a message or whole mbox.
saveAttachments, maxAttachmentMbStore attachments in the run's key-value store (default on, 10 MB each).
includeHeadersAdd the full headers object.
includeChunks, chunkTokens, overlapTokensHeading-aware, overlapping chunks for embeddings; each starts with subject, sender and date.
maxMessages, maxFileMbSafety limits.

Output

FieldMeaning
typemessage or error
source, messageIndex, formatFile, position inside it, and eml/msg/mbox
messageId, inReplyTo, referencesThreading headers
threadId, threadPosition, threadSizeConversation grouping (built from Message-ID, In-Reply-To and References)
date, from, to, cc, bcc, replyTo, subjectParsed envelope fields (ISO date, name + address)
text, textPreview, hasHtml, labelsBody as plain text (HTML converted), Gmail labels from X-Gmail-Labels
attachments[]filename, contentType, size, inline, kvsKey, kvsUrl
headers, chunks[]All headers; RAG chunks when enabled

Sample row (abridged):

{"type":"message","source":"mail-archive.mbox","format":"mbox","messageId":"<a2@example.com>","threadId":"a2f1c3f0df4a8a73","threadPosition":3,"threadSize":3,"date":"2026-09-29T08:15:00.000Z","from":{"name":"Alice Moreau","address":"alice@example.com"},"subject":"Re: Q3 budget review","attachmentCount":1,"attachments":[{"filename":"q3-budget.txt","size":93,"kvsKey":"att-1a2b3c4d5e-q3-budget.txt"}]}

Use it with

  • Google Takeout or Thunderbird .mbox export -> this Actor -> vector database (use the chunks array).
  • website-to-rag-incremental covers web pages; this Actor covers the mailbox side of the same RAG pipeline.

FAQ

Are threads reliable? Threads follow the standard headers. Messages with stripped Message-ID/References headers cannot be linked and each become their own thread.

Does it read PST or Outlook OST? No, only EML, MSG and MBOX.

Limits (honest)

  • MSG support uses a pure-JavaScript reader; very old or encrypted MSG files may fail and become error rows. Tested on the platform with a sample Outlook MSG with an attachment.
  • Reading a key-value store you pick needs the Actor's full-permissions mode.
  • Very large mbox files are loaded into memory (default cap 100 MB per file).
  • Token counts are estimated (characters / 4).

Price

Pay per event: message-parsed $0.0005 per message row. Example: a 10,000-message mailbox costs $5.00. Error rows are free.