ZAppwrite icon

ZAppwrite

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

Overview

This node integrates with the Appwrite API to generate avatar images based on user initials. Specifically, the "Get Initials" operation creates an avatar image displaying the initials derived from a provided name string. This is useful in scenarios where user profile pictures are not available, and you want to display a visually consistent placeholder avatar.

Practical examples include:

  • Automatically generating avatars for users who have not uploaded a profile picture.
  • Creating default avatars in chat applications or contact lists.
  • Displaying initials-based icons in dashboards or reports.

Properties

Name Meaning
Name The full name string from which initials will be generated (optional).
Additional Fields A collection of optional settings to customize the avatar image:
- Background Color Hex color code for the background of the initials avatar (e.g., #FF0000).
- Download Boolean flag indicating whether to force download of the generated avatar image.
- Height Image height in pixels (default 100).
- Width Image width in pixels (default 100).
- Margin QR code margin (not relevant for initials but present in additional fields).
- Quality Image quality from 0 to 100 (default 100).
- Size QR code size in pixels (not relevant for initials but present in additional fields).

Note: Some additional fields like Margin and Size relate to QR code generation and are not applicable to the initials avatar operation.

Output

The node outputs a JSON object containing the generated avatar data under the data field. This typically includes the image data representing the initials avatar, which can be used directly in UI components or saved as an image file.

If the "Download" option is enabled, the node may trigger a forced download of the avatar image.

No binary output is explicitly handled by this operation; the avatar image is returned as part of the JSON response.

Dependencies

  • Requires an active connection to the Appwrite API service.
  • Needs an API key credential configured in n8n to authenticate requests.
  • The node uses the Appwrite SDK internally to perform the avatar generation.

Troubleshooting

  • Missing or invalid API credentials: Ensure that the API key and project URL are correctly set up in the node credentials.
  • Empty or invalid name input: If the "Name" property is empty or malformed, the generated initials may be incorrect or missing. Provide a valid full name string.
  • Invalid color codes: The background color must be a valid hex color code (e.g., #FFFFFF). Invalid values may cause errors or default colors to be used.
  • Image size issues: Setting extremely large or zero dimensions for width/height may cause unexpected behavior or errors.
  • API errors: Network issues or Appwrite service downtime can cause failures. Check connectivity and Appwrite service status.

Links and References

Discussion