Email Verifiation Function
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
Navigate to your FlowBridge environment
Click "Custom Functions"

Click "Download"

Go to your Voiceflow Project
Click "Functions"

Click this icon to import a function

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

Click "Import"

Click here again to upload the 2nd function

Click "Browse" and select the 2nd function included

Click "Import"

Click "Workflows"

Double-click here.

Click here.

Click "Text"

Click here.

Type "What is your email?"
Click here.

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

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

Type "user_email"
Click "Create New Variable"

Click "Create variable"

Click here and drag a line somewhere on the canvas

Click "Function"

Click "Select existing function"

Click "Flowbridge: Verify Email"

Click here.

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

Type "{em"
Click "user_"

Click here.

Go to the FlowBridge custom functions page and copy your license code
Paste the license code here

Click here.

Type "{signature"
Click "'add signature'"

Click "Create variable"

Click here.

Click here and drag a line somewhere on the canvas

Click "Text"

Click here.

Type "Email was invalid, type it again."
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.

Click here and drag a line somewhere on the canvas

Click "Text"

Click here.

Type "What is the code?"
Click "Capture" and drag it underneath the newly created text block step

Click here.

Remove the current variable text

Type "user_email_code"
Click "Create New Variable"

Click "Create variable"

Click here and drag a line somewhere on the canvas

Click "Function"

Click "Select existing function"

Click "FlowBridge: Verify Email Code"

Click here.

Type "{user"
Click "_email_code"

Click here.

Type "{sig"
Click "signature"

Click here and paste in the FlowBridge custom functions license

Click here and drag a line somewhere to the convas

Click "Text"

Click here.

Type "Invalid code, try again"
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

Click here and drag a line somewhere on the canvas

Click "Text"

Click here.

Type "Code was correct and successfull!"
Everything is now set up for email verification!
Last updated