Back

Need Help with Automatic Push Notifications in Appwrite

  • 0
  • Flutter
  • Databases
  • Messaging
  • Self Hosted
  • Functions
kadabra40
13 Mar, 2024, 20:37

Hi everyone,

I'm building a task list app with Appwrite and flutter, where my partner and I share our tasks. We want to receive push notifications whenever one of us adds, deletes, or modifies a task. Everything is set up except for the notifications part.

My question is simple: How can I set up an Appwrite function to automatically execute and send a push notification when a task in our list is modified?

Also, how can the function determine which user to send the notification to?

Thanks for your help!

TL;DR
Developers need help setting up automatic push notifications in an Appwrite app for task modifications. To achieve this, they need to check out the Messaging and Events documentation in Appwrite. Implement a function that triggers database events and sends notifications. The function should exclude the user making changes. Ensure Appwrite version is above 1.5.0, which is not available yet in cloud.
Binyamin
13 Mar, 2024, 20:39

You can do so with appwrite.version > 1.5.0 (which cloud isn't yet) For that, you'll need to create a function that will trigger each database event.

Binyamin
13 Mar, 2024, 20:40

Then, in the function you'll get the user who made the change (so you don't need to send that user a notification), and you'll get the message object to send it to the user.

Binyamin
13 Mar, 2024, 20:41
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more