Cloud function triggered by Firestore event
I have deployed cloud function (Gen 2) that is supposed to be triggered each time a new document in “messages” collection is created in my Firestore DB. Than the “test” data field with hardcoded string is supposed to be added to this document. I can see that the function is actually triggered on new doc creation, but I am keep getting TypeError: