Forum Academy Marketplace Showcase Pricing Features

I'm sure this is easy for someone out there :)

Hi fellow bubble users.

I’m setting up a niche job board and am stuck on a feature I’d like to have.

Take two of my data types: users and companies.

User no 1 for a particular email domain, say @example.com, will sign up and set up the company profile. What I want is for when a subsequent user signs up with @example.com email domain to see the company profile already populated and the jobs associated with that company etc. I can see the logic for when you invite a user to join your company, but I would like access to the company profile to be linked to the email domain.

Help is much appreciated.

Thanks
James

I’m not sure of the exact regex expression but you should be able to extract the “example.com” from email addresses with regex. Look online to see what the exact expression is.

Then upon signup, you’d simply do a search for companies that match the current user email (extract company with regex).

Learn no code → nocodify.com

Quick google search shows this regex to extract the company name:
(?<[email protected])[^.]+(?=.)

Found on: Regex get domain name from email - Stack Overflow

Thanks for the response. Am having a bit of a nightmare with the logic (I can think it, but can’t convey it on bubble correctly!) on the ‘search for’ part of your answer.

So step 1 is sign the user up. Then step 2 is the above screenshot. I’m attempting to change the current users CompanyLink field to the unique ID of an existing company if the current user domain = the company domain if it can be found. I’ve tried so many variations of contraints and only whens that I now feel totally lost. Any additional help is very welcome. Thanks

Hi there, @jamesnd… if I understand your post correctly, maybe something like the following will work for you. Use the Account >> Make changes to current user workflow action, and set up the step like this…

Hope this helps.

Best…
Mike

Edit: @samnichols makes a great point, of course (I assumed you would be doing some sort of email verification for the reason he mentions), and I updated my screenshot with an Only when condition that shows one way you could go on that front.

For what it’s worth, I’d definitely make sure you have email verification setup before they get automatically connected with a company. I think it’s a great UX to automatically connect them, but you don’t want just anyone signing up, putting in an email for a domain they don’t actually have an email with, and getting into that company in your app where they might be able to see sensitive data the company doesn’t want public.

2 Likes

Mike. That was super helpful, thank you so much. The feature worked exactly as I hoped it would. And to your point @samnichols I will definitely be using the email verification tool to prevent the very thing you warn against. I’m new to bubble so am playing around and getting used to the data flows before putting my idea into proper action. Thanks both for your help :slight_smile:

2 Likes