https://discord.gg/botpress logo
#🌎general
Title
# 🌎general
m

millions-motorcycle-83398

07/04/2023, 4:50 PM
anyone know if you can capture the last user message (string) off the start of the bot and store it in a variable? help would be much appreciated
e

early-train-33247

07/06/2023, 6:56 PM
Hey @millions-motorcycle-83398 you can do that by using a Execute Code card with the code:
workflow.myVariable = event.preview
It will assign to the variable the last input from the user
But beware that they could type in anything and it would be saved to the variable still
You could have a confirmation card to check if that's their actual name, or ideally you would use a Name capture card
But the name capture would require that the bot asks something first
m

millions-motorcycle-83398

07/06/2023, 7:15 PM
Yep. I’m looking at using this like capturing the last message and sending that message to a zapier -> Google sheets for review
@early-train-33247
e

early-train-33247

07/09/2023, 1:46 PM
I would recommend creating intents or using an AI Task to check what the user has said
And if it's in the desired format you proceed with the zapier request