IMPORTANT: You can use this as an alternative for Debounce, as Debounce is currently not accepting new users right now.
Emailable is an alternate solution for real-time email verification. You may sign up for an account with with them by going to their website:
STEP 1: Create Q&A Email field
STEP 2: Click the Add Scripts button
STEP 3: Enter the name of the script, select Script as the type and set it as an Enter event
- You can name the script anything you want.
STEP 4: Paste this code
<script>
let api_key = 'YOUR_API_KEY_HERE';
let isFormNode = SET_TO_true_or_false;
let emailField, submitBtn, buttonTxt, typingWaitTimer, previousValue, restoreTxt;
const keyPressHandler = () => {
clearTimeout(restoreTxt);
submitBtn.disabled = true;
submitBtn.innerHTML = '<i class="fa fa-spin fa-spinner"></i> Verifying email...';
let value = emailField.value;
if (value != '' && value != previousValue) {
clearTimeout(typingWaitTimer);
typingWaitTimer = setTimeout(() => {
!submitBtn.classList.contains('hidden') && checkEmail();
}, 700);
}
previousValue = value;
};
const checkEmail = () => {
const requestOptions = {
method: 'GET',
headers: {
'x-api-key': api_key,
}
};
fetch(`https://api.usebouncer.com/v1.1/email/verify?email=${emailField.value}&api_key=${api_key}`, requestOptions)
.then((response) => response.json())
.then((result) => {
DT.setField('bouncer_status', result.status);
if (result.status === 'deliverable') {
submitBtn.disabled = false;
setTimeout(() => {
submitBtn.innerHTML = '<i class="fa fa-check-circle"></i> Email Verified';
}, 5);
restoreTxt = setTimeout(() => {
submitBtn.innerHTML = '<i class="fa fa-check-circle"></i> ' + buttonTxt;
}, 2000);
} else {
setTimeout(() => {
submitBtn.innerHTML = '<i class="fa fa-exclamation-circle"></i> Invalid Email';
}, 5);
submitBtn.disabled = true;
}
})
.catch((error) => console.log('error', error));
};
setTimeout(() => {
let a = document.getElementsByClassName('next-btn').length - 1;
let b = document.getElementsByClassName('submit-btn').length - 1;
submitBtn = isFormNode ? document.getElementsByClassName('submit-btn')[b] : document.getElementsByClassName('next-btn')[a];
buttonTxt = submitBtn.innerHTML;
submitBtn.classList.add('hidden');
emailField = document.querySelector('input[type=email]');
emailField.addEventListener('keyup', keyPressHandler);
}, 100);
</script>
STEP 5: Replace “YOUR_API_KEY_HERE” with your own actual API Key from Bouncer
STEP 6: Replace “SET_TO_true_or_false” to “true” if you are using a form node or “false” if not.
STEP 7: Save the node and Republish the Decision Tree
- This completes your setup of Bouncer email verification.