Skip to main content

Overview

The Strapi block connects your workflows to your Strapi collections. Use it to create new entries, such as blog articles, or update existing ones with content generated from your workflow. By default, the block creates a new entry on every run. Choose a unique field to update a matching entry instead. You’ll find the Strapi block in the Apps section of the block palette.

Configuration

Strapi connection

Select the Strapi connection to use. You can connect multiple Strapi projects and choose which one to use for each block. To add a new connection:
  1. Click the connection dropdown.
  2. Select Add new connection.
  3. Enter your Strapi base URL, Content API token, and Read-only Admin token.
  4. Name your connection for easy identification.
A connection that needs new tokens shows Expired in the dropdown. For token setup, see the Strapi integration guide.
Selecting a different connection clears the collection, unique field, and article fields.

Collection

Choose the collection where entries are created or updated. Slate loads your collections and their fields with the connection’s read-only Admin token.

Unique field

The setting Select the field that uniquely identifies an article (or any item in your Strapi collection) controls whether the block creates or updates.
  • None: The block creates a new entry on every run.
  • A field: The block looks for an entry whose value in that field matches the value you map. If a match exists, Slate updates that entry. Otherwise, it creates one.
Slate adds the selected field to Article fields, and uses its mapped value for the lookup. The lookup checks both draft and published entries. When you choose a collection, Slate preselects the collection’s first unique field if it has one. Fields marked (unique) are unique in your Strapi schema. Choose a field marked (unique), such as a slug.

Publication status

Choose whether entries are saved as drafts or published.
  • Draft (default): The entry is saved as a draft for review in Strapi.
  • Publish: The entry is published immediately.
This setting appears only when the collection has Draft & Publish turned on. Otherwise the block shows “This collection publishes immediately because Draft & Publish is disabled.”

Article fields

Map your workflow data to collection fields. You need at least one mapping. Fields are generated from the selected collection’s schema. Adding fields:
  1. Click a field name under Article fields to add it.
  2. Enter a static value or use a placeholder from a previous step.
  3. To remove a field, click the trash icon on its row.
Each row shows the field name and its Strapi type. System fields such as id, documentId, createdAt, updatedAt, and publishedAt aren’t listed. How Slate formats values:

Blocks fields

Rich text fields of type Blocks have a format option:
  • Markdown → Blocks (default): Converts Markdown into Strapi Blocks.
  • HTML → Blocks: Converts HTML into Strapi Blocks.
  • Blocks JSON: Sends a JSON array of blocks as is.

Images

For media fields, Slate uploads the image at the URL you provide to your Strapi media library and links it. In text fields, Slate also uploads images referenced in Markdown or HTML and replaces their URLs. Images must be 20 MiB or smaller. If an image in a text field fails to upload, the entry is still saved and imageWarnings in the output lists the problem. Example mapping:

Output

The Strapi block returns information about the created or updated entry.
created is false when the block updated an existing entry. Access the entry’s admin link in subsequent steps using {{step_n.output.adminUrl}}.

Error Handling

Define what happens if the block fails. Options:
  1. Terminate workflow: Stop the workflow as soon as the block fails.
  2. Continue execution: Ignore the failure and move on to the next step.
  3. Retry: Run the block again until it succeeds, up to the Number of retries you choose (1–5). If every retry fails, the workflow stops at this block.
Common errors and solutions: When Strapi rejects a value, the error message names the field.

Best Practices

  • Keep Publication status on Draft while you test the workflow.
  • Choose a unique field, such as a slug, so repeat runs update entries instead of creating duplicates.
  • Use Markdown → Blocks for LLM output in Blocks fields.
  • Use publicly reachable image URLs for media fields.

What’s Next