You can test out this extension right away!
-
Go to your Cloud Firestore dashboard in the Firebase console.
-
If it doesn't already exist, create the collection you specified during installation:
${param:MESSAGE_COLLECTION}
. -
Add a document with a
to
field and abody
field with the following content:to: ["YOUR_PHONE_NUMBER"], sendername: "SENDER_NAME", body: "Hello from Firebase!"
Note: You can also use the Firebase Admin SDK to add a document:
admin
.firestore()
.collection("${param:MESSAGE_COLLECTION}")
.add({
to: ["YOUR_PHONE_NUMBER"],
sendername: "SENDER_NAME",
message: "Hello from Firebase!"
})
.then(() => console.log("Queued message for delivery!"));
After its installation, this extension monitors all document writes to the ${param:MESSAGE_COLLECTION}
collection. Messages are delivered based on the contents of the document's fields. The document's fields specify who to send the message to and the body of the message and can optionally define the number to send the message from.
As a best practice, you can monitor the activity of your installed extension, including checks on its health, usage, and logs.