Ask for and remember user's age

#1

Hi everyone,

I was wondering how i could best ask the user for his age and then reproduce (only) this number, without any additional text. My current code is as follows (see below). For example, when the user says “I am 26 years old”, the bot says: “I am 26 years old” is a great age. However, i would like the bot to recognize the number and only answer “26” is a great age (without the additional text that had been entered by the user).

Could anyone help me with this?

Thank you!
Aline

Flow:
“onReceive”: [
“builtin/setVariable {“type”:“user”,“name”:“age”,“value”:”{{event.payload.text}}"}",
“say #!builtin_text-7QM_oN”
]
Content:
text$en": "{{user.age}} is a great age!