whatsapp api to firebase updating fields problem

Genio

Member
Hello i have a webhook from whatsapp api, that i want to store in firebase.
I have a collection named responses, and in each document i have 4 fields (Messege, Number, Response, Status)
The only problem is that whatsapp only sends one thing per webhook response. So, if some one sent a message i will get a messege webhook reply
or if someone read my messege, i will get a status webhook reply. Now, if i tried to add the info to my document, Its not possible because firebase update document will tell me there is a missing fields. How can i update only 1 field in the document and not change the rest?


1704958508102.png

this is the document

lets say i only want to update messege
1704958556772.png

then the document becomes like this
1704958585202.png

All the other fields got removed and i only have the new messege!


Thank you
 
A

Arshita

Guest
Hey @Genio

I request you to refer to the video tutorial provided below for guidance on the WhatsApp API, and try the process from your end.

Additionally, I've noticed that you're inputting data into a field, causing it to become static. In light of this, I kindly request you to map the field from the respective application above and ensure that the field remains dynamic.
 
Top