Appwrite icon

Appwrite

Interact with Appwrite API

Actions181

Messaging → Create Provider

AI-generated

Overview

This node operation creates a messaging provider configuration in the Appwrite platform. It supports various provider types such as Sendgrid, Mailgun, Twilio, FCM, and APNS, allowing users to set up email, SMS, and push notification providers. This is useful for automating the setup of messaging services within an application, enabling seamless integration for sending emails, SMS, or push notifications through the specified provider.

Use Case Examples

  1. Creating a Sendgrid email provider by specifying API key, sender email, and name.
  2. Setting up a Twilio SMS provider with account SID, auth token, and sender phone number.
  3. Configuring an FCM push notification provider using a service account JSON object.

Properties

Name Meaning
Provider ID Unique identifier for the messaging provider, can be generated using unique() function.
Provider Type Type of messaging provider to create, such as Sendgrid, Mailgun, Twilio, FCM, or APNS.
Name Name of the messaging provider.
Enabled Flag indicating whether the provider is enabled or disabled.
API Key API key for email providers (Sendgrid or Mailgun).
Domain Mailgun domain for the Mailgun email provider.
From Email Sender email address for email providers (Sendgrid or Mailgun).
From Name Sender name for email providers (Sendgrid or Mailgun).
From Sender phone number for Twilio SMS provider.
Account SID Twilio Account SID for SMS provider.
Auth Token Twilio Auth Token for SMS provider.
Server Key FCM service account JSON object for push notifications.
Auth Key APNS authentication key for push notifications.
Auth Key ID APNS authentication key ID.
Team ID APNS team ID.
Bundle ID APNS bundle ID.
Sandbox Flag to indicate whether to use APNS sandbox environment.

Output

JSON

  • providerId - Unique identifier of the created messaging provider.
  • providerType - Type of the messaging provider created.
  • name - Name of the messaging provider.
  • enabled - Whether the provider is enabled.
  • details - Additional details or configuration of the created provider.

Dependencies

  • Appwrite API with credentials including endpoint, project ID, and API key

Troubleshooting

  • Ensure all required fields for the selected provider type are correctly filled, such as API keys and sender information.
  • Check that the API key and authentication tokens are valid and have the necessary permissions.
  • Verify the provider type matches the configuration fields provided (e.g., Mailgun requires domain, Twilio requires account SID and auth token).
  • Common errors include authentication failures, missing required parameters, or invalid provider type. These can be resolved by reviewing the input parameters and credentials.

Links

Discussion