Integration

Foundation CMS and n8n

n8n is how most of the automation around Foundation CMS is built, this website's included. A scoped key lets a workflow read the content model and publish entries the way an editor saves them, and a form's signed webhook hands each enquiry to a workflow to route wherever it needs to go.

Overview

This integration connects Foundation CMS with n8n. Foundation CMS is Swarm Labs' multi-tenant content management system on Cloudflare Workers. It holds a site's content and hands it to the site as whole, typed records, and every site runs as its own Worker with its own database and media bucket. Two doors face an automation: the content API at /api/v1, behind keys scoped to one site and named abilities, and form delivery, which can post each submission to a webhook signed by the site.

Business Context and Core Use Case

swarmlabs.io runs on Foundation CMS, and much of its content is kept up by n8n. Workflows add new applications as drafts with their logos, write and publish the articles about them, publish integration pages filed under their categories, and update the home page's live counter of hours saved. None of that involves a person pasting text into a CMS, and every entry is still editable in the admin.

The Applications Involved

Foundation CMS (Foundation CMS) exposes the schema, contract, content, media upload and terms through its API, and signs the webhooks its forms send.

n8n (n8n) runs the workflows: scheduled, triggered by a webhook, or both.

How the Integration Works

A key is made for the site with only the abilities the workflow needs, for example writing one content type and uploading media. The workflow uploads any image first, gets its key back, then creates or updates the entry, giving related entries by slug and categories by label, which Foundation CMS resolves; an unknown label creates the category. Entries can be published, saved as drafts or scheduled. In the other direction, a form's webhook posts each submission, signed, to an n8n webhook node.

Immediate Operational Value

Automations publish content that is indistinguishable from an editor's: a revision is recorded first, relations and categories are filed, and on a client's own domain search engines are told. Workflows use the names they already have, slugs and labels, instead of looking up internal ids.

Security, Access, and Governance

Keys belong to one site, carry only the abilities granted, are hashed at rest, shown once, and record when they were last used. Fields marked internal cannot be written through the API. Form webhooks are signed over their timestamp as well as their body, so a captured request cannot be replayed.

Summary

With a scoped key and a signed webhook, n8n can publish to a Foundation CMS site and act on its enquiries, through the same door as the people who edit it.

Frequently asked questions

Can n8n publish directly to a Foundation CMS site?

Yes. The content API takes a create or update with a status of draft, published or scheduled, and saves it as an editor's save would.

Does the workflow need the CMS's internal ids?

No. Related entries can be given by slug and categories by label; Foundation CMS resolves them, and an unknown label creates the category.

How are images handled?

Upload them first through the media endpoint, which returns a key to put in the entry's image field.

How does n8n know a form webhook is genuine?

Each webhook is signed over its timestamp and body with a secret shown once, so the workflow can verify it and reject replays.

Want Foundation CMS and n8n
wired up for you?