Overview
This node integrates with the Payload CMS REST API to manage collection entries. Specifically, for the "Collection" resource and "Delete" operation, it deletes a document entry from a specified collection by its ID.
Common scenarios include:
- Removing outdated or incorrect content entries from a Payload CMS collection.
- Automating cleanup tasks where certain documents need to be deleted based on workflow conditions.
- Managing content lifecycle by programmatically deleting entries after publishing or archiving.
Example: Automatically delete a blog post entry from the "posts" collection when it is marked as obsolete in another system.
Properties
| Name | Meaning |
|---|---|
| Collection Slug | The unique slug identifier of the collection in Payload CMS where the entry resides. |
| Entry ID | The unique identifier of the document entry to delete within the specified collection. |
Output
The output JSON contains the response from the Payload CMS API after attempting to delete the entry. Typically, this will be an object representing the deleted document or a confirmation of deletion. If the API returns multiple documents (unlikely for delete), they would be output as separate items.
No binary data is output by this node.
Dependencies
- Requires an active connection to Payload CMS via an API key credential configured in n8n.
- The node uses the Payload CMS REST API endpoint corresponding to the collection slug and entry ID.
- No additional external dependencies beyond the Payload CMS API and n8n's HTTP request capabilities.
Troubleshooting
- Missing or incorrect Collection Slug: Ensure the slug matches exactly the collection configured in Payload CMS; otherwise, the API will return a not found error.
- Invalid Entry ID: If the entry ID does not exist, the API will respond with an error indicating the document was not found.
- Authentication errors: Verify that the API key credential is valid and has sufficient permissions to delete entries.
- Network issues: Check connectivity to the Payload CMS instance.
- Error message "Unknown operation": This indicates an unsupported operation was selected; ensure "Delete" is chosen for this use case.