Actions118
- Item Actions
- Activity Actions
- Asset Actions
- Authentication Actions
- Collection Actions
- Extension Actions
- Field Actions
- File Actions
- Folder Actions
- Permission Actions
- Preset Actions
- Relation Actions
- Revision Actions
- Role Actions
- Server Actions
- Setting Actions
- User Actions
- Utility Actions
- Webhook Actions
Item → Create Multiple
AI-generatedOverview
This node operation allows users to create multiple items within a specified collection in Directus. It is useful for batch inserting data entries into a collection, such as adding multiple articles or records at once, which can save time and streamline data management workflows.
Use Case Examples
- Creating multiple articles in a content management system by specifying the collection name and providing an array of article objects with properties like title and body.
- Batch uploading product information into an inventory collection by sending an array of product objects.
Properties
| Name | Meaning |
|---|---|
| Collection Name | Specifies the unique name of the parent collection where the items will be created. This is a required field and options are dynamically loaded from available collections. |
| Data (JSON) | An array of partial item objects in JSON format representing the data to be created in the specified collection. This is a required field and must be a valid JSON array of objects. |
Output
JSON
id- The unique identifier of each created item.collection- The name of the collection where the items were created.data- The array of created item objects with their properties as stored in the collection.
Dependencies
- Requires connection to a Directus instance with appropriate API authentication credentials to perform item creation.
Troubleshooting
- Ensure the collection name specified exists and is accessible with the provided credentials.
- Validate that the JSON data is correctly formatted as an array of objects.
- Check API permissions to confirm the user has rights to create items in the specified collection.
- Common errors include invalid collection name, malformed JSON data, or insufficient permissions, which can be resolved by correcting the input or updating credentials.
Links
- Directus API - Create Multiple Items - Official documentation for creating multiple items in a Directus collection via API.