I have a Dialogflow Bot that is integrated with a Twilio phone number. I am trying to get Twilio to pass the "from" number that initiates an interaction to Dialogflow, so I can later log it in a fulfillment.
I put this in Fulfillment:
function reschedule(agent) {
const OriginalDetectIntentRequest = agent.parameters.OriginalDetectIntentRequest;
then: axios.post('https://sheetdb.io/api/v1/q0te84lfo1aal?sheet=Appointments', {
"data": {
"student": student,
"to_date": to_date,
"from_date": from_date,
"created": new Date(),
"OriginalDetectIntentRequest" : OriginalDetectIntentRequest,
}
});
Everything posts except the OriginalDetectIntentRequest
.
Here's the reference: https://cloud.google.com/dialogflow/es/docs/reference/rest/v2/OriginalDetectIntentRequest