I am trying to get data from Firestore in a batch using the batchGet method. But i get an error as below :
Error: JSON error response from server: [{"error":{"code":400,"message":"Document name "["projects/MYPROJECT/databases/(default)/documents/MYCOLLECTION/DOCUMENTID"]" lacks "projects" at index 0.","status":"INVALID_ARGUMENT"}}].status: 400
I have searched for any questions regarding this, I found this. They are trying t add documents and not using batchGet, however I have followed the solution. Still no luck.
Note: I am integrating Firebase to AppGyver.
I am new to Firebase and still learning. I need all the help I can get. Thank you in advance.
I have found what I did wrong.
In AppGyver you can only set your parameters as
text
ornumber
only. While thedocuments
parameter needs to be in array. Hence, I convert the array to string usingENCODE_JSON
. But that was wrong.The correct way is just send the
documents
in array without converting it. Use the formula :Just hit "Save" even there is an error telling you that it is not a text.