Strapi
Strapi is the next-gen headless CMS, open-source, JavaScript/TypeScript, enabling content-rich experiences to be created, managed and exposed to any digital device.
Localization concept
In Strapi, localization is referred to as internationalization
and is managed through the i18n
plugin. To configure languages in your Strapi instance:
- Navigate to
Settings > Internationalization
- Add the languages you want to support
- Set your default language
When working with content types, you must explicitly enable localization for specific fields:
- Go to the content type editor
- Open the ‘Advanced Settings’ tab for the desired field
- Enable the localization option
This configuration is crucial because without properly localizing fields, any translations uploaded will update content across all languages instead of only the selected language.
Before setting up
Before you connect your Strapi instance to Blackbird, make sure you have the following:
- A Strapi instance running on a public accessible URL.
- API token for the Strapi instance. You can create an API token in the Strapi Settings > API Tokens section. Make sure to give the token the necessary permissions to access the content you want to use in Blackbird. Typically we reommend using the ‘Full access’ token type. Also, setup the token duration to be ‘Unlimited’ to avoid having to update the token in Blackbird every time it expires.
Connecting
- Navigate to apps and search for Strapi
- Click Add Connection
- Name your connection for future reference e.g., ‘My Strapi’
- Fill in the following fields:
- Base URL: Your AEM base URL (e.g.,
https://my-strapi-instance.com
) - API Token: Your Strapi API token (see the previous section)
- Base URL: Your AEM base URL (e.g.,
- Click Connect
- Confirm that the connection has appeared and the status is Connected
Please note that if the connection is successfully created, it doesn’t necessarily mean it is valid. At this stage, we only check whether the base URL exists — we cannot validate the API token. You can verify that the connection is fully valid only within the Bird, using actions or events.
Actions
- Search content: Returns a list of content based on specified inputs. Only for collection types content types.
- Download content: Downloads content by ID as an HTML file. By default, downloads the published version.
- Upload content: Uploads an HTML file to localize content for a specific language. This action has an optional
Strapi version
input to specify which version of the content to update (default is the v5). If you are using Strapi v4, you can set theStrapi version
input tov4
to ensure compatibility. - Delete content: Deletes content by ID.
Events
- On content created or updated: Polling event that periodically checks for new or updated content. Returns a list of content items if new or updated content is found.
- On content published: Polling event that periodically checks for newly published content. Returns a list of content items if newly published content is found.
Example
Here’s a simple example of how to use the Strapi app in a Blackbird workflow:
This bird is triggered when a content is published in Strapi. It then downloads the content, translates it using a DeepL
app, and finally uploads the translated content back to Strapi.
Known Limitations
There is no way to retrieve a list of content types from the API, so it’s not possible to provide a dropdown list for the Content type ID input. Unfortunately, it’s the client’s responsibility to enter the content types manually as plain text.
You can get the content type ID from the Strapi UI. Typically, multiple content types will look like: 'users'
, 'articles'
, 'pages'
, and so on.
Feedback
Do you want to use this app or do you have feedback on our implementation? Reach out to us using the established channels or create an issue.