n8n-nodes-epub
v0.1.3
Published
n8n community node that converts HTML into an EPUB e-book. Zero runtime dependencies — builds the EPUB (ZIP + OPF + XHTML) in memory. Works on n8n Cloud.
Maintainers
Readme
n8n-nodes-epub
An n8n community node that turns HTML → EPUB entirely in memory — zero runtime dependencies, so it's eligible for n8n Cloud verification.
Good fit for newsletter-to-Kindle pipelines, archiving articles to your e-reader, replacing Readbetter/Pocket-to-Kindle on your own infra.
Features
- HTML to EPUB in a single node, no external binary or CLI required
- Zero runtime dependencies — builds the ZIP container and OPF/XHTML templates from scratch
- Works on n8n Cloud as well as self-hosted
- Valid EPUB 3 output (with EPUB 2
toc.ncxcompatibility) - Sensible default stylesheet
- Strips scripts, iframes, and inline event handlers from the input HTML
Install
In the n8n UI: Settings → Community Nodes → Install, then enter n8n-nodes-epub.
Quick usage
Wire up:
- HTTP Request (or Gmail / whatever produces the article HTML)
- HTML to EPUB — set Title, pass the HTML through
- Gmail / Dropbox / Webhook to deliver the resulting
.epub(e.g. to[email protected])
Newsletter-to-Kindle example
Gmail Trigger (label: to-kindle)
└▶ Code (extract text/html MIME part)
└▶ HTML to EPUB (title = email subject, HTML = decoded body)
└▶ Gmail Send (to [email protected], attachment from binary property)Node parameters
| Parameter | Description |
|---|---|
| Input Source | HTML String or Binary |
| HTML | The raw HTML article (when Input Source = HTML String) |
| Input Binary Property | Binary property name holding the HTML bytes (when Input Source = Binary) |
| Title | Required. Used as book title, chapter heading, and TOC label. |
| Output Binary Property | Property name to write the generated EPUB to. Defaults to data. |
Additional fields
| Field | Stored as |
|---|---|
| Author | dc:creator |
| Description | dc:description |
| File Name | Override output filename (default: slugified title) |
| Identifier (UUID) | Stable dc:identifier. Random UUID if omitted. |
| Language | BCP-47 tag, stored as dc:language. Default en. |
| Publisher | dc:publisher |
How it works
- The input HTML is lightly sanitized (scripts, iframes, inline handlers removed; void elements self-closed) and wrapped in a valid XHTML chapter.
- Seven files are assembled in memory:
mimetype,META-INF/container.xmlOEBPS/content.opf,OEBPS/nav.xhtml,OEBPS/toc.ncxOEBPS/chapter.xhtml,OEBPS/style.css
- The files are packed into a ZIP archive using the STORE method (no DEFLATE, since no compression library is allowed for verified community nodes). A manual CRC32 is computed per entry.
mimetypeis written first, uncompressed, as required by the EPUB spec.
Produced files typically range 10–100 KB and open cleanly in Apple Books, Kindle, Kobo, Calibre, and Readium.
Development
npm install
npm run lint
npm run build
npm run dev # live-reload against a local n8n instanceRelease (after committing changes):
npm run releaseThis uses @n8n/node-cli and the bundled GitHub Actions workflow (.github/workflows/publish.yml) to publish to npm with an attached provenance statement, satisfying the verified-node requirements introduced in May 2026.
