Hi, I am transitioning from Make.com and have fallen at one of the first hurdles.
I just want to generate a Session ID if one does not exist in the incoming webhook and then extract it to use again and pass it to the webhook response for use on the next run for that user.
At this point my incoming webhook contains:
{
"sessionId": "",
"contactMessage": "Hi"
}
Then, if sessionId is blank, generate one, and use it in the Window Memory Buffer using something like:
{{(+new Date).toString(36).slice(-5) + Math.random().toString(36).substr(2, 5)}}
Then I just want to pass that back to the webhook response:
{
"sessionId": "{{ $('Window Buffer Memory').params["sessionKey"] }}",
"agentMessage": "{{ $json.output }}"
}
Hope that makes sense, grateful for any help!
