Add it when you need it

Inbox

Inbound email for your app: forward receipts, invoices and notices to an address on your domain, and they arrive parsed, with their attachments, ready for other plugins to act on.

Installing it

zsh — your app
pnpm plugin add https://github.com/rocketflare-dev/rocketflare-plugins.git@inbox-v3.16.0 --subdir plugins/inboxpnpm plugin add https://github.com/rocketflare-dev/rocketflare-plugins.git@inbox-v3.16.0 --subdir plugins/inbox --apply
The first prints the plan and stops; the second writes it.

Then generate and run its migration — pnpm db:generate --name plugin-inbox-3.16.0 and pnpm db:migrate — and do the handful of steps the plan lists that a plugin may not do for you.

What it adds

  • An address per organisation — mail reaches the Worker through Cloudflare Email Routing. Each organisation picks a local part, and receipts+anything@ reaches it too.
  • Checked before it is accepted — against the organisation’s sender allow-list and the SPF, DKIM and DMARC verdicts Cloudflare recorded. Anything refused is bounced with a reason the forwarding mailbox shows.
  • An Inbox page — messages, sender and forwarder, authentication verdicts, text body and attachments, with reprocess and delete. Settings → Inbox holds the address, the allow-list and the on/off switch.
  • Forwards split apart — each email forwarded as an attachment becomes a message of its own, linked to the forward it came in. Gmail and Proton forwarding confirmations are let through, with their code and link shown.
  • Searchable from chat — each message and its PDF, Office, HTML and text attachments are indexed into the knowledge base, which it needs the kit’s knowledge surface for. Switchable in Settings.
  • Agent tools and an extension — inbox_list_messages and inbox_get_message, both read-only, and inbox:consumers so a plugin is called once per parsed message.
  • Three tables and R2 — settings, messages and attachments, all with row-level security. The bytes live in R2 per organisation and are purged with it.
  • Commands and a skill — rocketflare inbox list and status, and /inbox, which covers Email Routing setup, forwarding, testing and troubleshooting.

Releases

  1. 3.16.0 2026-11-28

    The two readers other plugins call stop for an organisation that turned inbox off (kit 0.48.0's kill switch), and pnpm plugin check no longer warns about them. The plugin needs kit 0.48.0 or later. Porting note.

  2. 3.15.0 2026-11-28

    Inbox's tools answer egress and readsContent, so pnpm plugin check no longer warns about them, and the plugin needs kit 0.47.0 or later. Porting note.

  3. 3.14.0 2026-11-22

    Inbox registers its tools under tools instead of the deprecated agentTools, which pnpm plugin check warned about, and so needs kit 0.41.0 or later. (rocketflare-plugins#39, item 5) Porting note.

  4. 3.13.3 2026-11-22

    No change to inbox: this release carries the global-search and connectors test changes, and every plugin in this repository ships at one version. Porting note.

  5. 3.13.2 2026-11-21

    The inbox manifest now carries a one-line description, which the kit's pnpm plugin list --available prints in place of the README's opening line. Porting note.

8 older releases
  1. 3.13.1 2026-11-21

    No change to inbox: this release exists because the repository released analytics and every plugin here ships at the repository's version. Porting note.

  2. 3.13.0 2026-11-20

    No change to inbox: this release exists because the repository released analytics and every plugin here ships at the repository's version. Porting note.

  3. 3.9.0 2026-11-09

    Inbox tightens which senders it accepts, bounds how far one delivery can split, and holds released addresses for 90 days. Porting note.

  4. 3.8.2 2026-11-08

    No change to inbox. This release exists because freeagent typechecks on kit 0.25.0 and later again, and every plugin here ships at the repository's version. Porting note.

  5. 3.8.1 2026-11-03

    No change to inbox. This release exists because analytics scopes GET /api/analytics/facts/status to the caller's organisation, and every plugin here ships at the repository's version. Porting note.

  6. 3.8.0 2026-11-03

    No change to inbox. This release exists because analytics moves to drizzle-cube 0.12.2 and compiles on React 19 with React Router 7, and every plugin here ships at the repository's version. Porting note.

  7. 3.7.0 2026-10-24

    Forwarded-as-attachment email is split: each embedded message/rfc822 part becomes an inbox message of its own, so consumers and the knowledge base see one message per forwarded email instead of an .eml attachment they skip. Porting note.

  8. 3.6.0 2026-10-24

    First release of inbox: organisations receive forwarded email through Cloudflare Email Routing, with an allow-list, authentication checks, parsed attachments, forwarding-confirmation codes and a consumer extension for other plugins. Porting note.

From the README

Synced from the plugin's README — the plugin's own documentation, kept in step with its repository.

Mail reaches the Worker through Cloudflare Email Routing and the kit’s email entry. Each organisation picks a local part (receipts). Mail to receipts@<your domain>, or receipts+anything@, is checked against the organisation’s sender allow-list and the SPF, DKIM and DMARC verdicts Cloudflare recorded. Accepted mail is stored raw in R2 and parsed in a queued job. Other plugins subscribe to parsed messages through the inbox:consumers extension.

What it adds

AreaWhat you get
EmailA catch-all emailHandlers entry. Unknown addresses, senders that aren’t allowed and failed authentication are bounced with a reason the forwarding mailbox shows
UIInbox: messages, sender and forwarder, authentication verdicts, text body, attachments, raw/HTML downloads, reprocess and delete. Settings → Inbox: address, allow-list, require authentication, on/off
Forward as attachmentEach message/rfc822 part of a message (Gmail’s “Forward as attachment”, with or without a disposition) becomes a message of its own, linked to the forward it came in: its own sender, subject, date and attachments, the forward’s authentication verdict, and who forwarded it. An embedded email already received is linked, not stored again. Nesting stops at 3 levels, 50 emails per message and 50 in total per delivery
ForwardingGmail and Proton forwarding confirmations are let through ahead of the allow-list during a 24-hour setup window (opened when the address is set, or from Settings), must authenticate as the provider, and show their code and link (on the provider’s host only) at the top of the message
KnowledgeEach parsed message (headers + text) and its PDF/Office/HTML/text attachments are indexed into the kit’s knowledge base (inbox:message, inbox:attachment), so chat can search your mail. Upserted on reprocess, removed on delete, switchable in Settings
Agent toolsinbox_list_messages and inbox_get_message, both read-only
Extensioninbox:consumers: a plugin contributes { id, onMessage(message, ctx) } and is called once per parsed message — so once per embedded email of a forward — with attachment refs it reads through readInboxAttachment, and parentMessageId / forwardedBy / forwardedMessageIds for forwarded mail
APIGET/PUT /api/inbox/settings, GET /api/inbox/messages, GET /api/inbox/messages/:id, …/:id/raw, …/:id/html, GET /api/inbox/attachments/:id, POST …/:id/reprocess, DELETE …/:id
Datainbox_settings, inbox_messages and inbox_attachments, all with row-level security. Bytes live in R2 under tenants/<id>/inbox/ and are purged with the tenant
CLIrocketflare inbox list [--status] and rocketflare inbox status
Skill/inbox: Email Routing setup, Gmail and Proton forwarding, testing, troubleshooting

Requirements

  • Rocketflare kit 0.48.0 or later (the emailHandlers slot, storage() on background contexts, egress on tools, and definePublic on the two readers, which refuse while inbox is turned off for the organisation).
  • The receiving domain on Cloudflare, with Email Routing enabled and a rule that sends the address to the Worker.
  • The kit’s FILES (R2) and JOBS_QUEUE bindings, which every kit app already has, and its knowledge surface (feature-knowledge) for indexing.

Install

pnpm plugin add https://github.com/rocketflare-dev/rocketflare-plugins.git@inbox-v3.16.0 --subdir plugins/inbox
pnpm plugin add https://github.com/rocketflare-dev/rocketflare-plugins.git@inbox-v3.16.0 --subdir plugins/inbox --apply
pnpm db:generate --name plugin-inbox-<version> && pnpm db:migrate

Then run /inbox setup.

Building on it

import { inboxExtensions } from '@rocketflare/shared/plugins/inbox/index'
import { type InboxConsumer, readInboxAttachment } from '@/plugins/inbox'

const receipts: InboxConsumer = {
  id: 'receipts',
  async onMessage(message, ctx) {
    // Quick and idempotent: enqueue your own job, keyed on message.messageId.
    await ctx.enqueue({ type: 'receipts.extract', payload: { tenantId: message.tenantId, messageId: message.messageId } })
  },
}

export const receiptsServer = {
  // …
  extensions: inboxExtensions({ consumers: [receipts] }),
}

Declare requires: { plugins: ["inbox"] } in your plugin.json.

Who sees what

Every member can read the inbox and its attachments. Owners and admins change the settings, reprocess messages and delete them.

Known gaps

  • Bounced messages aren’t stored or listed. The bounce reason goes only to the forwarding mailbox and the Worker log.
  • One local part per organisation.
  • No outbound replies.
  • The routing rule is a manual dashboard step; provisioning doesn’t create it.
  • The HTML body is a download only and is never rendered in the app.
  • A message split out of a forward carries the forward’s SPF/DKIM/DMARC verdict; its own signatures can’t be checked once it has been re-wrapped.
  • Messages received before 3.7.0 aren’t split until they are reprocessed.