Payload CMS

Interact with Payload CMS collections and globals

Overview

This node interacts with Payload CMS to find a document by its ID within a specified collection. It is useful for retrieving detailed information about a single document when you know its unique identifier. For example, you can use it to fetch user profiles, blog posts, or product details by their IDs.

Use Case Examples

  1. Retrieve a blog post by its document ID to display on a website.
  2. Fetch a user profile by ID for editing or display in an admin panel.

Properties

Name Meaning
Collection The specific collection in Payload CMS to operate on, such as users, posts, or products.
Document ID The unique identifier of the document to find within the selected collection.
Additional Options Optional parameters to customize the query, including depth of relationship population, pagination (limit and page), sorting, filtering (where clause), field selection, and locale for localized content.

Output

JSON

  • json - The JSON response containing the document data retrieved by its ID from the specified collection.

Dependencies

  • Requires an API key credential for Payload CMS to authenticate requests.

Troubleshooting

  • Common issues include authentication failures due to invalid or expired API tokens. Ensure credentials are correct and the Payload CMS instance is accessible.
  • Errors may occur if the document ID does not exist in the specified collection, resulting in empty or error responses.
  • Malformed JSON in the 'Where' filter option can cause request failures; ensure valid JSON format.

Links

Discussion