Actions181
- Account Actions
- Get Account
- Create Account
- Update Email
- Update Name
- Update Password
- Update Phone
- Update Status
- Get Preferences
- Update Preferences
- List Sessions
- Delete Sessions
- Get Session
- Update Session
- Delete Session
- Create Anonymous Session
- Create Email/Password Session
- Create Magic URL Session
- Create OAuth2 Session
- Create Phone Session
- Create Session from Token
- Create JWT
- Create Magic URL
- Create Phone Token
- Create Email Verification
- Update Email Verification
- Create Phone Verification
- Update Phone Verification
- Create Password Recovery
- Update Password Recovery
- Create Recovery
- Update Recovery
- Update MFA
- Create MFA Authenticator
- Update MFA Authenticator
- Delete MFA Authenticator
- Create MFA Challenge
- Update MFA Challenge
- Attribute Actions
- Avatars Actions
- Collection Actions
- Database Actions
- Document Actions
- Functions Actions
- Index Actions
- Locale Actions
- Messaging Actions
- Sites Actions
- Storage Actions
- Teams Actions
- Users Actions
Document → Batch Create
AI-generatedOverview
This node interacts with the Appwrite API to perform batch creation of documents within a specified database and collection. It is useful for scenarios where multiple documents need to be created efficiently in bulk, such as importing data sets, syncing records, or initializing collections with predefined data. For example, a user can batch create multiple user profiles or product entries in a single operation.
Use Case Examples
- Batch create multiple documents in a database collection by providing an array of document data objects.
- Import a list of items into a collection by specifying document IDs, data, and optional permissions for each item.
Properties
| Name | Meaning |
|---|---|
| Database ID | The ID of the database where documents will be created. |
| Collection ID | The ID of the collection within the database where documents will be created. |
| Batch Items | An array of document objects to create, each optionally including a documentId, required data, and optional permissions. |
| Continue on Error | Whether to continue processing remaining items if some items fail during batch creation. |
| Batch Size | Number of items to process in each batch, ranging from 1 to 100. |
| Parallel Processing | Whether to process batch items in parallel for faster execution, with a risk of rate limiting. |
Output
JSON
documentId- The unique identifier of the created document.data- The data content of the created document.permissions- Permissions set on the created document, if any.error- Error details for items that failed to be created, if continue on error is enabled.
Dependencies
- Appwrite API service
Troubleshooting
- Common issues include API authentication failures due to incorrect or missing API keys or project IDs.
- Rate limiting errors may occur if parallel processing is enabled and too many requests are sent simultaneously; reducing batch size or disabling parallel processing can help.
- Errors in document data format or missing required fields can cause individual item failures; ensure each document has valid data and optional documentId and permissions are correctly formatted.