Using CMS AI Agent with Contentful
Everything you need for Contentful, in the order you will actually do it. If you are stuck, the last section has the real error messages and what each one means.
Switch these on first
- A Contentful space with a content model in it — at least one content type with a field for the title. CMS AI Agent reads the model you designed and works with what is there; it will not design one for you.
- A Content management token, from Settings → API keys → Content management tokens. This is not the same thing as a Content Delivery API key: the delivery key can only read, and Contentful will refuse it here.
- A role in the space that can do what you want done. A token carries the rights of the person who created it, so a token made by a colleague with a read-only role makes a read-only connection, however it is used.
- A decision about which environment you want managed — master, staging, or whatever you called yours. One connection is one environment, and it comes from the address you paste.
Connecting your website
- In Contentful, open the space and the environment you want managed, and copy the address out of your browser. It looks like https://app.contentful.com/spaces/… — that is what you paste here, not your own website’s address.
- We read the space id and the environment name out of that address and show you both, so you can see which copy of your content this connection will touch before anything happens.
- Paste the management token. It is stored encrypted, it is never put into an AI prompt, and you can revoke it in Contentful at any time without changing anything else about the space.
- We check the token against that environment by name, straight away. If the environment does not exist we tell you which ones do, rather than leaving you with a token that looks broken.
- Choose which content type holds your articles, and which of its fields is the title — and the body and the summary if it has them. Contentful spaces are all built differently, so there is nothing to guess from: we read your content types and you pick.
What you can ask for on Contentful
-
Read content
Looking at what is already on the website: the list of pages and posts, who wrote each one, when it last changed, whether it is published, and the full text of any one of them.
"Which pages have not been touched in over a year?"
-
Create content
Adding something that was not there before: a new page, a new post, a new entry of whatever kind your website uses. It arrives as a draft, with a title, the body text and a short summary, ready for you to read before anyone else can.
"Add a page about our new opening hours and leave it as a draft."
-
Edit content
Changing something that is already there: the title, the body text, the summary. You are told exactly which items were touched, and your website keeps its own history of what they said before.
"Change the phone number on the Contact page to the new one."
-
Publish content
Moving something between draft, published and private. This is the step that decides whether the public can see a page, which is why it is a thing you ask for on purpose rather than something that happens on the way past.
"Publish the draft about the Saturday market."
-
Schedule content
Setting a date and a time in the future for something to appear, so a post written on a Tuesday afternoon goes live on Monday morning with nobody at a keyboard.
"Set the Christmas opening hours post to go live on the first of December."
-
Manage images and files
Putting images and files onto the website and filling in the text that belongs with them: the title, the caption, and the alt text that a screen reader speaks and a search engine reads in place of the picture.
"Put last week's photos into the gallery and write alt text for each one."
-
Manage categories and tags
Organising content so people can find it: which category a post sits in, which tags it carries, and creating a new category or tag where there is a real need for one.
"Put all the recipe posts into the Recipes category."
-
Custom content types
Few websites hold only pages and posts. A property site has properties, a restaurant has dishes, a school has courses. This is working with those, in their own fields, instead of forcing everything to be a blog post.
"Add a new dish to the menu: the name, the description and the price."
-
Site information
The plain facts about the website: what it is called, what software and which version it runs, how many pages and posts it holds, which languages it is written in, and when it last changed.
"How many pages does my website have, and when was each one last updated?"
-
Administrative information
What is installed, what has an update waiting, and who has an account on the website. Reads only: it cannot install, update, activate or remove a plugin or theme, change a setting, or add or change a user.
"Is anything on my website waiting for an update?"
What it will not do on Contentful
Contentful has no way to do this, so this agent does not offer it. What it would have meant:
-
Edit SEO information
The text that does not appear on the page but decides how the page looks in a search result and when somebody shares it: the SEO title, the description under it, and the alt text on images.
-
Manage menus
The menus a visitor clicks: adding an item, renaming one, putting them in a different order, moving one underneath another.
-
Bulk changes
The same change across many items at once. Nothing happens straight away: you are shown the whole list first, with the value as it is now beside the value proposed for it, and it runs only after you have said yes. It can be stopped partway and it can be undone.
-
Manage redirects
Sending an old address to a new one, so a link somebody saved or a result still sitting in Google lands on the right page instead of an error. It can also list everything that is already being sent somewhere else.
Worth knowing about Contentful
- Publishing an entry is not the same as putting a page on your website. It makes the entry available through Contentful’s delivery API. When a visitor actually sees it depends on the site you built on top of the space: straight away if the site reads Contentful live, after the next build if it is a site that gets rebuilt, and not at all until somebody rebuilds it. We cannot see your site, so we never say something is live.
- Nothing is published unless you ask for it. A new entry is a draft by Contentful’s own design — there is no status to remember and no default to be caught out by — so an assistant asked to write something cannot put it in front of the public by accident.
- Scheduling is real here, which is worth saying because on several platforms it is not. Contentful holds the booking itself and publishes the entry at the moment you chose, whether or not anything of ours is running. Ask for a scheduled entry to become a draft again and we cancel the booking too, so it cannot publish itself later.
- A connection is pinned to one environment and nothing can move it — no assistant, no instruction, no tool. To manage master and staging, connect the space twice, as two websites. If your master is an alias pointing at another environment, we say so when you connect, because writing to the alias writes to whatever it points at that day.
- There are no menus, no redirects and no SEO fields in Contentful, and that is not something we could add later. They belong to the website you built on top of the space, which we have never seen. If your content type has a description field somebody added for SEO, tell us which one when you connect and we will write it.
- Alt text on an image is Contentful’s description field, which every asset has. Whether your website prints it as the alt text is a decision your front end made when it was built; we write the field, which is the only place on this platform that the text belongs.
When something goes wrong
The failures people actually meet, with the exact words CMS AI Agent will show you. The message is in English wherever you are, because that is what the software says.
You pasted your website’s address and we said it is not a Contentful space.
What you will see
What to do
Contentful is not at your own address, and this is the commonest mistake here by a long way — you have a website as well as a space, and the website is the one that feels like yours. Open the space in Contentful and copy the address from the browser bar instead. It contains the space id, and the environment name if you are looking at one.
The token is refused, and you are certain you copied it in full.
What you will see
What to do
Almost always a Content Delivery API key pasted where a management token belongs. Both live under Settings → API keys, which is why they get mixed up: the delivery keys are on the first tab and can only read, and the one you need is on the Content management tokens tab of the same screen. A personal token can also be given an expiry date, so one that worked last month may simply have run out.
Everything fails, and the space id looks right to you.
What you will see
What to do
The environment name is the usual cause. A space starts with one environment called master, and a name like `production` or `live` that somebody expected to be there often is not — so we list the environments the space really has and you reconnect with the right one. The other possibility is that the token’s owner has no role in this space at all, in which case Contentful hides the space rather than refusing it, and the message says so.
Reading works and every attempt to write is refused — or the space cannot be reached at all.
What you will see
What to do
A management token has exactly the rights of the person who made it, and nothing about the token itself says what those are. Check that person’s role under Settings → Users in Contentful: an Editor can publish, a role built for reading cannot write at all, and somebody with no role in the space cannot see it. Either have the role changed, or ask a colleague who has the right one to make the token.
The space connects, and then everything says the website has not been set up yet.
What you will see
What to do
Contentful has no such thing as an article: it has whatever content types you designed, and until you say which one holds your articles there is nowhere for us to write. Open the website in your dashboard and choose the content type and the field that holds its title. The body and the summary are optional, and a field you do not map is a field we will not write to.
You asked for redirects, a search engine check or a meta description, and were told Contentful does not have it.
What you will see
What to do
That answer is correct and it is not a fault in either product. A redirect is a rule on a web server, a sitemap is a file a website serves, and a meta description is a tag a page prints — Contentful does none of those things, because it stores content and renders nothing. All three belong to the front end you built, and the only one with a way round it is the meta description: if your content type has a field for one, map it when you connect and we will write that field.
A long job stops part way through with a message about slowing down.
What you will see
What to do
Contentful allows seven requests a second on a management token, and one question here is often three or four requests — the entries, the space’s languages, what is scheduled. The message tells you how many seconds to wait, because Contentful tells us. Wait that long and ask again; a higher limit comes with some Contentful plans.