ZAppwrite icon

ZAppwrite

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

Overview

The node integrates with Appwrite's Messaging API to create and manage messaging content. Specifically, the Create Email operation allows users to send an email message through Appwrite's messaging service. This is useful for automating email notifications, marketing campaigns, or transactional emails within workflows.

Typical use cases include:

  • Sending customized email alerts based on workflow triggers.
  • Automating newsletters or updates to user groups.
  • Scheduling emails to be sent at a future time.
  • Targeting specific users, topics, or IDs for segmented communication.

Properties

Name Meaning
Message ID Unique identifier for the message. Can be generated automatically using unique() or provided as a custom string.
Subject The subject line of the email.
Content The main body content of the email message.
Additional Fields A collection of optional fields to further customize the email:
- BCC: Comma-separated list of BCC email addresses.
- CC: Comma-separated list of CC email addresses.
- Draft: Boolean indicating if the message is a draft.
- Enabled: Boolean to enable or disable the provider.
- From Email: Sender's email address.
- From Name: Sender's name.
- HTML: Boolean indicating if the content is HTML formatted.
- Scheduled At: ISO 8601 timestamp to schedule delivery.
- Targets: Comma-separated list of target IDs.
- Topics: Comma-separated list of topic IDs.
- Users: Comma-separated list of user IDs.

Output

The output JSON contains the response from the Appwrite API after creating the email message. It typically includes details about the created message such as its ID, status, timestamps, and any metadata returned by the API.

If the operation succeeds, the output will be an array with one object representing the created email message.

The node does not output binary data for this operation.

Dependencies

  • Requires an active connection to Appwrite's API via an API key credential configured in n8n.
  • The node depends on the Appwrite SDK and related helper functions to communicate with the Appwrite Messaging service.
  • Proper permissions and configuration in the Appwrite project are necessary to send emails.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials can cause authentication failures.
    • Providing an invalid or duplicate Message ID may result in errors.
    • Incorrectly formatted email addresses in CC or BCC fields can cause rejection.
    • Scheduling with an invalid date format (non-ISO 8601) will fail.
    • If the provider is disabled or misconfigured, the message may not send.
  • Error messages:

    • Authentication errors: Check that the API key credential is valid and has required permissions.
    • Validation errors: Verify all required fields (Message ID, Subject, Content) are provided and correctly formatted.
    • API errors related to scheduling or targeting: Ensure date formats and target/topic/user IDs exist and are correct.

Resolving these usually involves verifying input parameters, ensuring proper API credentials, and confirming Appwrite project setup.

Links and References

Discussion