NappAI CMS Content
NappAI CMS Content runs fixed flow steps on the content of a NappAI CMS website: read the site overview or a page’s structure, list pages and posts, validate a page, export or apply a landing manifest, and write a page or the theme as a draft.
The component never publishes: the CMS key is a service key and there is no publish operation. A person approves publication in the CMS.
When to use it
- You want to read a page’s structure so a model can propose new copy, and write it as a draft.
- You want to validate a page (a single h1, alt texts, links, SEO, GEO and contrast) before someone publishes it.
- You want to apply a landing manifest, first as a simulation and then as a draft.
- You want to list the blog posts or read the company profile to give an agent context.
Configuration
You need a NappAI-CMS credential with the address of your NappAI CMS (for example https://web.your-company.com) and a key that starts with ncms_. See Credentials.
A CMS administrator creates the key in Ajustes › IA › Conexión con NappAI › Claves NappAI-CMS, and the CMS shows it only once. It is a service key: it reads, prepares drafts and saves results, but never publishes. The address must start with https://; http:// is only accepted with localhost, in development.
| Field | What it does |
|---|---|
| Credential (required) | The NappAI-CMS credential. It fills in CMS Address and NappAI-CMS Key for you. |
| Resource | What you work with: Site, Pages, Posts, Catalog, Theme or Company. Default: Site. |
| Operation | What you do. The list changes with the chosen Resource. See Resources and operations. |
The CMS’s error messages come in Spanish and are shown as they arrive.
Resources and operations
Site
| Operation | What it does | Fields |
|---|---|---|
Site Overview | Overview of the website: identity, theme, navigation, pages with their status, forms and block types. |
Pages
| Operation | What it does | Fields |
|---|---|---|
Get Page Structure | Gets a page’s structure (its blocks with their index) and its full document. | Page (slug). Optional: Language. |
List Pages | Lists the website’s pages, with filters. | Optional: Limit, Filter (JSON), Language and Depth. |
Write Page Draft | Writes a page’s title, SEO or blocks as a draft. | Page ID and at least one of Title, SEO (JSON) or Blocks (JSON). Optional: Language. |
Apply Manifest | Applies a landing manifest as a draft. By default it only simulates it. | Manifest (JSON). Optional: Dry Run. |
Validate Page | Checks a page: a single h1, alt texts, links, SEO, GEO and contrast. | Page (slug). Optional: Language. |
Export Manifest | Exports the current drafts as a manifest, ready to change and apply again. | Optional: Pages (slug) and Language. |
Get Preview URL | Gets the signed preview link of a page’s draft (valid 10 minutes), the published link and the admin link. | Page (slug). Optional: Language. |
- Page (slug) is the page’s slug; the home page is
home. InExport Manifest, Pages (slug) takes one or more slugs separated by commas; empty exports every page. - Language is the language code, for example
en. Empty: the website’s base language. - Limit is the maximum number of results, 1 to 100. Default: 20.
- Filter (JSON) is a Payload filter in JSON, for example
{"slug": {"equals": "home"}}. - Depth (advanced) is how many levels of related items are filled in, 0 to 5. Default: 0.
- Page ID is the page’s id in the CMS:
List PagesandGet Page Structurereturn it. It is accepted with a leading#too. - SEO (JSON) is the page’s
metafield, a JSON object. Blocks (JSON) is the page’s whole list of blocks, a JSON list. Empty values (null) are removed before the page is sent, because the CMS rejects them. - Manifest (JSON) is the website’s manifest (site, theme, navigation, pages…) as a JSON object. Dry Run is on by default: it only checks the manifest and shows the planned changes. Turn it off to apply them as a draft.
Posts
| Operation | What it does | Fields |
|---|---|---|
List Posts | Lists the posts of a channel, with search and category. | Channel. Optional: Search, Category, Results Page and Language. |
Search Posts | Searches posts with a Payload filter. | Optional: Limit, Filter (JSON), Language and Depth. |
- Channel is the posts channel, for example
blogornews. Category is a category’s slug. - Results Page (advanced) is the results page number, with 20 posts per page. Default: 1.
Catalog
| Operation | What it does | Fields |
|---|---|---|
List Blocks | Gets the schema of every page block type. |
Theme
| Operation | What it does | Fields |
|---|---|---|
Update Theme Tokens (Draft) | Changes the theme tokens (colours, fonts, radius) as a draft. | Tokens (JSON) |
Tokens (JSON) is a JSON object with the theme changes, for example {"light": {"primary": "#0a7"}, "radius": "md", "fontSans": "Inter"}. Other keys it accepts are dark, fontHeading or buttonStyle. It can’t be empty.
Company
| Operation | What it does | Fields |
|---|---|---|
Get Company Profile | Gets the company profile. |
Output
The Data output returns the CMS’s answer as data. List Pages and Search Posts deliver one item per document; with no results, {items: [], count: 0}.
The component can be connected to an Agent as a tool for a specific action. See Tools. If you want an agent to decide what to do across the CMS, use NappAI CMS Tools.
Example
A team wants to refresh the home page copy without touching the CMS by hand.
- Add NappAI CMS Content with the
Pagesresource and theGet Page Structureoperation, withhomein Page (slug). - Pass the structure to a model with the team’s guidelines, and ask it for the whole list of blocks with the new copy.
- Connect a second NappAI CMS Content with
Write Page Draft: the page’sidin Page ID and the list of blocks in Blocks (JSON). - Finish with
Get Preview URLand send the preview link to whoever has to approve and publish the change.
Good practices
- Don’t write a page from scratch with
Write Page Draft: read it first withGet Page Structureand send the whole list of blocks. For big changes, preferApply Manifest, first with Dry Run on. - Don’t mix up the manifest and the filter: Manifest (JSON) and Filter (JSON) are different fields.
Security and limitations
- There is no publish operation: the CMS key only writes drafts.
Site OverviewandGet Page Structuregive the status of the page’s latest version. A published page with unpublished changes shows asdraft: it doesn’t mean it isn’t published.
Related components
- NappAI CMS Tools: all the CMS tools for an agent.
- NappAI CMS Media: the image library.
- NappAI CMS Translations: language status and translations.