Twilio capture userPhone
# 🤝help
f
Can you try and
console.log(phone)
after setting it in the execute code card
f
It should now be phonejs
s
yeah I changed this
f
It seems like there is an issue with the variable workflow.sendMake
Have you changed it from a string?
f
You should change it to an object
s
here is how i save the users number to user.guestNumber // Assuming event.tags contains the log data const logData = event.tags; try { // Check if logData is a string and parse it let parsedData; if (typeof logData === 'string') { parsedData = JSON.parse(logData); } else { // If logData is already an object, no need to parse parsedData = logData; } // Extracting the phone number const guestNumber = parsedData.conversation['twilio:userPhone']; // Assuming 'user' is an object with a property 'guestNumber' user.guestNumber = guestNumber; console.log(
Guest number saved: ${user.guestNumber}
); } catch (error) { console.error(
Error parsing or processing log data: ${error}
); }