Create user
Function: Create User
This action allows you to create new user accounts within your application's built-in user database. It's perfect for onboarding new users, setting up administrative accounts, or integrating with external systems that provide user data.
Input
- First Name (STRING, Optional) The first name of the user you want to create.
- Last Name (STRING, Optional) The last name of the user you want to create.
- Email (EMAIL, Required) The unique email address for the new user. This will be their primary identifier.
- Password (PASSWORD, Required) The password for the new user account. This must meet your application's password strength requirements.
- Email verification (BOOLEAN, Required, Default:
True) Choose whether this user's email address needs to be verified after creation. If set toTrue, the user might receive an email to confirm their address. - Trigger email validation (BOOLEAN, Required, Default:
True) If email verification is needed, decide if the validation email should be sent immediately upon user creation or if it should wait until the user attempts to log in for the first time. - OTP (BOOLEAN, Required, Default:
True) Determine if this user needs to activate One-Time Password (OTP) authentication, also known as Multi-Factor Authentication (MFA), for enhanced security.
Output
- User variable name (USER, Default:
CREATED_USER) The name of the variable where the newly created user's information will be stored. You can then use this variable in subsequent actions. - The status (STATUS, Default:
USER_CREATION_STATUS) The name of the variable that will hold the outcome of the user creation attempt. Possible values include:SUCCESS: The user account was created successfully.USER_EXISTS: A user with the provided email address already exists.PASSWORD_INVALID: The provided password did not meet the required criteria (e.g., too short, missing special characters).UNKNOWN_ERROR: An unexpected issue occurred during user creation.
Execution Flow
Real-Life Examples
Example 1: Onboarding a New Customer
You want to create a new customer account after they complete a sign-up form on your website.
- Inputs:
- First Name: "Alice"
- Last Name: "Smith"
- Email: "[email protected]"
- Password: "SecureP@ssw0rd123"
- Email verification:
True - Trigger email validation:
True - OTP:
True - User variable name:
NewCustomer - The status:
CustomerCreationStatus
- Result: A new user account for Alice Smith is created. The
CustomerCreationStatusvariable will containSUCCESS, and theNewCustomervariable will hold Alice's user details. An email verification link is sent to [email protected] immediately.
Example 2: Adding an Internal Administrator
You need to manually add a new administrator to your application, but you don't want them to go through email verification immediately.
- Inputs:
- First Name: "Bob"
- Last Name: "Johnson"
- Email: "[email protected]"
- Password: "AdminP@ssw0rd!"
- Email verification:
False - Trigger email validation:
False - OTP:
False - User variable name:
AdminUser - The status:
AdminStatus
- Result: A new administrator account for Bob Johnson is created. The
AdminStatusvariable will containSUCCESS, and theAdminUservariable will hold Bob's user details. No email verification is required or triggered.
Example 3: Attempting to Create a Duplicate User
A user tries to sign up with an email address that is already registered in your system.
- Inputs:
- First Name: "Charlie"
- Last Name: "Brown"
- Email: "[email protected]" (same as Example 1)
- Password: "AnotherP@ssw0rd"
- Email verification:
True - Trigger email validation:
True - OTP:
True - User variable name:
AttemptedUser - The status:
SignUpStatus
- Result: No new user account is created. The
SignUpStatusvariable will containUSER_EXISTS, indicating that an account with that email already exists.
Example 4: Creating a User with an Invalid Password
A user attempts to create an account but provides a password that does not meet the application's security requirements (e.g., too short, no special characters).
- Inputs:
- First Name: "Diana"
- Last Name: "Prince"
- Email: "[email protected]"
- Password: "short"
- Email verification:
True - Trigger email validation:
True - OTP:
True - User variable name:
NewHero - The status:
HeroCreationStatus
- Result: No new user account is created. The
HeroCreationStatusvariable will containPASSWORD_INVALID, indicating that the provided password did not meet the security requirements.