Fill a slot if the user wants or not

I want the following example in my chatbot:

Bot: do you want to give me a name?
User: yes
Bot: What is the name?
User: Carla

and the slot “name” is filled with “Carla” or

Bot: do you want to give me a name?
User: no
Bot: ok, bye

Use a from_text mapping to fill the name, unless the deny intent is detected:

slots:
  name:
    type: text
    mappings:
    - type: from_text
      not_intent: deny