Form actions not working

I am trying to invoke a form (with four slots) and store the data in Google sheets using custom actions. I tried following the Rasa Demo bot example but fail to get my form to work.

My action file contains two actions : form action and chitchat action. The chitchat action works fine. Here is my file (5.5 KB) file: (20.7 KB) file : (6.5 KB)

domain.yml file :
domain.yml (24.3 KB)

As for the Gdrive api part, I enabled the drive and sheets apis and downloaded the credentials file and used the same in the file. Please let me know the mistake and also if my file is correct.

Your required slots function holds several undefined slots. For example theres ‘buisness email’, but later you use a slot called simply ‘email’, they have to be the same in order to work. Other likes ‘program’ or ‘intake’ are saved but not required. Are you ok with them being None?

Your validate_email-function does nothing actually. The FormAction-superclass will ask for a slot until its filled.

On a side note, im not even sure if slot names with spaces work, since there cant be a validate_{slotname} with spaces. Anyway I would never really on any whitespace character in code.

@IgNoRaNt23 Hey, Thanks for pointing out the incorrect slot names. I edited my file now and the slots work but only the ‘program’, ‘intake’, and ‘person_name’ slots show filled valued during the interactive training. The slot ‘email’ shows None. There is an error “FormPolicy predicted no form validation based on previous training stories. Make sure to remove contradictory stories from training data. Otherwise predicting no form validation will not work as expected.”

Should be another function to store the form values? I want to store the information in google sheets after the corresponding slots get filled. I don’t know how to achieve this. (Please check my now edited if possible ) Thanks in advance!

Well, the interactive mode are a bit behind and might not show the latest set slot correctly. You may write an ‘utter_success’ template for example, where you output all the slot values just to what was set for testing. Or just look whats getting written into your google sheet. But as I said, the form will keep asking until every required slot is no longer ‘None’