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 manage content items localized by different locales. Specifically, the Unpublish operation for the Item resource allows users to unpublish a content item for a specified locale at a given date and time.

Typical use cases include:

  • Scheduling content to be unpublished automatically after a certain date/time.
  • Manually unpublishing content items in specific locales when they are no longer relevant or should be hidden from public view.
  • Managing multi-locale content lifecycle within a content workflow.

For example, you might use this node to unpublish a promotional article in the French locale on a specific date after a campaign ends.

Properties

Name Meaning
Locale Name or ID Select the locale for which the item will be unpublished. Choose from a list or specify an ID.
Item ID The unique identifier of the content item to unpublish.
Unpublish On The date and time when the item should be unpublished. If not set, defaults to the current time.

Output

The node outputs a JSON array where each element corresponds to the response from the Prepr API for the unpublish request. The JSON structure typically contains details about the unpublished content item, such as its ID, locale, and unpublish timestamp.

No binary data is output by this node.

Dependencies

  • Requires an API key credential configured in n8n to authenticate requests against the Prepr API.
  • The node makes HTTP PATCH requests to the Prepr REST API endpoint https://api.eu1.prepr.io/content_items/{itemId}/{locale}/unpublish.
  • The node expects the Prepr API to respond with standard HTTP status codes and JSON bodies.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Providing an incorrect or non-existent Item ID or Locale will result in errors from the API.
    • Date/time format issues for the "Unpublish On" property may cause unexpected behavior; ensure ISO 8601 format or valid date-time input.
  • Error messages:

    • "Unpublish operation failed": This error is thrown if the API response status code is not 200. Check that the item ID and locale exist and that the API key has sufficient permissions.
    • Network or connectivity errors: Ensure that n8n can reach the Prepr API endpoints and that there are no firewall restrictions.
  • Resolution tips:

    • Verify API credentials and permissions.
    • Double-check the item ID and locale values.
    • Use expressions carefully to provide valid date/time values.
    • Review API documentation for any rate limits or additional requirements.

Links and References

Discussion