Automated invitations to secure group membership


I would like to orchestrate some user flows by instrumenting some poll questions to automatically send an invitation to a user they first time he/she responds to the poll to join a group that will let them see other polls and posts. The categories of the first poll questions are open to everyone, but the categories of the second level questions have been set up by permissions to restrict what can be done to members only.

Has anyone done something like this?