Appwrite icon

Appwrite

Interact with Appwrite API

Actions181

Attribute → Create Email

AI-generated

Overview

This node interacts with the Appwrite API to create an email attribute within a specified database and collection. It is useful for defining email fields in a database schema, ensuring data consistency and validation for email addresses. For example, it can be used in applications that require user contact information stored in a structured database.

Use Case Examples

  1. Creating an email attribute in a user database to store user email addresses.
  2. Defining an email field in a customer collection for a CRM system.

Properties

Name Meaning
Database ID The ID of the database where the attribute will be created.
Collection ID The ID of the collection within the database where the attribute will be created.
Attribute Key The key or name of the email attribute to be created.
Size The maximum length of the email attribute value.
Required Indicates whether the email attribute is mandatory.
Default Value The default value for the email attribute if none is provided.
Array Specifies if the email attribute should be an array of email addresses.

Output

JSON

  • attributeId - The unique identifier of the created email attribute.
  • key - The key or name of the created email attribute.
  • type - The type of the attribute, which is email in this case.
  • size - The maximum length allowed for the email attribute value.
  • required - Indicates if the attribute is required.
  • defaultValue - The default value set for the attribute.
  • array - Indicates if the attribute is an array of values.

Dependencies

  • Appwrite API key credential for authentication and access to the Appwrite project and database.

Troubleshooting

  • Ensure the provided Database ID and Collection ID are correct and exist in the Appwrite project.
  • Verify that the API key credential has sufficient permissions to create attributes in the specified database and collection.
  • Check that the attribute key is unique within the collection to avoid conflicts.
  • If the node throws authentication errors, verify the API key and project endpoint configuration.

Discussion