Sign user up only if email address is present in a list of approved email addresses

Hi there, I’m building a web app that lets a user create a workspace for a company and then allows that user to invite people based on an email address they enter. When the email is entered my app triggers an email to be sent which allows that user to then sign up to that workspace. The workflow is working exactly how I want but I want to add an extra layer of protection so that someone can’t forward that email along to a friend and sign up for that workspace.

The solution I came to was to capture the email address of the invited person and add it as a text field in to my DB called “Invited User” which is a list. The part I’m getting stuck on is figuring out how to validate the email they’re using to sign up with against the “Invited User” field list in my DB.

This is as far as I’ve got but I know it’s wrong, can anyone point out where I’m going wrong?

Current Page Team’s Invited user:(filtered):firs item mail contain this Input Email’s value

In filters add constr
Invited User Email = Input Email value
Invited User Email contain Input Email value

Hi @Eugene_West , thanks for getting in touch!

I’ve tried adding that in but for some reason it’s not working. Could you tell me what the “first item” does? Does that check the first item of the “Invited User” list? Also, is there a way to do the validation on the email field and throw an error if the “Only when” criteria isn’t satisfied? At the moment it’s not adding the user to the table (I’m assuming because the condition I’ve written isn’t correct) but is still going to the next page.

Thanks for your help!

@Eugene_West - So I’ve managed to get the the form submitting properly by removing :first-item and that works great. The only problem is now that the form submits even when the invited user isn’t present (it doesn’t add the user as the condition doesn’t allow it). Is there a way of checking if the email input is equal to the invited user before the form is submitted. And if so, can I enter a custom error message (i.e - this user hasn’t been invited to this workspace)? Thanks again!

Actually, I’ve figured it out - I just added another click action and did the inverse and showed an error message!Thanks again for your help :+1:

1 Like