Actions18
- Auth Actions
- Collection Actions
- Global Actions
Overview
This node interacts with Payload CMS to perform operations on collections, globals, and authentication. Specifically, the 'Create' operation under the 'Collection' resource allows users to create new documents within a specified collection by sending JSON-formatted data. This is useful for automating content creation workflows, such as adding new blog posts, products, or user-generated content to a Payload CMS instance.
Use Case Examples
- Creating a new blog post in a 'posts' collection by providing the post data in JSON format.
- Adding a new product entry to an e-commerce collection with detailed attributes.
- Automating user-generated content submission by creating documents in a 'comments' collection.
Properties
| Name | Meaning |
|---|---|
| Collection | The specific collection in Payload CMS where the new document will be created. This is selected from available collections loaded dynamically. |
| Data | The JSON-formatted data representing the new document to be created in the selected collection. |
| 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 created document's data.
Dependencies
- An API key credential for Payload CMS authentication
Troubleshooting
- Authentication failures due to invalid or expired API credentials. Ensure the API key or login credentials are correct and have not expired.
- Malformed JSON data in the 'Data' property can cause request failures. Validate JSON format before sending.
- Network or connectivity issues with the Payload CMS instance can cause request errors. Verify the base URL and network access.
- Errors from Payload CMS API such as permission denied or validation errors will be returned in the response. Check the error message for details and adjust the request accordingly.
Links
- Payload CMS API Documentation - Official documentation for Payload CMS API endpoints and usage.