Lad magnet with company emails only. Possible?

I’m trying to make a lead magnet and considering your app. I want company emails from those downloading my lead magnet (It will be a drive link). I want to prevent the use of generic emails like Gmail or Yahoo. Is it possible?

A current build of OpenAI using a custom GPT called “Webflow How” produced this response to your inquiry. I don’t see any issues with it offhand. Maybe this can get you started.

================= Open AI =================
Yes, it’s absolutely possible to set up such functionality in Webflow, although Webflow doesn’t natively validate email domains like Gmail or Yahoo out of the box. However, you can achieve your goal by combining Webflow’s form submission capabilities with custom JavaScript and/or third-party tools. Here’s how:

1. Set Up Your Lead Magnet Form in Webflow

  • Design your form in Webflow, ensuring it has an email input field and any other fields you need (e.g., name, company, etc.).
  • Add a submit button to trigger the form submission.

2. Use JavaScript for Domain Validation

To block submissions from generic email providers, add custom JavaScript to your Webflow project. Here’s a sample script:

<script>
  document.addEventListener("DOMContentLoaded", function() {
    const form = document.querySelector('form');
    const emailField = document.querySelector('input[type="email"]');
    const genericDomains = ['gmail.com', 'yahoo.com', 'outlook.com', 'hotmail.com'];

    form.addEventListener('submit', function(e) {
      const email = emailField.value.trim();
      const domain = email.split('@')[1];

      if (genericDomains.includes(domain)) {
        e.preventDefault();
        alert('Please use a company email address to access the lead magnet.');
      }
    });
  });
</script>
  • Add this script in the Custom Code section of your Webflow project (either in the page settings or the project settings under “Footer Code”).

3. Enhance Validation with a Third-Party Tool

For more robust email verification:

  • Zapier/Webhook Integration: Use Zapier to route form submissions to an email verification service like ZeroBounce, Hunter, or NeverBounce. Reject submissions from personal domains using their API.
  • Use Form Providers: If you want a simpler solution, embed a third-party form tool like Typeform, Jotform, or HubSpot Forms that offers advanced validation rules.

4. Automate Access to the Lead Magnet

  • Once the form is submitted successfully with a valid email, redirect users to a “thank you” page containing the link to your lead magnet (Google Drive or other file-sharing platforms).
  • Alternatively, send an automated email with the link using Webflow’s native email functionality or an integration with tools like Mailchimp or Zapier.

5. Test Your Form

  • Test the form with a mix of company and personal email domains to ensure it works as expected.

====== END AI RESPONSE ==================

Code created with AI should always be reviewed and tested to insure it meets your requirements.