Prepr icon

Prepr

Interact with the Prepr API to create, update or delete items.

Overview

This node integrates with the Prepr API to manage content items within a content management system. Specifically, the Create operation for the Item resource allows users to create new content items in a specified locale and model type, set their workflow stage, schedule publishing and unpublishing dates, and define custom content fields.

Typical use cases include:

  • Automating content creation workflows by programmatically adding new articles, blog posts, or product descriptions.
  • Creating localized versions of content items for different markets or languages.
  • Scheduling content publication and expiration directly from an automated workflow.

For example, a marketing team could use this node to automatically generate new promotional content items in multiple locales, setting them to publish at specific future dates.

Properties

Name Meaning
Locale Name or ID Select the locale (language or region) for the content item. Choose from a list of available locales or specify an ID using an expression.
Model Name or ID Select the content model (item type) to use for the new item, such as "Article" or "Product". Choose from a list or specify an ID via expression.
Workflow Stage Set the content workflow stage for the item. Options are: Done, In Progress, Review, To Do, Unchanged. This indicates the current status in the editorial process.
Publish On Optional date/time to schedule when the item should be published. If not set, the item is not scheduled for automatic publishing.
Unpublish On Optional date/time to schedule when the item should be unpublished or expired.
Content Fields A collection of key-value pairs defining the actual content fields for the item. Each field is selected from the model's available fields, and its value can be provided as JSON or plain text. Multiple fields can be added.

Output

The node outputs an array of JSON objects representing the created content items as returned by the Prepr API. Each object contains details about the newly created item, including its identifiers, locale-specific data, workflow stage, and timestamps related to publishing.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating requests to the Prepr API.
  • The node makes HTTP POST requests to https://rest6.prepr.io/content_items endpoint to create items.
  • The node uses GraphQL queries internally to load options for locales, model types, and fields dynamically.
  • Proper configuration of the API authentication credential in n8n is necessary.

Troubleshooting

  • Create operation failed: This error occurs if the API response status code is not 201 (Created). Common causes include invalid locale or model IDs, missing required fields, or authentication issues. Verify that all required properties are correctly set and that the API key is valid.
  • Empty content fields: If no content fields are provided or all values are empty, the node skips creating the item. Ensure you provide at least one valid content field with a proper value.
  • Invalid JSON in content fields: Content field values are parsed as JSON if possible. Malformed JSON strings will be treated as plain text, but complex structures should be valid JSON to avoid unexpected results.
  • API rate limits or network errors: Network connectivity issues or API rate limiting may cause request failures. Check your network connection and API usage limits.

Links and References

Discussion