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:- Click the connection dropdown.
- Select Add new connection.
- Enter your Strapi base URL, Content API token, and Read-only Admin token.
- Name your connection for easy identification.
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.
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.
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:- Click a field name under Article fields to add it.
- Enter a static value or use a placeholder from a previous step.
- To remove a field, click the trash icon on its row.
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
Formedia 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:- Terminate workflow: Stop the workflow as soon as the block fails.
- Continue execution: Ignore the failure and move on to the next step.
- 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.
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
mediafields.
What’s Next
- Read the Strapi integration guide to manage connections
- Learn about the Loop Block to process multiple items
- See Liquid Templating for data transformation
- Explore the LLM Block to generate content for Strapi
- Check the Human Review Block for approval workflows