The AddOn is not working as expected. I, currently, have no time for troubleshooting the code. I will eventually fix it. Apologies. Nacho.
Classroom Form Invite (CFI) is a Google Forms Add-On that allows to send Google Classroom invitations to students from a custom Form.
All you need is to create a Google Form, install the CFI Add-On, select to which class you want to send the invitations to, and publish your Form. It is important that you set up the Form settings to collect email addresses and to restrict to 1 response (only one invitation for a user and course may exist at a time).
This could be a great tool when you don't want your class code to be available to everyone in the world wild web, but somewhat control who access the class.
Ideal for online courses, you could grant students access to the class upon registration.