I am working with Google’s DialogFlow API for building an ChatBot with OpenAI GPT. Basically when the conversation can’t be handled by DialogFlow it will pass the message to OpenAI GPT API so the bot can always respond something relevant.
Process:
I created a new API Workflow with POST inputs. Twilio will send al incoming messages to this endpoint.
The POST inputs are send to DialogFlow and DialogFlow will either find a match for the conversation or not. Either way DialogFlow responds to the API call made by Wappler with the following schema:
As you can se there is an action inside the queryResult object which I will use to determine the next step. Also there is an array called fulfillmentMessages which contain text value that I would like to get and use for further steps.
The problem is that I am not able to access those values. The only way I have been able to get info to a next step is by getting the full response (see attachments).
Are you maybe saying you can’t select those values because they don’t appear in the Data Binding Picker window? You can still access them manually through the code edit mode in such window, or you can manually define the schema in the API Action step so those JSON properties appear when you attempt to select them
Sorry I was not clear enough and thank you for your time @Apple
I can select the values in the Data Binding Picker window but if I select anything they will return empty.
The only value I can select that comes with a value not empyt is the whole data (sendToDialogflow.data) but it will store the whole json
Decided to give a try to ChatGPT abou this wappler issue, this was my bad prompt:
Using the tool Wappler, I created an Server side API action that call a Google API and gets a Json in response. I will provide a JSON response in the next message, but it is a nested JSON and I am not able to extract specific values from the json response to use them in the next action in wappler server workflow. I can only get the full json but if I try to select a specific value then I get an empty value. Tell me what I am doing wrong and how to fix it. Being the desired success to be able to select a single value in the json response that is inside the nested json.
and in the next message I provided a sample of the JSON. Soon enough ChatGPT gave a solution that worked:
Well, unfortunately, we don’t have a screenshot of one of your previous Set Value attempt(s) to see what went wrong/to compare. Glad you managed to solve it though!