I have a Google Forms were the user writes her/his emailadress. When they do so, i would like it to auto add the emailadress/user to a Google Group.
I tried to do this with Apps Script, but i do not get any luck with it.
function addUserToGroup()
{
var emailadd = SpreadsheetApp.getActiveSheet().getRange("B2:B99");
var group = GroupsManager.getGroup("grouptest@mydomain.com").addMember(emailAdd);
}
I think i might be missing something in my script, but i don't know what it is.
I am domain admin Provisioning API is enabled.