Appwrite icon

Appwrite

Interact with Appwrite API

Actions181

Messaging → Send Push Notification

AI-generated

Overview

This node sends push notifications using the Appwrite messaging service. It allows users to send notifications to specific topics, users, or targets, with customizable content such as title, body, images, icons, sounds, and additional data. It supports saving messages as drafts or sending them immediately. This node is useful for applications that need to deliver real-time alerts or updates to users' devices via push notifications.

Use Case Examples

  1. Sending a promotional push notification to users subscribed to specific topics.
  2. Sending an urgent alert to a list of user IDs.
  3. Saving a push notification as a draft for later review and sending.

Properties

Name Meaning
Topics Comma-separated list of topic IDs to send the message to.
Users Comma-separated list of user IDs to send the message to.
Targets Comma-separated list of target IDs to send the message to.
Draft Whether to save the message as a draft instead of sending it immediately.
Message ID Unique identifier for the message, used to track or reference the notification.
Title Title text of the push notification.
Body Body text content of the push notification.
Data Additional data sent as a JSON object with the notification.
Action Action to perform when the notification is clicked.
Image URL of an image to display in the notification.
Icon URL of an icon to display in the notification.
Sound Sound to play when the notification is received.
Color Notification color in hex format.
Tag Tag used for grouping notifications.
Badge Badge count displayed on iOS devices.

Output

JSON

  • messageId - The unique identifier of the sent or drafted push notification message.
  • status - Status of the push notification request (e.g., sent, draft).
  • response - Raw response from the Appwrite messaging API after sending the notification.

Dependencies

  • Appwrite API key credential for authentication

Troubleshooting

  • Ensure the Appwrite API credentials (endpoint, project ID, API key) are correctly configured to avoid authentication errors.
  • Verify that the messageId is unique to prevent conflicts or overwriting existing messages.
  • Check the JSON format of the 'Data' field to avoid parsing errors.
  • If the notification is not received, confirm that the target topics, users, or targets are correctly specified and subscribed to receive push notifications.

Discussion