How to implement email verification in your forms using Arengu

Introduction
How to implement email verification in your forms using Arengu

Email verification is a great way to verify or authenticate your users when they submit a form. This verification system can help you reinforce your business security, get qualified leads and avoid spam. Learn how to implement email verification with Arengu and start getting real users!

How can email verification help my business?

If you run a form-based business, email verification has a lot of benefits you should consider. Nowadays, forms are everywhere and almost any digital business includes a form at some point. Whether yours include a payment form, a signup or login form or a just a simple newsletter subscription page, email verification can help you optimize your metrics.

Arengu is a low-code platform you can use to build forms, but also the logic behind them, including email verification and user verification via email. This is how to execute both of them with Arengu:

How to implement email verification in your forms using Arengu

1. Create your form

To implement email verification, first you have to create your form. Whether you need a registration form, a lead generation form or a one-time password form, you can use Arengu's templates and create your forms and logic in no time and without developing skills.

For this example, we will create it from scratch with a blank form.

Email verification forms with OTP
Choose an email verification form template or start from scratch to build a personalized form.

2. Add fields to your form and set them up

Add, modify or delete the fields that compose your form. You can incorporate new fields, delete the pre-existing ones or divide your forms into a multi-step form. Arengu is an easy and no-code form builder — you can modify every detail with the drag-and-drop editor and finish in no time!

For this use case, we have added 4 fields into two steps:

  • The first step of the form includes a name, email and comments field IDs. On this first step, the first flow will be executed after the user submits the form. This flow will identify if the user's email address is valid. If it is, it will proceed to generate a one-time password, that will be sent to the user's email.
  • The second step includes a code field ID so the user can enter the one-time password. The flow behind this field will check if the code is valid, so the user's identity can be verified.
Arengu's drag-and-drop form builder: How to create an email verification form
Click on the texts you want to modify or select the options on the menu

You can edit the ID of every field to easily identify their role. Just remember to reference them correctly afterwards!

3. Create flows: How to implement email verification forms with Arengu

Arengu's templates automatically generate the logic behind the forms. In this case, we haven't selected any template, so we will create the flows manually as well.

Our first flow will include an email verification flow. If the user's email meets your needs, the flow will continue to generate and send a one-time password to the user's email. This way, you can first filter the email addresses and then verify the user's identity.

Click on 'Create a flow' and then click on the '+' symbol.

How to create a flow with Arengu: List of Actions
If you want to create a flow from scratch, just click on 'Create a flow' and select all the actions you need.
  • Verify email address: This flow action is designed to filter spam email addresses or filter addresses as you prefer. You can modify it to your business needs, in order to filter non-desirable email addresses. For instance, temporary emails or email aliases usually translate into unqualified leads. Get rid of them easily with the setting options. You can also filter any email addresses you wish by adding them to a whitelist or a blacklist.
Email verification flow for forms - Arengu
Check or uncheck the boxes to personalize the 'Email verification' action. This action will help you filter spam accounts and refine your lead acquisition system.
  • Input value mapping: If you want to show a message after the rules of the previous actions have been verified, you can use the 'Input value mapping action'. Fill the fields on the left in the 'Mapping table' according to the boxes you have checked:

MISSING_MX_RECORD: If you checked the box 'Require MX record'
FREE_EMAIL: If you checked the box 'Block free email providers'
DISPOSABLE_EMAIL: If you checked the box 'Block disposable email providers'
EMAIL_ALIAS: If you checked the box 'Block email account aliases'

On the right side, write the message you want to display related to each error. For instance:

DISPOSABLE_EMAIL Sorry! You have used a disposable email. Please use a valid email address so we can contact you.

Input value mapping: Email verification for signup forms

So far, we have seen you can implement email filtering to improve your verification system. But you can also go one step further and send an email to the user to verify the user and not just the email address.

  • If/then condition: You can use this action to create two different paths after the email verification. If the email is valid, the flow will continue and execute the following actions. In this case, the condition you have to set is 'is true'. To reference the previous action add {{verifyEmailAddress.body.valid}}. This action will then recognize if the email is valid or not.
Email verification form with OTP - Build logic without coding
  • Generate one-time password: The first action you need to add is the 'Generate one-time password' action and this will automatically generate an OTP.
How to generate one-time passwords using Arengu
  • Send SendGrid email: To send a one-time password, you can choose among several email providers or you can send it via SMS too. In this case, we will use SendGrid. If you want to use your own email or SMS provider, you can build this actions yourself with the action 'HTTP Request'.
How to implement email verification and OTP via email with Arengu

To be able to send an email to your user with SendGrid, you will need the API key. This value is mandatory and you can find in your SendGrid account. Go to Settings > API Key:

How to create an API Key in SendGrid
To create an API key on SendGrid, go to Settings > API Key and set up your preferences.

After the API key is created, you will be able to see and copy the API key.

How to get API Key in SendGrid

In Arengu, copy this code in the field 'API Key' to be able to send emails with SendGrid.

Fill the 'Sender email' field with the email address you want to send the email with.

Fill the 'Recipient email' field with the reference {{input.body.email}}.

Afterwards, write your subject line and the message of the email. This message should include the reference {{generateOTP.code}} on it. You can edit the looks of the email with HTML or upload an existing template.

4. Add a new flow: Verify the code and the user's identity

The last step comes after the user enters the code they have received in their email. To verify this code, we will create the last flow as it follows:

  • Verify one-time password: Add this action and fill the references with {{input.body.email}} and {{input.body.code}}.
Add an email OTP to your forms, without coding, with Arengu
  • If/then condition: Last, add the action 'If/then condition' to be able to send each message according to the result. Set the action with the correspondent reference and set the condition as 'is true'. The flow will then offer two different messages — a success message or a failure message.

This is how your form looks like now!

To have an overview of your forms and flows or to link your flows with every step of the form, go to Forms > Flows.

When using a template, all the flows will be already in place. In this case, we added two flows manually. To link the flows with the forms, click on the drop-down menu and select the flow you want to add. In this case, the 'Email Verification + OTP via email' goes in the first step of the flow. The 'Verify OTP' goes in the second step of the flow. This way, if the email doesn't meet your filtering requirements, the OTP actions won't have to be executed!

Email verification form with OTP via email
Go to Forms > Flows to have an overview of the connections between the form and the flows.
View Comments
Next Post

Organize new users and their access with approval forms

Previous Post

How to block spam on registration forms and clean your UX