Skip to main content
All CollectionsHow To Build in FlutterFlow
How To: Send Notifications to Multiple Users
How To: Send Notifications to Multiple Users
Danny avatar
Written by Danny
Updated over a year ago

Use Case

FlutterFlow enables users to schedule and trigger notifications. You may want to automatically send notifications to multiple users from the user's collection when a document is created. This article details a step by step instructions on how to achieve this.


Sample Project

We've created a sample project to demonstrate how to build this in FlutterFlow:

https://app.flutterflow.io/project/auto-notification-2bm5hz
โ€‹
Keep reading for step-by-step instructions to learn how you can build what we have created in our sample project.


Automate Notifications Upon Creation Of A Document

Project Configuration

  1. Ensure your project is set up correctly with Firebase.

    - Here are detailed instructions on how to set up Firebase in Flutterflow

  2. Ensure firebase@flutterflow.io account has all the necessary permissions.

    - Here are detailed instructions on how to enable access to your project

  3. To send notifications, your project must be in the Blaze plan.

  4. Enable Push notifications in your projects and deploy them.

Send Notifications

Send notifications to multiple users from the user's collection once a post is added;

  1. In submit button, add a backend query

    - Set Query type to Query Collection

    - Collection to your data source collection, i.e users

    - Query type to List of Documents click save

  2. Add create document action to the button

  3. Set the value to the parameters sent to firebase

  4. add another action, trigger notification action

  5. Set notification parameters with the necessary data i.e (title, message, initial page)

  6. In the recipient section, select multiple recipients

  7. Click on the unset section, a pop will show

  8. Select user document as the source of data

  9. In the available options, select filter list items

  10. Click unset under filter conditions, a pop will show

  11. Select Items in list , under document properties, select Document Exists

  12. Click Confirm , this will pop you back to the previous dialog

  13. In this pop, under available options, select Map List Items

  14. Click unset a pop will show, and under Document Properties select Reference

  15. Click Confirm` in all pop-ups

  16. Close the action chain

The notification will be triggered automatically once a new post has been sent successfully.

Did this answer your question?