Actions18
- Auth Actions
- Collection Actions
- Global Actions
Overview
This node interacts with Payload CMS to update a specific document within a collection by its ID. It is useful for scenarios where you need to modify existing content in a Payload CMS collection, such as updating user profiles, blog posts, or product details. For example, you can update a blog post's title or content by specifying the collection, document ID, and the new data in JSON format.
Use Case Examples
- Updating a user profile in the 'users' collection by providing the user ID and new profile data.
- Modifying a blog post in the 'posts' collection by specifying the post ID and updated content.
Properties
| Name | Meaning |
|---|---|
| Collection | The specific Payload CMS collection to operate on, e.g., users, posts. |
| Document ID | The unique identifier of the document within the collection to update. |
| Data | The JSON-formatted data representing the fields and values to update in the document. |
| Additional Options | Optional parameters to control the request such as depth of relationship population, pagination, sorting, filtering, field selection, and locale for localized content. |
Output
JSON
json- The JSON response from Payload CMS containing the updated document data.
Dependencies
- Requires an API key credential for Payload CMS to authenticate requests.
Troubleshooting
- Authentication failures due to invalid or expired API credentials. Ensure the API key is correct and has necessary permissions.
- Invalid document ID errors if the specified ID does not exist in the collection.
- Malformed JSON data errors if the 'Data' input is not valid JSON format.
- Network or connectivity issues preventing access to the Payload CMS instance.
Links
- Payload CMS API Documentation - Update by ID - Official documentation for updating a document by ID in Payload CMS collections.