To enhance The Magic Porridge Poet project, I wanted to fully automate the generation and publishing of new AI poems. To do this, I used workflow automation tool n8n, self-hosted on cloud platform DigitalOcean.
To automate the publishing part of the workflow, I created two n8n Community Nodes to interact with Sanity.io, a headless Content Management System (CMS).
These nodes are designed to create, edit, and delete documents in a Sanity Content Lake, as well as to transform data generated by an LLM (or any other data source) to match a Sanity CMS Document Schema.
The nodes are:
SanityMutation
- Creates, edits, and deletes documents in a Sanity Content Lake (User Guide)SanitySchemaMapper
- Transforms data to match a Sanity CMS Schema (User Guide)The package, named n8n-nodes-sanity-mutation
, can be installed from npm.
To install these n8n Community Nodes and use them in your own n8n projects, follow instructions in the n8n documentation.
Here's what the nodes look like in action in The Magic Porridge Poet:
n8n workflow (left-to-right):