Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Item → Create Multiple

AI-generated

Overview

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

  1. 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.
  2. 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

Discussion