trendyminds / distributary
Import a Google Docs HTML archive and let AI map it into Statamic page blocks.
1.0.0
2026-05-19 18:12 UTC
Requires
- laravel/ai: ^0.6
- statamic/cms: ^6.0
Requires (Dev)
- laravel/pint: ^1.29
- orchestra/testbench: ^10.8
README
A Statamic 6 addon that turns a Google Docs export into a draft page entry. Upload a
"Web Page" .zip, and Claude maps the document's HTML and images into your existing
replicator blocks. The import always lands as a draft so an editor can review before
publishing.
Requirements
- PHP 8.4+
- Statamic 6
- A
pagescollection with ablocksreplicator field - An
uploadsasset container - A configured
laravel/aiprovider (Anthropic by default)
Installation
composer require trendyminds/distributary
Then set your AI credentials in .env (see laravel/ai's docs for the provider you're using):
ANTHROPIC_API_KEY=...
Usage
The addon registers a CP utility at Utilities → AI Import (the display name is configurable — see below).
- In Google Docs, choose File → Download → Web Page (.html, zipped).
- Upload the
.zipin the utility. - Wait for the import to process (parse, image upload, AI mapping).
- Review the proposed blocks on the preview screen, edit the title, and confirm.
- The addon creates a draft entry in
pagesand drops you on its edit screen.
Configuration
The defaults work out of the box. To customize, publish the config:
php artisan vendor:publish --tag=distributary-config
| Env | Default | Notes |
|---|---|---|
DISTRIBUTARY_DISPLAY_NAME |
AI Import |
The name shown to content authors in the CP utility list, nav, and page titles. |
DISTRIBUTARY_PROVIDER |
anthropic |
Any provider configured in config/ai.php. |
DISTRIBUTARY_MODEL |
claude-opus-4-7 |
Model identifier for that provider. |
How it works
- Parse — extracts HTML and images from the
.zipto a temporary directory. - Import images — streams each image into the
uploadsasset container underdistributary/YYYY-MM/. - Inspect blueprint — reads the
pagescollection'sblocksreplicator and summarizes each set for the model. - Map — sends the document HTML, blueprint summary, and image references to Claude, which returns a structured block list.
- Preview — renders the proposed entry for review. Mapping results are cached for 30 days keyed by file hash, so re-uploads are instant.
- Confirm — builds a draft entry from the approved mapping.