HTTP Request for implementing PATCH to Firestore API

Hi Experts :slight_smile:

I think I need to use the patch method to update a small set of fields in specific documents contained in a Firestore db. I have most of the other components working - add, read, delete - but I cannot seem to get the Request payload to format correctly for the API.

Here’s the text that works:
image

and here’s the text that AppGyver delivers to the API:

which causes an error: {
“code”: 400,
“message”: “Invalid JSON payload received. Unknown name "": Root element must be a message.”,

I cannot seem to get the correct format so that the API understands the request body. Here’s what I have tried to get the format correct:
Formula



TEXT


Just delete and then recreate. I don´t think anyone ever got that working.

Thanks for looking Phil,

I got it working today. Instead of supplying a text string, you need to deliver an object. The AppGyver interface will then convert the object into the correct text string. I wish there was a mechanism to connect the mapFields parameters to the http payload. I kept losing data in my test records until I realized that the fields in my newly created object were not the same as the url parameters.

Maybe I can craft a formula and extract the field names from my object and put them into the mapFields format for the url.

If anybody wants further info, please reply, and I can generate some screen shots.