I’m desperately looking for a way to exclude personal emails from my pipedrive form (I get a lot of fake forms or people looking for work). On my old form I was using simple javascript which excluded the selected emails and on the other hand allowed me to use a regex to check the integrity of the emails. Here is my code:
I’m well aware of this technique, which we already use. The problem is that I need to sort through the email directly to refuse personal emails. The people who contact us that I want to refuse are real people (looking for work or whatever), so I don’t have to worry about spam…
I see, thank you for specifying the problem further. Perhaps using Pipedrive Automations or a Pipedrive Webhook to check for said pattern, and removing where the condition matches could work for you. I think your best bet might be using Webhooks. This does require quite a bit of setting up, though.
How often does this occur? Sounds like this shouldn’t happen too frequently, and simply removing the lead could also suffice. Some companies also use regular email domains as their business email, and said logic would block these senders as well.
So if I understand your script correctly, you want to remove leads that match a certain e-mail adres domain. You could achieve this by an automation in Pipedrive. It is in Dutch, so i’ll translate:
Trigger ⇾ “Lead created”
Condition ⇾ e-mail contact person (or whatever field you want) ends with @yahoo.com or @outlook.com
Action ⇾ Delete said lead. (or perhaps add a label/move to other pipeline)
I haven’t found a way to validate the emails using Regex. For this part, you would have to implement a Webhook on the Lead endpoint and apply the custom logic here. But I think automations can get you quite far with a small investment of your time.
As said, we’re willing to help you with any custom logic.
The problem is that I get confirmation emails in my mailbox no matter what. I can use this technique to delete the contact on pipedrive, but the problem I have is that I want to completely block the form from the moment the lead clicks on “send form” so that I don’t receive a confirmation email or create a contact record on pipedrive. Hence the need for my regex.
The solution would be for me to modify the form code, but that’s obviously impossible.
Ah, yes, that does make things a bit harder. You could completely disable e-mail notifications, and send custom emails for where the condition is not true (as compared to the blocking leads automation), but that is quite tedious to maintain. Also, I’m not sure if disabling e-mail notifications also works for e-mails sent for forms. That is something you would need to try out.