NAppwrite icon

NAppwrite

Use Appwrite's API from inside N8N, updated by @ZachHandley

Overview

This node integrates with the Appwrite backend service to perform operations on documents within a specified database and collection. Specifically, for the "Document" resource and "Create" operation, it allows users to create new documents in an Appwrite collection by specifying the database ID, collection ID, document ID (optional), and the document body content.

Common scenarios where this node is beneficial include:

  • Automating data entry into Appwrite databases from other workflows.
  • Creating new records dynamically based on upstream data processing.
  • Integrating Appwrite document creation as part of larger automation pipelines.

For example, you might use this node to create a new user profile document in an Appwrite collection whenever a new signup event occurs in your system.

Properties

Name Meaning
Database ID The identifier of the Appwrite database where the document will be created.
Collection ID The identifier of the collection within the database where the document will be stored.
Document ID The unique identifier for the new document. If set to "unique()", the node generates a unique ID automatically. You can also specify a custom document ID.
Body The JSON object representing the content of the document to create. This contains attribute-value pairs defining the document's data.

Output

The node outputs a JSON array containing the response from the Appwrite API after creating the document. The output JSON structure corresponds to the newly created document's data as returned by Appwrite, including its ID and all attributes stored.

No binary data output is involved in this operation.

Dependencies

  • Requires an active Appwrite project with API access.
  • Needs an API key credential configured in n8n to authenticate requests to Appwrite.
  • The node uses the official Appwrite SDK internally to communicate with the Appwrite server.

Troubleshooting

  • Common issues:

    • Invalid or missing database or collection IDs will cause the API call to fail.
    • Providing an invalid JSON structure in the Body property may result in errors.
    • Using a non-unique document ID that already exists will cause a conflict error.
    • Network connectivity or authentication failures due to incorrect API keys.
  • Error messages:

    • Errors related to authorization typically indicate misconfigured or expired API credentials.
    • "Document not found" or similar errors may occur if the specified database or collection does not exist.
    • JSON parsing errors suggest malformed input in the Body field.

To resolve these, verify the correctness of all IDs, ensure the API key has sufficient permissions, and validate the JSON body format before execution.

Links and References

Discussion