Prepr icon

Prepr

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

Overview

This node interacts with the Prepr content management API to update an existing content item. It is designed to modify specific fields of a content item for a given locale, manage its workflow stage, and optionally set publishing or unpublishing dates.

Common scenarios where this node is beneficial include:

  • Updating localized content fields in a CMS.
  • Changing the workflow status of a content piece (e.g., marking it as "In Progress" or "Done").
  • Scheduling when content should be published or unpublished.
  • Incrementally modifying content without replacing the entire item.

For example, you might use this node to update the text and images of a blog post in the French locale, set its workflow stage to "Review," and schedule it to be published next week.

Properties

Name Meaning
Locale Name or ID Select the locale for the content item update. Choose from a list of available locales or specify an ID using an expression.
Model Name or ID Select the item model (content type) to update. Choose from a list of models or specify an ID using an expression.
Item ID The unique identifier of the content item to update.
Workflow Stage Set the content workflow stage for the item in the selected locale. Options: Done, In Progress, Review, To Do, Unchanged.
Publish On Optional date/time to schedule when the content should be published. If not set, no change is made to the publish date.
Unpublish On Optional date/time to schedule when the content should be unpublished. If not set, no change is made to the unpublish date.
Content Fields A collection of key-value pairs representing the fields to update on the content item. Each field is identified by name or ID, and the value can be any JSON data. These fields will overwrite existing values for the locale.

Output

The node outputs an array of JSON objects representing the updated content items returned by the Prepr API. Each object contains the full state of the updated item including:

  • Updated localized fields under items.
  • Workflow stage information.
  • Publishing and unpublishing timestamps if set.
  • Other metadata as returned by the API.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating requests to the Prepr API.
  • Uses the Prepr GraphQL and REST endpoints (https://api.eu1.prepr.io and https://rest6.prepr.io) to fetch and update content items.
  • The node depends on n8n's HTTP request helper with authentication support.

Troubleshooting

  • Update operation failed: This error occurs if the API returns a non-200 status code during the update request. Check that the Item ID and Locale are correct and that the API key has sufficient permissions.
  • Empty content fields: If no content fields are provided or all are empty, the node skips updating that item. Ensure you provide at least one valid field to update.
  • Invalid JSON in content fields: Field values are parsed as JSON. Malformed JSON strings will be used as raw strings instead. Verify your input format.
  • API rate limits or network errors: Network issues or API throttling may cause failures. Retry or check API usage limits.
  • Workflow Stage "Unchanged": When set, the node preserves the current workflow stage instead of overwriting it.

Links and References

Discussion