I want to download already existing Dialogflow logs from Stackdriver in JSON format. As a beginner i´m surprised how difficult this is. The graphical interface only allows downloads of up to 300 logs which is not enough for my purposes. Since the logs are already there I can not solve this with the export function since it only processes new logs.
I followed advice in How to export previous logs in Stackdriver and ended up using this command to download the logs gcloud logging read --project=myproject --freshness 30d --format=json > C:\Users\Gabriel\Desktop\log.json
.
The resulting JSON file is almost exactly what I need, BUT the most important information like what was said to the Dialogflow bot is not formatted as JSON but instead a messy text string under the key "textPayLoad", for example: textPayload = "Dialogflow Request : {\"session\":\"usr117\",\"query_input\":\"{\\n \\\"text\\\": {\\n \\\"textInputs\\\": [{\\n \\\"text\\\": \\\"Hello\
Is there any relatively simple way to download the logs as structured JSON files? The Google documentation on the topic is to complicated for me to grasp.