Hi everyone, I’m facing an issue that seems simple but I haven’t been able to solve it.
I have two connected workflows:
- Workflow 1: Sends a WhatsApp message with buttons (using Z-API) to confirm an appointment.
- Workflow 2: Receives the patient’s response via Webhook (POST) and tries to write the response data into a Google Sheets spreadsheet.
The Webhook receives the data correctly — including senderName
, phone
, momment
, and the message
(either from buttonsResponseMessage.message
or message
). I confirmed that all of this is present in the body
of the Webhook.
Then I use an Edit Fields
node to map these:
Name
:{{$json["body"]["senderName"]}}
WhatsApp
:{{$json["body"]["phone"]}}
Message Date
:{{ new Date(Number($json["body"]["momment"])).toLocaleString("pt-BR") }}
Patient Message
:{{$json["body"]["buttonsResponseMessage"]["message"] || $json["body"]["message"] || "No message"}}
The problem is:
In the Google Sheet, the values are showing as undefined
or Invalid Date
, as if the fields are not being accessed correctly. The webhook input data is correct — I can see all values — but the Edit Fields and Google Sheets node don’t seem to write them properly.
I’ve tried:
- Validating the exact JSON structure from the Webhook;
- Toggling Include Other Input Fields in the Edit Fields node;
- Changing the field mapping and using fallback values.
Screenshots of the full flow are attached.