APIs & Integrations

drbipes
Contributor

Is it possible to create a global domain block list using the Forms API?

Goal: An app to integrate into the email field blocked domain list.  We have many forms and every time we need to add a domain to block the list has to be copied and pasted manually.

 

Details: I do not want to have to have forms recreated outside of Hubspot.  The idea is that there is a global list of domains to block, or it could pull the domain from an existing hubspot list (ex: competitors).  Possibly a check box on the form to tell it to use the global block list, similar to the "Block Free Domains" checkbox.  Or a list of forms to use the global domain block on.

 

I am not sure if something like this is possible but many people would like this to be a feature of Hubspot.

 

Method?

I am not a programmer but have one on my team.  I need to be pointed in the right direction so I can explain to him what needs to be done.

Ideas:

  • Update an existing form field? - use to update 
    use to update blocked email field - I see it says not to use the API
  • "validation": {
              // A set of options controlling the validation for the field
              // NOTE: These options should NOT be modified through the API. Any validation should be set up in the form settings in HubSpot.
                "name": "",
                "message": "",
                "data": "",
                "useDefaultBlockList": false,
                "blockedEmailAddresses": []
              },

 

Any ideas, criticisms, comments are welcome and appreciated.

0 Upvotes
1 Reply 1
WendyGoh
HubSpot Employee
HubSpot Employee

Is it possible to create a global domain block list using the Forms API?

Hey @drbipes,

 

Thank you for sharing such a detailed use case. You're spot on to say that it is currently not possible to block email domains on form at a portal level and looking through the ideas you shared, I do have some thoughts around it:

 

1. When looking to update the block email field using the Update an existing form | Forms endpoint, you'd still need to copy and paste the blockEmailAddresses list into the array. Alternatively, you can save the list of blockEmailAddress onto a array variable. I'd think saving it as a variable may work better for your team as you do not have to consistently copy and paste the value. 

 

2. For this, I'd love to share with you this similar discussion on our dev forum - Solved: HubSpot Community - Form Email Validation - Block all providers except... - HubSpot Communit... in which Connor shared a possible way of using JavaScript to check the email domain. 

 

Additionally, there's another idea that I'd love to share with you - Solved: HubSpot Community - Bulk blocking email domains from forms - HubSpot Community; where user Frank suggested setting the lead status contact property to UNQUALIFIED DELETE based on the email domain using HubSpot workflow.

 

Let me know your thoughts here!