ZAppwrite icon

ZAppwrite

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

Overview

This node operation, Get Image From URL under the Avatar resource, retrieves an image from a specified URL and processes it using Appwrite's avatar service. It is useful when you want to fetch and manipulate avatar images dynamically based on external URLs within your n8n workflows.

Common scenarios include:

  • Fetching user profile pictures from external sources.
  • Processing images for use as avatars in applications.
  • Dynamically retrieving and resizing images for display or further processing.

For example, you can provide a URL of a user's photo, specify desired width and height, and get back a processed avatar image suitable for your application or workflow needs.

Properties

Name Meaning
Image URL The URL of the image to process. This is required.
Additional Fields Optional settings to customize the image processing:
- Background Color Hex color code for background when generating initials avatar (if applicable).
- Download Boolean flag to force download of the image instead of displaying inline.
- Height Desired image height in pixels (default 100).
- Margin Margin size for QR code images (pixels).
- Quality Image quality from 0 to 100 (percentage).
- Size Size in pixels for QR code images.
- Width Desired image width in pixels (default 100).

Note: For this specific operation "Get Image From URL," the relevant properties are primarily Image URL, and optionally Width and Height from Additional Fields to control the output image dimensions.

Output

The node outputs a JSON object containing the processed avatar image data under the data field. This typically includes the image content fetched and possibly resized or otherwise processed by the Appwrite API.

If the image is binary or downloadable, the node handles it accordingly (e.g., forcing download if specified).

Example output structure:

{
  "data": {
    // Image data or metadata returned by Appwrite avatar service
  }
}

Dependencies

  • Requires an active connection to Appwrite API via an API key credential.
  • Needs configuration of Appwrite project URL, project ID, and API key in the node credentials.
  • Uses the Appwrite SDK internally to call the avatar image endpoint.

Troubleshooting

  • Invalid URL or unreachable image: Ensure the provided Image URL is correct and accessible from the environment where n8n runs.
  • Authentication errors: Verify that the Appwrite API credentials are valid and have sufficient permissions.
  • Incorrect image dimensions: If the output image size is not as expected, check the Width and Height additional fields.
  • Network issues: Timeouts or connectivity problems with the Appwrite server may cause failures; ensure network access is stable.
  • Error messages: The node throws errors if the resource or operation is not found or if the Appwrite API returns an error. Review the error message for details and verify parameters.

Links and References

Discussion