ZAppwrite icon

ZAppwrite

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

Overview

The "Update Provider" operation in the Messaging resource allows users to update the configuration details of an existing messaging provider within the Appwrite platform. This node is useful for managing and maintaining various messaging service providers such as SMTP, Mailgun, Twilio, Sendgrid, and others by updating their credentials, connection settings, or enabling/disabling them.

Typical use cases include:

  • Updating SMTP server credentials or host details when email server configurations change.
  • Changing API keys or domains for services like Mailgun or Sendgrid.
  • Modifying authentication tokens or IDs for push notification services like APNS or FCM.
  • Enabling or disabling a provider without deleting it.
  • Keeping messaging provider configurations up-to-date to ensure uninterrupted message delivery.

For example, if your SMTP password changes, you can use this node to update the password securely without recreating the provider from scratch.

Properties

Name Meaning
Provider Type The type of messaging provider to update. Options include: APNS (Apple Push), FCM (Firebase), Mailgun, MSG91, Sendgrid, SMTP, Telesign, Textmagic, Twilio, Vonage.
Provider ID Unique identifier of the provider to update. Can be a custom string or generated randomly using unique().
Provider Name The display name for the provider.
Host (SMTP only) The SMTP server host address.
Port (SMTP only) The port number for the SMTP server (default 587).
Username (SMTP only) Username for SMTP authentication.
Password (SMTP only) Password for SMTP authentication.
Encryption (SMTP only) Encryption type for SMTP connection. Options: None, SSL, TLS.
Auto TLS (SMTP only) Boolean flag to enable automatic TLS.
Mailer (SMTP only) Name of the SMTP mailer.
API Key (Mailgun, Sendgrid, MSG91, Telesign, Textmagic, Vonage) API key or authentication token required by the respective provider.
Domain (Mailgun only) The domain associated with the Mailgun account.
EU Region (Mailgun only) Boolean indicating whether to use the Mailgun EU region.
From Name (Mailgun, Sendgrid) Sender's display name.
From Email (Mailgun, Sendgrid) Sender's email address.
Reply To Name (Mailgun, Sendgrid) Reply-to display name.
Reply To Email (Mailgun, Sendgrid) Reply-to email address.
Template ID (MSG91 only) Template ID used for SMS messages.
Sender ID (MSG91 only) Sender ID for SMS messages.
Auth Key (APNS, MSG91) Authentication key or token for the provider.
Auth Key ID (APNS only) Authentication key ID.
Team ID (APNS only) Apple developer team ID.
Bundle ID (APNS only) Application bundle ID.
Sandbox (APNS only) Boolean indicating whether to use the sandbox environment.
Customer ID (Telesign only) Customer ID for Telesign service.
Username (Textmagic only) Username for Textmagic service.
Account SID (Twilio only) Account SID for Twilio.
Auth Token (Twilio only) Authentication token for Twilio.
API Secret (Vonage only) API secret for Vonage.
Additional Fields Collection of optional fields applicable across providers, including:
- BCC: Comma-separated BCC emails
- CC: Comma-separated CC emails
- Draft: Whether the message is a draft
- Enabled: Enable/disable provider
- From Email/Name override
- HTML: Whether email content is HTML
- Scheduled At: ISO 8601 scheduled delivery time
- Targets, Topics, Users: Comma-separated lists of IDs

Output

The node outputs a JSON array containing the updated provider object returned from the Appwrite API. This object includes all relevant details of the messaging provider after the update, such as its ID, name, type, enabled status, and configuration parameters.

No binary data output is produced by this operation.

Example output snippet (simplified):

[
  {
    "providerId": "example-id",
    "providerName": "My SMTP Provider",
    "providerType": "smtp",
    "enabled": true,
    "config": {
      "host": "smtp.example.com",
      "port": 587,
      "username": "user@example.com",
      "encryption": "tls"
    }
  }
]

Dependencies

  • Requires an active Appwrite project with the Messaging service enabled.
  • Needs valid credentials for the Appwrite API, including URL, project ID, and an API key credential with permissions to manage messaging providers.
  • The node depends on the Appwrite SDK and internal helper functions to communicate with the Appwrite backend.

Troubleshooting

  • Invalid Provider ID: If the specified provider ID does not exist, the API will return an error. Verify the provider ID is correct.
  • Authentication Errors: Ensure that the API key credential used has sufficient permissions to update messaging providers.
  • Missing Required Fields: Some provider types require specific fields (e.g., SMTP requires host and port). Omitting these may cause errors.
  • Incorrect Field Types: For example, providing a non-numeric value for the SMTP port will cause validation errors.
  • Disabled Provider Not Updating: If the provider is disabled, some updates might not take effect until re-enabled.
  • API Rate Limits: Frequent updates may hit rate limits; handle errors accordingly.

To resolve errors, check the error message returned by the node, verify input parameters, and confirm API credentials and permissions.

Links and References

Discussion