if I understand that correctly, you try to get the conversation between bot and user.
For that you should use a Webhook-Integration, that sends a request message to your Webhook. In your Webhook you can feel free to save the json request or edit it.
For example in python:
import json
def cx_debug_json(request):
request_json = request.get_json()
with open("conversation", 'w') as json_file:
json.dump(request_json, json_file)
Your file than should have a json format with different specifications. If you just want the specific text strings, you have to edit the request_json. For example to delete specific paramaters:
if "fulfillmentResponse" in request_json.keys():
response_json["fulfillment_response"] = request_json["fulfillmentResponse"]
if "pageInfo" in request_json.keys():
response_json["page_info"] = request_json["pageInfo"]
if "payload" in request_json.keys():
response_json["payload"] = request_json["payload"]
if "sessionInfo" in request_json.keys():
response_json["session_info"] = request_json["sessionInfo"]
if "parameters" in response_json["session_info"].keys():
if target_parameter in response_json["session_info"]["parameters"].keys():
response_json["session_info"]["parameters"][target_parameter] = None
Now you need to figure out the key names of the text strings (simple debug the incoming request from the webhook) and then editing or extract them as you like.