Let people invite others to join a group?

Hey folks,

Can Boundless generate “invite links” to let people join a specific group?

If so, how? And how can I create a workflow that sends a new user an email to sign up with that link?

or how about URL parameters? Can I create a workflow to Go to /invite-to-family?familyID=1234 ? Then that invite page can show “Invite someone to Nelson Family

Thanks for asking this! I found a really cool pattern to do this awhile ago and I’ve been meaning to record a video and post to the forums, so let me do that now.

The short version is:

  • Create an Invites model (or maybe Family Invites for your app) with an Email, Accepted (boolean), & Family (associated record)
  • Let family members create new Invites, which should send the invitee an email with a link to a Record Page for the Invite
  • For the Invite Record Page, check the Require Logged In User, which means when a new user tries to visit, they’ll be prompted to first login or sign up. When they do sign up, they’ll be redirected to the Invite Record Page
  • On the Invite Record Page, you can display something like “Steve has invited you to join the The Hull Family!” With an Accept Invite button. This button should be in a Form that will edit the current invite. Add an Update Record action that will add the current user to the Invite’s family and update the invite’s Accepted field to true

I’ll record a video in a few minutes to better illustrate everything :sunglasses:

Here it is in all its halting glory!

Hopefully this helps illustrate the bullet points above. Let me know if you have any questions or if I can explain it better.

For extra credit you can add a Record List of Invites to a user’s dashboard page (assuming you have a dashboard page), just add a filter so you only show Invites where Invite.Email equals Current User.email :grin:

Amazing, this worked like a charm.

Now, I am trying to redirect the user to the Family they’ve just joined. Getting a 404. What I am doing wrong? Is it the fact that Current Family invites.Family.id is missing a colon? If so, how do I add it? The “page or URL” field does not let me add a colon.

When setting up a Record Page Go To action, it wants the record itself (not the id of the record). This way if you do decide to change how that record is looked up for that page, you don’t have to go back and update all the Go To actions as well—they automatically will generate with id, token or slug field as configured.