Hi all, I have a slight problem when onboarding new users to a team when they don’t have an account.
In short, an admin can invite users to their team by typing in their email address which in turn triggers an email to be sent to that user. It also adds that user to a “Invited team member” list in the database. If they have an account, or are already logged in, the flow is straightforward. However, if they are brand new, then I need the user to sign up for an account before I can add them to said team. The problem I’m running in to is that when the user signs up, I then want to see if their email exists in that teams “Invited team member” list first but I don’t want to expose that list publicly in order to complete the workflow.
Does anyone know of another way around it? Could I use a backend workflow and use the “ignore privacy rules” function? The only problem there is that I wouldn’t have access to the email value field on the register form. I can’t seem to work it out in my head.
Yes, you can use a BF with ignored privacy rules for this, that’s perfectly fine. In order to get access to the email value, you can just pass this value to that BF as a text value.
Or, instead of keeping a list for invited users. Why don’t you use the action create an account for someone else? You can immediately add that user to the right Team/Company.
Yeah I tossed around the idea of creating an account for someone else but wanted to avoid that because some users may already have an account. And if they didn’t I then didn’t, I didn’t want to run a heavy DB query which checks to see if they user exists first. That was my reasoning for going against that idea but maybe I’m overthinking it?
Great - I thought a BE workflow would work best. When you say, pass the email value through as text - how would I do that? Sorry, I’m still quite new to BE workflows.
Regarding the heavy DB query, there’s no need for this. Bubble has a nice checkbox which simply returns the user if the account already exists. https://youtu.be/gwocxW4OlG4 - I’m not sure how your privacy rules are set up, but this - could - be a viable option.
To pass data to a BE workflow, you create a new parameter (managed in the BE WF itself) - you can give this any name, for example email and set the Type to text. When you trigger the BE WF from your signup page, you can pass the Input Email’s Value into the email parameter you created. You can then use that parameter in your actions within the BE WF.
@oliviercoolen - you’ve just blown my mind. I’ve been overthinking thinking the entire process. I never knew about the “return the user…” checkbox. Time to rebuild my flows! Thanks!