> ## Documentation Index
> Fetch the complete documentation index at: https://slatehq.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Strapi

> Connect your Strapi project to Slate and create or update collection entries from your workflows.

The Strapi integration connects Slate workflows to the collections in your Strapi project. Use it to save AI-generated content as draft or published entries, and to update existing entries instead of creating duplicates.

## Why connect Strapi to Slate?

Slate generates content through AI-powered workflows. Strapi stores and serves your content. Connecting the two moves content from generation into your Strapi collections in a single automated flow.

## Prerequisites

* The **Admin** role in your Slate workspace. Members can view integrations but can't connect them.
* A Strapi 5 project served from a public HTTPS URL
* Two Strapi tokens: a Content API token and a read-only Admin token

## Setup

### Step 1: Create your Strapi tokens

Slate uses two tokens, each for a different job:

| Token | What Slate uses it for |
| - | - |
| Content API token | Creating and updating entries, and uploading media |
| Read-only Admin token | Reading your collections and their fields |

The connect dialog shows where to create each token and which permissions it needs:

* **Content API token:** "Strapi → Settings → API Tokens. Needs Article find/create/update/publish and Upload find/create."
* **Read-only Admin token:** "Strapi → Settings → Administration Panel → Admin Tokens → Plugins → Content-Type Builder → Read."

<Warning>The Admin token must be read-only. Slate only uses the Admin token to read your collections and schemas.</Warning>

### Step 2: Connect Strapi in Slate

1. Open Slate and go to **Workspace settings → Integrations**.
2. Under **More integrations**, find **Strapi** and click **Connect**.
3. Optionally, enter a **Connection name** (e.g., "Company Blog").
4. Enter your Strapi root URL in **Strapi base URL**, for example `https://cms.example.com`. Don't add `/admin` or `/api`.
5. Paste your Content API token into **Content API token**.
6. Paste your read-only Admin token into **Read-only Admin token**.
7. Click **Connect**.

Slate checks both tokens before it saves the connection. It reads your collections with the Admin token and reads your media library with the Content API token. If both checks pass, the row shows **Connected**.

### Step 3: Use the connection in a workflow

1. Open or create a workflow.
2. Add the **Strapi** block from the **Apps** section.
3. Select your connection in **Strapi connection**.
4. Choose a **Collection**.
5. Map your workflow data to the collection's fields under **Article fields**.

For full details on configuring the Strapi block, see the [Strapi Block guide](/docs/workflows/blocks/apps/strapi).

## What you can do

Once connected, the Strapi integration enables the following through the Strapi workflow block:

| Capability | Description |
| - | - |
| **Create entries** | Add a new entry to any collection in your project |
| **Update existing entries** | Match an entry on a unique field, such as a slug, and update it instead of creating a duplicate |
| **Draft or publish** | Save entries as drafts (the default) or publish them |
| **Convert rich text** | Turn Markdown or HTML into Strapi Blocks |
| **Upload images** | Send hosted images to your Strapi media library |
| **Connect multiple projects** | Add a connection for each Strapi project you use |

## Use cases

### AI-powered blog publishing

Generate blog posts with the LLM block, then save them to your Strapi articles collection as drafts.

**Example flow:** Input keywords → LLM generates article → Strapi block saves a draft entry

### Content refreshes

Rewrite existing articles and update them in place. Match on the article's slug so the block updates the entry instead of creating a new one.

**Example flow:** List of slugs → Loop block iterates slugs → LLM rewrites content → Strapi block updates each entry

### Publishing with approval

Use the Human Review block to get sign-off before content goes live.

**Example flow:** LLM drafts case study → Human Review for approval → Strapi block publishes the entry

## Managing connections

### View connections

Go to **Workspace settings → Integrations** to see your Strapi connections. Each connection shows **Connected** or **Needs attention**.

### Fix a connection that needs attention

A connection shows **Needs attention** when Slate marks it invalid. To fix it:

1. Create new tokens in Strapi as described in [Step 1](#step-1-create-your-strapi-tokens).
2. Open the **⋮** menu on the **Strapi** row and choose **Add another connection**.
3. Enter the base URL, paste both tokens, and click **Connect**.
4. In each Strapi block that used the old connection, select the new connection.
5. Remove the old connection.

<Note>Selecting a different connection in a Strapi block clears the block's collection, unique field, and field mappings. Set them again after you switch.</Note>

### Remove a connection

Open the **⋮** menu on the **Strapi** row and choose **Disconnect**. If you have more than one connection, expand the row and click **Remove** next to the connection. Workflows that use the removed connection need a new one.

## Troubleshooting

| Issue | Cause | Solution |
| - | - | - |
| "Strapi base URL must be a public HTTPS origin without a path or credentials" | The URL uses `http`, or includes a path such as `/admin` or `/api` | Enter only the root URL, such as `https://cms.example.com` |
| "Strapi base URL must use a public hostname" | The URL points to `localhost` or a private network | Use the public URL of your Strapi project |
| Connection fails when you click **Connect** | A token is invalid or missing a permission | Check both tokens against the hints in [Step 1](#step-1-create-your-strapi-tokens) |
| An error ends with "Check the token permission required for this Strapi operation." | Strapi refused the request | Add the missing permission to the token in Strapi |
| **Collection** list is empty in the block | The Admin token was revoked or lost its read permission | Create a new read-only Admin token and [connect again](#fix-a-connection-that-needs-attention) |

## What's next

* [Strapi Block](/docs/workflows/blocks/apps/strapi) — detailed guide on configuring the Strapi workflow block
* [Building Workflows](/docs/workflows/building-workflows) — learn how to create workflows from scratch
* [Loop Block](/docs/workflows/blocks/flow/loop) — process multiple items in a workflow
* [Human Review Block](/docs/workflows/blocks/flow/human-review) — add approval steps before publishing


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.