I am using a Set variable block with value: Custom. I have this javascript in it (Execute on client? = true):
function getCookie(name) { const value = ; ${document.cookie}; const parts = value.split(; ${name}=); if (parts.length === 2) return parts.pop().split(';').shift(); } const myCookieValue = getCookie("hubspotutk"); return myCookieValue
The variable gets set, I can retrieve the value and print it as a text bubble in the chat.
However, for some reason when I try to return the variable using a Zapier block, the variable isn't included in the return. The variable just isn't there.
Any variables I set through an Input Text block using "Save the answer in a variable" DO show up in Zapier. But these that I'm setting through the Set variable block with JS are not.