"query":"select location from schedule a where a.id = {{$('Webhook').item.json.body.schedule_id}};\n",
"options":{}
},
"id":"6e86c67c-9c7a-4c51-9785-23db8d4b1e45",
"name":"get_location",
"type":"n8n-nodes-base.mySql",
"typeVersion":2.4,
"position":[
160,
840
],
"credentials":{
"mySql":{
"id":"09oRI0DULmEzD9l8",
"name":"SL-DB"
}
}
},
{
"parameters":{
"jsCode":"// Loop over input items and add a new field called 'myNewField' to the JSON of each one\nlet output_info = {};\nlet text_info = {};\ninfo = JSON.parse($('Webhook').item.json.body.info).full_text.replace(/https:\\/\\/[^\\s]+/g, '').replaceAll(/[ \\t\\n\\r]+/g, ' ').replaceAll(\"\\\"\", '” ');\nconsole.log(info);\nuser_id = JSON.parse($('Webhook').item.json.body.info).id;\ntext_info['full_text'] = info;\noutput_info['text'] = JSON.stringify(text_info);\noutput_info['msg_info'] = info;\noutput_info['user_id'] = user_id;\nreturn output_info;"