Payload CMS

Interact with Payload CMS collections and globals

Overview

This node interacts with Payload CMS to perform operations on collections, globals, and authentication. Specifically, the 'Delete by ID' operation under the 'Collection' resource deletes a document from a specified collection by its document ID. This is useful for workflows that need to remove specific entries from a CMS collection, such as deleting outdated or incorrect content automatically.

Use Case Examples

  1. Deleting a blog post by its ID from the 'posts' collection.
  2. Removing a user record from the 'users' collection by specifying the user ID.

Properties

Name Meaning
Collection The specific collection in Payload CMS to operate on, e.g., posts, users, etc.
Document ID The unique identifier of the document within the collection to delete.
Additional Options Optional parameters to customize the request, such as depth of relationship population, pagination, sorting, filtering (where clause), selected fields, and locale for localized content.

Output

JSON

  • json - The JSON response from Payload CMS after deleting the document, typically containing confirmation or details of the deleted document.

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 specified collection or document ID does not exist. Verify the collection name and document ID are correct.
  • Malformed JSON in additional options like 'where' clause can cause request failures. Ensure JSON is valid and properly formatted.

Links

Discussion