How To Create Account For Someone Else In

This guide will teach you how to create an account for someone else in Bubble. The process includes:

  1. Understanding why you’d need to create an account for someone else
  2. Building the workflows
  3. Sending a password reset email

Full Transcript of Tutorial

1. Understanding why you’d want to create an account for someone else

Now, why would you ever need to create an account for someone else within an app? If you’re building an application that hosts teams of users, it’s the perfect way for someone to invite another team member into a shared workspace. It not only sends a user a formal invite, but it also handles the process of actually signing that user up into the app database. As a result, it saves the receiving person a myriad of time throughout the process.

2. Building the workflows

When it comes to creating this feature, we’ll start by opening our Bubble editor. Within my editor, you’ll see that I’ve created a dashboard that allows me to enter the details of new users. To the right-hand side of the screen, you’ll also notice I’ve built a form that allows me to input a user’s name and email. Below the form on my page, I’ve also added a button element. This will be used to trigger a workflow whenever it’s clicked.

If I open my workflow editor, I’ll create a new workflow and select from the ‘account’ option. Within this option, I can choose the ‘create an account for someone else’ action. If I select this, you’ll notice that Bubble now requires you to input the email of the person you’d like to invite.

While it’s only mandatory to add an email for this new user, you can also store any additional data you’d like throughout the process.

If you remember, on my dashboard page, I had an input field that stored a user’s name. It’s at this point that I can reference both the email and name fields in my workflow action.

Now, whenever this step in our workflow runs, a new account will be created in our database. If the user who’s being invited already has an active account, this step in our workflow will halt as it won’t need to create a new entry.

At this point, when the workflow now runs, it will successfully create an account for someone else, but how will this new user know this information?

3. Sending a password reset email

When a user has a new account created on their behalf, we’ll also need to create a layer of security for this person to safely access their profile. It’s at this point that we can now send a password reset email to this user.

Within our workflow, we’ll select to add an additional step. We’ll then select the option to send a password reset email.

Inside any Bubble application, there’s a default page known as the ‘password reset’ page. The sole purpose of this page is to send users who receive a password reset email to a portal where they can update this sensitive data within our application.

Back in our workflow editor, we’ll need to identify the email address is that we’d like to send a password reset email. In this case, it’ll be the email address for the account that we’ve just created.

When sending this email, we can also choose to customize both the subject line and body text for our message.

When it comes to the body section of our email, we’ll add a standard message like, “Hi, {users name}, welcome to {your app name}. You have been invited to complete the registration of your account. Click the link to set your password”. 

After sending our password reset email, we’ll then add one more step to our workflow. Within this step, we’ll just reset the value of the input form used to store a user’s name and email address. By resetting this value, it allows us to continually add in new entries with ease.

If you now run a preview of your application, you’ll see that when we select the input field on our dashboard, we can add in the credentials of a new user. Once submitted, our workflow will run and this will deliver our password reset email to their address.

If we open the email account of the receiving user, you’ll notice we’ve received an invite message prompting us to follow the link and set a secure password for our new profile. Once we click on this link, we’ll be redirected to our password reset page, from which, I can add whatever password I’d like. 

Once you’ve submitted a new password, a workflow will run and update this information within our database. From this point forward, a user now has the ability to access your application through their newly created account.

And just like that, you can see how easy it is to create an account on behalf of someone else within Bubble. Of course, all of this was created without having to write a single line of code.

Never miss a course 👇