Firebase Functions Tutorial - Cloud Firestore Triggers | Diligent Dev

preview_player
Показать описание
In this Firebase Cloud Functions tutorial, we're going to be covering Firestore Trigger Functions. Trigger Functions are great for automating tasks, syncing database data, and database and storage cleanup. Follow along while we code out these example functions.

Timestamps
0:00 - Intro
0:24 - Creating a Firebase Project
1:25 - Installing the Firebase CLI
2:15 - Creating a Firebase Cloud Function Project
4:38 - onCreate Firestore Trigger
8:25 - onUpdate Firestore Trigger
12:53 - onDelete Firestore Tigger

Firestore Triggers

Firebase CLI

Bitbucket Repo

Firebase Functions REST API Tutorial

#firebase #firebaseCloudFunction #tutorial
Рекомендации по теме
Комментарии
Автор

what a great explanation, so easy to understand! thanks a lot mate

jacsdev
Автор

i did the same thing and my firestore never adds the loggin collection. what can i do?

alexbutean
Автор

I thought triggers were reserved for the realtime database only. Good stuff.

Tip: use the Firestore emulator instead of uploading and waiting. This makes debugging quicker. Once the function works 100% locally then deploy. I hate waiting in upload > test > "syntax errors". 🙄

chindna
Автор

I find your videos extremely helpful. I also hear child sound around 4:55 :-)

malaythakershi
Автор

Thank you! How has this changed with Firebase version 9^ ?

markg
Автор

Does this need a blaze pay - as - you - go plan?

shobhankumar.r
Автор

Great video! I'm looking for a good video to run the Trigger Email maybe with via sendGrid and how to pass it a data object

hillno
Автор

great video and thank you. I have question. Could you point me to where I can find help on this. I have two firestore projects and if a user creates an account on one I need a function to trigger and create the same on the other project database. UserID is the document and is auto created and both need that same UserID as it creates a QRCODE that is used in two different apps. I have been at this for days now. thank you for a reply

ONYXRCR
Автор

After watching this a few times trying to understand what you did. I find that as the quality of the video is great. There's a lot going on in this video and so I found myself having a bit of trouble. For example, I had to tear down your logic in your post document. As I store a download url not the way you do it (I'm sure I could do it better). That said, what if you didn't have the location stored in the post? What if you just had the download url? How would you delete the file if you had the file in a dir a few folders in?

WesleyFranks
Автор

Hi, DD, Great video! I can't write equal sign and not equal sign like you did in the video. How do you do that?

nnocqet
Автор

Hi Diligent Dev. Is it possible to make a trigger in a map, when you deleted de png file you delete all collection but not the png (0 map ). I wonder it possible to trigger when png is deleted or created, I been traying and I can not do the trigger. Thank you

cbejar
Автор

In my project trigger is not working. can you tell some basic things which I need to check. I am using trigger with apis.

sparrowallinone
Автор

Thanks for awesome education! But I have one question how can I read data from FireStore to CloudFunctions??

scv
Автор

Thanks, its a detailed one, can you guide me! i (admin)would like to get email whenever a document added to "ORDERS" collection, i mean when user completes purchase; admin should get email with order details=> "ORDERS" collection has a document "ORDERID" and then orderID has a collection "orderitems" and then "orderitems" has the product list.

srinivas