Appwrite icon

Appwrite

Interact with Appwrite API

Actions181

Document → Batch Update

AI-generated

Overview

This node performs batch updates on documents within a specified database and collection in the Appwrite platform. It is useful for scenarios where multiple documents need to be updated simultaneously, such as bulk editing records or synchronizing data across multiple entries. For example, updating user profiles or inventory items in bulk can be efficiently handled with this operation.

Use Case Examples

  1. Updating multiple user documents in a database collection with new profile information.
  2. Bulk updating product details in an inventory management system.

Properties

Name Meaning
Database ID The ID of the database where the documents reside.
Collection ID The ID of the collection containing the documents to update.
Batch Items An array of documents to update, each with a documentId, data for the update, and optional permissions.
Continue on Error Whether to continue processing remaining items if some updates fail.
Batch Size Number of items to process in each batch, ranging from 1 to 100.
Parallel Processing Whether to process items in parallel for faster execution, with a risk of rate limiting.

Output

JSON

  • documentId - The ID of the updated document.
  • data - The updated data of the document.
  • permissions - The permissions applied to the updated document, if any.
  • error - Error details for any failed update when continue on error is enabled.

Dependencies

  • Appwrite API key credential for authentication

Troubleshooting

  • Common issues include rate limiting when parallel processing is enabled; reducing batch size or disabling parallel processing can help.
  • Errors may occur if document IDs are invalid or missing in batch items; ensure each item has a valid documentId.
  • If the API key or project credentials are incorrect, authentication errors will occur; verify credentials in node settings.

Links

Discussion