Skip to content

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.

FieldWhat it does
Credential (required)The NappAI-CMS credential. It fills in CMS Address and NappAI-CMS Key for you.
ResourceWhat you work with: Site, Pages, Posts, Catalog, Theme or Company. Default: Site.
OperationWhat 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

OperationWhat it doesFields
Site OverviewOverview of the website: identity, theme, navigation, pages with their status, forms and block types.

Pages

OperationWhat it doesFields
Get Page StructureGets a page’s structure (its blocks with their index) and its full document.Page (slug). Optional: Language.
List PagesLists the website’s pages, with filters.Optional: Limit, Filter (JSON), Language and Depth.
Write Page DraftWrites 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 ManifestApplies a landing manifest as a draft. By default it only simulates it.Manifest (JSON). Optional: Dry Run.
Validate PageChecks a page: a single h1, alt texts, links, SEO, GEO and contrast.Page (slug). Optional: Language.
Export ManifestExports the current drafts as a manifest, ready to change and apply again.Optional: Pages (slug) and Language.
Get Preview URLGets 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. In Export 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 Pages and Get Page Structure return it. It is accepted with a leading # too.
  • SEO (JSON) is the page’s meta field, 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

OperationWhat it doesFields
List PostsLists the posts of a channel, with search and category.Channel. Optional: Search, Category, Results Page and Language.
Search PostsSearches posts with a Payload filter.Optional: Limit, Filter (JSON), Language and Depth.
  • Channel is the posts channel, for example blog or news. Category is a category’s slug.
  • Results Page (advanced) is the results page number, with 20 posts per page. Default: 1.

Catalog

OperationWhat it doesFields
List BlocksGets the schema of every page block type.

Theme

OperationWhat it doesFields
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

OperationWhat it doesFields
Get Company ProfileGets 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.

  1. Add NappAI CMS Content with the Pages resource and the Get Page Structure operation, with home in Page (slug).
  2. Pass the structure to a model with the team’s guidelines, and ask it for the whole list of blocks with the new copy.
  3. Connect a second NappAI CMS Content with Write Page Draft: the page’s id in Page ID and the list of blocks in Blocks (JSON).
  4. Finish with Get Preview URL and 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 with Get Page Structure and send the whole list of blocks. For big changes, prefer Apply 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 Overview and Get Page Structure give the status of the page’s latest version. A published page with unpublished changes shows as draft: it doesn’t mean it isn’t published.