Prepr icon

Prepr

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

Overview

This node integrates with the Prepr content management API to manage content items in different locales. Specifically, the Publish operation for the Item resource allows users to publish a content item in a specified locale, optionally scheduling the publish time.

Typical use cases include:

  • Publishing localized content items immediately or at a scheduled date/time.
  • Automating content workflows where items are published as part of a larger process.
  • Managing multi-locale content publishing from within an n8n workflow.

For example, you might use this node to publish a blog post in the "en-US" locale right away or schedule it to go live at a future date.

Properties

Name Meaning
Locale Name or ID Select the locale in which the item should be published. Choose from a list or specify an ID via expression.
Item ID The unique identifier of the content item to be published.
Publish On Optional date and time to schedule when the item should be published. If not set, defaults to immediate publishing.

Output

The node outputs a JSON array containing the response from the Prepr API after attempting to publish the item. The structure typically includes details about the published content item, such as its ID, locale, publish timestamp, and status.

No binary data is output by this node.

Example output snippet (simplified):

[
  {
    "id": "item-id",
    "locale": "en-US",
    "publish_on": 1686000000,
    "status": "published"
  }
]

Dependencies

  • Requires an API key credential for authenticating requests to the Prepr API.
  • The node makes HTTP PATCH requests to the Prepr REST API endpoint https://api.eu1.prepr.io/content_items/{itemId}/{locale}/publish.
  • The node expects the base URL and authentication to be configured properly in n8n credentials.

Troubleshooting

  • Publish operation failed: This error occurs if the API returns a non-200 status code during the publish request. Check that the Item ID and Locale are correct and that the API key has sufficient permissions.
  • Invalid or missing locale: Ensure the locale exists and is correctly selected or specified.
  • Scheduling issues: If specifying a Publish On date/time, ensure it is in a valid ISO format or a valid expression resolving to a date/time string.
  • Network or authentication errors: Verify that the API key credential is valid and that there is network connectivity to the Prepr API endpoints.

Links and References

Discussion