1. Overview
Strapi is a leading open-source headless CMS that allows developers to build customizable APIs and manage content easily. It provides a flexible structure for defining content types and exposes them via REST or GraphQL APIs.
The Strapi node in GoInsight enables you to seamlessly integrate Strapi's content management capabilities into your automation workflows. You can perform full lifecycle management of your content entries, including:
- Creating new content entries for specific content types.
- Retrieving individual entries or listing multiple entries with pagination.
- Updating existing entries with partial data.
- Deleting entries using their unique identifiers.
2. Prerequisites
Before using this node, please ensure you meet the following requirements:
- Strapi Instance: You must have access to a running Strapi instance (v4 or v5).
- User Account or API Token: You need a valid user account (Email/Password) or an API Token with appropriate permissions configured in the Strapi Admin Panel.
- Content Types: You should know the API ID (slug) of the content types you wish to manage (e.g., articles, products).
3. Credentials
For detailed guidelines on how to acquire and configure credentials, please refer to our official documentation: Credential Configuration Guide.
4. Supported Operations
Summary
This node primarily operates on the Entry resource, allowing you to manage content within your Strapi CMS.
| Resource | Operation | Description |
|---|---|---|
| Entry | Get an Entry | Retrieve a single entry of a specified Content-Type from Strapi via the REST API. |
| Entry | Get Many Entries | Retrieves multiple entries from Strapi. |
| Entry | Create an Entry | Creates a new entry for a specified content-type in Strapi via the REST API. |
| Entry | Update an Entry | Updates an existing entry by ID for a specified content-type in Strapi via the REST API. |
| Entry | Delete an Entry | Deletes an entry by ID for a specified content-type in Strapi via the REST API. |
Operation Details
Get an Entry
Retrieve a single entry of a specified Content-Type from Strapi via the REST API.
Applicable Scenarios:
Get the details of an article/product by a known ID
Read CMS content for processing in workflows
Verify the existence of an entry
Prerequisites:
The slug of the Content-Type is known (retrievable via the 'Get Content Types' API)
The documentId of the entry is known (retrievable via the 'List Entries' API or creation API)
Input Parameters:
- ContentType: The API identifier (slug) of a content type. Use the plural form of the API ID (e.g., 'articles', 'products', 'restaurants'). How to obtain: View in Strapi admin panel's Content-Type Builder or call 'Get Content Types' API. Note: The identifier is case-sensitive.
- DocumentId: Unique identifier of an entry (Document ID), usually a random string (e.g., 'abc123xyz456') or UUID. How to obtain: Get the 'documentId' field from Create Entry API response or query via List Entries / Search Entries APIs. Note: Strapi v5+ uses 'documentId' (string), while Strapi v4 uses numeric 'id'. This Action supports v5 only.
Output:
- Entry (object): The complete entry object returned by Strapi. Structure varies by Content-Type. Common fields: id (number), documentId (string), attributes (object), createdAt (string), updatedAt (string), publishedAt (string), locale (string), localizations (object).
- RetryAfter (number): Suggested wait time in seconds before retrying. Only returned when encountering 429 Rate Limit error (optional field).
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Get Many Entries
Retrieves multiple entries from Strapi. Authentication: Supports two methods (choose one):
- API Token (Recommended): Use Strapi API credential with Bearer token
- Email/Password: Use Strapi Author credential for user-based authentication
If both are configured, API Token takes priority.
Input Parameters:
- ContentType: The API identifier (slug) of a content type. Must use the plural form of the API ID, not the display name. Common examples: 'articles' (not Article), 'products' (not Product), 'restaurants'. How to obtain: 1) View in Strapi Admin Content-Type Builder (API ID shown on left), or 2) Call 'Get Content Types' API to retrieve the complete list.
Options:
- Limit: The maximum number of entries to return per page. Must be a positive integer. Default: 50. Maximum recommended: 100 (larger values may cause performance issues). Works with Page parameter: e.g., Limit=50 & Page=2 retrieves entries 51-100.
- Page: The page number to retrieve (starts from 1). Used with Limit to paginate through results. Example: Page=2 with Limit=50 retrieves entries 51-100.
Output:
- Entries (object-array): A list of entry objects returned by Strapi. Each entry contains: id (number, unique identifier), attributes (object, content fields defined in content-type schema). Common attributes fields: createdAt (string, ISO 8601 timestamp), updatedAt (string, ISO 8601 timestamp), publishedAt (string, ISO 8601 timestamp if published), plus custom fields depending on your content-type definition (e.g., title, slug, content for articles). Note: The exact structure of attributes varies by content-type. Use Strapi Admin Panel to view field definitions.
- Pagination (object): Pagination metadata object containing: page (number, current page number starting from 1), page_size (number, number of entries per page), page_count (number, total number of pages), total (number, total number of entries matching criteria), has_more (boolean, indicates if there are more pages to fetch). Usage example: When has_more=true, increment the Page parameter to fetch more data.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Create an Entry
Creates a new entry for a specified content-type in Strapi via the REST API.
Authentication Priority:
This action supports two authentication methods. If both are configured, they will be used in the following order:
- API Token (Recommended): Uses the 'Strapi API' credential. If the API Token is invalid or empty, the system will automatically fall back to Email/Password.
- Email/Password (Fallback): Uses the 'Strapi Author API' credential. Requires a registered user account in Strapi.
How to obtain credentials:
- API Token: Generate in Strapi admin panel → Settings → API Tokens → Create New Token. Choose 'Full access' or appropriate permissions.
- Email/Password: Use an existing Strapi user account (created via admin panel or /api/auth/local/register endpoint).
Note: If authentication fails with both methods, the action will return StatusCode -1 with error message "Invalid access_token."
Input Parameters:
- ContentType: The API identifier (also called 'slug' or 'API ID') of a content type. This is the technical name used in API calls, usually in plural form. For example: 'articles', 'products', 'restaurants'.
Options:
- Data: Entry data as key-value pairs. Field names are case-sensitive.
Output:
- CreatedEntry (object): The created entry object returned by Strapi API. Contains all fields defined in your content-type schema. Standard fields include id, documentId, createdAt, updatedAt, publishedAt. Content-type specific fields vary by schema.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Update an Entry
Updates an existing entry by ID for a specified content-type in Strapi via the REST API. Update Strategy: This action uses PUT method but only updates the fields you provide (partial update). Fields not included in UpdateData will retain their original values. This is Strapi's default behavior.
Input Parameters:
- ContentType: The API identifier (slug) of a content type (case-sensitive). This is the API name (plural form) used in Strapi REST API endpoints, not the display name.
- DocumentId: Unique identifier of an entry (Document ID, similar to database primary key). It is usually a random string (e.g. 'abc123xyz456') or UUID format.
- UpdateData: ⚠️ Important: This is partial update (PATCH behavior), not full replacement! Only the fields you provide will be updated. Fields not included will retain their original values.
Output:
- UpdatedEntry (object): The complete updated entry object returned by Strapi API. Contains all fields of the content-type (both updated and unchanged).
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
Delete an Entry
Deletes an entry by ID for a specified content-type in Strapi via the REST API.
Input Parameters:
- ContentType: The API ID of the content type (e.g., 'articles', 'products').
- DocumentId: Unique identifier of an entry (Document ID). Usually a random string (e.g., 'abc123xyz456') or UUID.
Output:
- Deleted (bool): Indicates whether the entry was successfully deleted. Returns true if entry was permanently deleted (200/204) or already doesn't exist (404). Returns false if deletion failed due to permission error, validation error, etc.
- OriginalStatusCode (number): The original HTTP status code returned by the upstream API. Use for debugging.
- StatusCode (number): Operation status code: 200=Success (check ErrorMessage for business errors), -1=Parameter validation error, 500=System error (may retry).
- ErrorMessage (string): Detailed error message if any error occurred. Empty string if the operation succeeded.
5. Example Usage
This section guides you through a common scenario: creating a new blog post entry in your Strapi CMS.
Scenario: You want to automate the creation of a new article in your "Articles" collection.
Workflow Overview: Start -> Strapi (Create an Entry) -> Answer
Step-by-Step Guide:
- Add Tool Node:
- Click the "+" button on the workflow canvas.
- Select the "Tools" tab.
- Search for and select Strapi.
- Choose the Create an Entry action.
- Configure Node:
- Click the new Strapi node to open the configuration panel.
- Credentials: Select your configured Strapi API Token or Author credentials.
- ContentType: Enter the plural API ID of your content type. For example, if your content type is named "Article", enter articles.
- Data: Enter the JSON object representing your new entry. Ensure the field names match your Strapi schema exactly.
- Example:
{ "title": "My First Automated Post", "content": "This content was generated via GoInsight.", "publishedAt": "2024-05-20T10:00:00.000Z" } - Run and Verify:
- Click "Run" to execute the workflow.
- Check the logs. You should see a successful response containing the CreatedEntry object with a new id and documentId.
- Verify in your Strapi Admin Panel that the new article has appeared.
Summary: After completing these steps, your workflow will be able to programmatically create content in Strapi, which can be triggered by various events or schedules.
6. FAQs
Q: Why am I getting a 403 Forbidden error?
A: This usually indicates a permission issue. Please check the following:
- API Token: Ensure your API Token in Strapi Settings has "Create" or "Full Access" permissions for the specific Content-Type you are trying to access.
- Public/Authenticated Roles: If using user authentication, ensure the user's Role has the necessary permissions checked in "Settings > Users & Permissions Plugin > Roles".
Q: What is the difference between id and documentId?
A: Strapi versions handle IDs differently:
- Strapi v4: Uses a numeric id (e.g., 1, 2).
- Strapi v5: Uses a string-based documentId (e.g., fk39dk...) for public API interactions.
- Note: This node is optimized for Strapi v5 but attempts to handle v4 where possible. Always check your specific Strapi version's documentation.
Q: Why is my entry created as a Draft?
A: Strapi's Draft & Publish system is enabled by default for many content types.
- To publish immediately: Include a publishedAt field in your input Data with a valid ISO 8601 timestamp (e.g., "publishedAt": "2024-01-01T12:00:00Z").
- To keep as draft: Omit the publishedAt field or set it to null.
Leave a Reply.