How to send the DocumentReference.getId() that is generated every time a new document was added to firestore from Android Studio to cloud function that triggers when there is a write/create operation on Firestore. I tried following
'use strict'; const https = require( 'firebase-functions'); const functions = require('firebase-functions'); const Firestore = require('@google-cloud/firestore'); const firestore = new Firestore(); const admin = require('firebase-admin'); admin.initializeApp(functions.config().firebase); exports.helloUser = functions.firestore .document('BankInform/Moj2HBrxepX5R7FonvrO') .onUpdate(event =>{ var newValue = event.data.data(); return event.data.ref.update({ "status": "Success" }); }); But I have to give the autoid of document.How to pass document id from android studio to cloud functions