Email Verifiation Function

With the FlowBridge email verification function, you can validate and confirm the email the user has provided is real by sending out a code the user needs to fill in to verify their email.

Guide:

The Functions

There are 2 functions being used, the Email Verification function and the Code Verification function.

The function will send an email through our [email protected] email address without any branding.

Email Verification Function

This function sends out the email and returns a signature token to ensure security while verifying the email. You will need to save the signature token in to a variable in your Voiceflow project and use it again in the Code Verification function

Input Variables

License - The FlowBridge custom functions license found on the custom functions page on your FlowBridge environment

Email - This is the email of the user, generally you would ask this and use a capture step to save it

Project ID - This is an optional field. You can type "none" (Without the quotes) to skip this. If you choose to set a Project ID, this will be saved and visible from the client dashboard on FlowBridge

Output Variables

Signature Token - For security reasons, this randomized token is required to use the second part of the email verification process with the "Verify Email Code" function. You will need to save this in a variable on Voiceflow to make use of it.

Email Code Verification Function

This function will accept the code from the user and verify if the code & signature match what was sent to the user for verification.

Input Variables

License - The FlowBridge custom functions license found on the custom functions page on your FlowBridge environment

Signature - This is the signature provided as output variable from the "Email Verification" function. This is used for security purposes

Code - The code provided by the user which they received in their email. Generally you would receive this through a capture step.

Step-by-step guide

  1. Navigate to your FlowBridge environment

  2. Click "Custom Functions"

  1. Click "Download"

  1. Go to your Voiceflow Project

  2. Click "Functions"

  1. Click this icon to import a function

  1. Click "Browse" and upload 1 of the 2 functions included in the zip file (Make sure to unarchive the zip file first)

  1. Click "Import"

  1. Click here again to upload the 2nd function

  1. Click "Browse" and select the 2nd function included

  1. Click "Import"

  1. Click "Workflows"

  1. Double-click here.

  1. Click here.

  1. Click "Text"

  1. Click here.

  1. Type "What is your email?"

  2. Click here.

  1. Click "Capture" and drag it on to the same block as where the text is

  1. Double-click the "Select or create variable" field.

  1. Type "user_email"

  2. Click "Create New Variable"

  1. Click "Create variable"

  1. Click here and drag a line somewhere on the canvas

  1. Click "Function"

  1. Click "Select existing function"

  1. Click "Flowbridge: Verify Email"

  1. Click here.

  1. Type "none" if you don't want to associate it with a project

  2. Click here.

  1. Type "{em"

  2. Click "user_"

  1. Click here.

  1. Go to the FlowBridge custom functions page and copy your license code

  2. Paste the license code here

  1. Click here.

  1. Type "{signature"

  2. Click "'add signature'"

  1. Click "Create variable"

  1. Click here.

  1. Click here and drag a line somewhere on the canvas

  1. Click "Text"

  1. Click here.

  1. Type "Email was invalid, type it again."

  2. Click here and drag a line back to the capture step for the email. This path is used if the email was deemed as invalid thus you will ask the user to type it it again.

  1. Click here and drag a line somewhere on the canvas

  1. Click "Text"

  1. Click here.

  1. Type "What is the code?"

  2. Click "Capture" and drag it underneath the newly created text block step

  1. Click here.

  1. Remove the current variable text

  1. Type "user_email_code"

  2. Click "Create New Variable"

  1. Click "Create variable"

  1. Click here and drag a line somewhere on the canvas

  1. Click "Function"

  1. Click "Select existing function"

  1. Click "FlowBridge: Verify Email Code"

  1. Click here.

  1. Type "{user"

  2. Click "_email_code"

  1. Click here.

  1. Type "{sig"

  2. Click "signature"

  1. Click here and paste in the FlowBridge custom functions license

  1. Click here and drag a line somewhere to the convas

  1. Click "Text"

  1. Click here.

  1. Type "Invalid code, try again"

  2. Click here and drag a line to the capture step where you want to capture the code the user needs to input so we can ask it again if they filled in an incorrect code

  1. Click here and drag a line somewhere on the canvas

  1. Click "Text"

  1. Click here.

  1. Type "Code was correct and successfull!"

  2. Everything is now set up for email verification!

Last updated