ZAppwrite icon

ZAppwrite

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

Overview

This node integrates with the Appwrite API to generate QR codes as part of its Avatar resource operations. Specifically, the "Get QR Code" operation creates a QR code image encoding a given text string. This is useful in scenarios where you want to dynamically generate QR codes for URLs, contact information, or any arbitrary text within an automation workflow.

Practical examples include:

  • Generating QR codes for event tickets or coupons.
  • Encoding URLs or Wi-Fi credentials to share easily.
  • Creating QR codes for user identification or authentication purposes.

Properties

Name Meaning
Text The text string to encode into the QR code.
Additional Fields Optional settings to customize the QR code output:
- Background Background color for the avatar (hex color), though not directly used for QR code here.
- Download Boolean flag indicating whether to force download of the QR code image.
- Height Image height in pixels (default 100).
- Margin Margin size around the QR code (default 1).
- Quality Image quality from 0 to 100 (default 100).
- Size Size of the QR code in pixels (default 400).
- Width Image width in pixels (default 100).

Note: For the "Get QR Code" operation, the most relevant additional fields are size, margin, and download. Width, height, background, and quality may be more relevant for other avatar types.

Output

The node outputs a JSON object containing the generated QR code data under the data field. This typically includes the QR code image encoded in a format suitable for further processing or display.

If the download option is enabled, the node will trigger a forced download of the QR code image.

Binary data handling is implied by the presence of image data but is encapsulated inside the data property in the JSON output.

Example output structure:

{
  "data": {
    // QR code image data or URL
  }
}

Dependencies

  • Requires an active connection to the Appwrite API service.
  • Needs an API key credential configured in n8n for authentication with Appwrite.
  • The node uses the Appwrite SDK internally to communicate with the API.

Troubleshooting

  • Invalid API credentials: Ensure that the API key and project ID are correctly set up in the node credentials.
  • Missing required parameters: The Text property must be provided; otherwise, the node will fail.
  • Network issues: Connectivity problems with the Appwrite server can cause timeouts or errors.
  • Unsupported characters in text: Very unusual or binary data in the text might cause QR code generation errors.
  • Large size values: Setting excessively large size or width/height values may lead to performance issues or failures.

Common error messages usually relate to authentication failures or invalid input parameters. Verify all inputs and credentials if errors occur.

Links and References

Discussion