Check if an email domain through webhook exists in a google sheet list

I have a workflow that takes a webhook input from a website submission, uses the Zerobounce API to validate the email, and then is intended to go down certain routes depending on if valid.

If the email is valid, I want to check it against a list of competitors - Using the IF block I can have it show false when an email is used that doesn’t match the list, however when an email does, it’s showing both True and False.

What is the error message (if any)?

Please share your workflow

It is also pulling the other 30 items in the list that don’t match, into the false column and triggering.

I’m using “matches Regex” to see if a field which is domain (which is the domain part of the email) matches a list of domains that are in a column in Google Sheets.

I’m guessing it’s something to do with the if filtering the true and the false responses

Information on your n8n setup

  • n8n: Cloud:
  • N8N: Cloud?:
  • n8n EXECUTIONS_PROCESS setting: No idea:
  • Running n8n via n8n cloud
  • Windows

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

I’ve tried combining the array of competitor domains into a single string, and then checking from there, but then it throws different errors:

@ahds , your approach doesn’t sound right to me. I would merge the email domain with the list of domains you pull from Google Spreadsheet. That would reveal if the match is found or not.

Thanks @ihortom , I can see how this could work - I’ve just tried it however and it doesn’t seem to recognise the domain:

Here is how the google sheets output looks:

Is there something I need to do to standardise both domains?

hello @ahds

Please, share the workflow by copying its nodes and pasting them into the code tag.

@ihortom I get this error

This is the cadence with a merge


Is the below what you’re looking for? I’ve taken out my tokens and some IDs FYI

Try this one

1 Like

@barn4k I spent about 6 hours last night trying to do this.

You just solved it minutes after me replying with my code.

Thank you so much :heart:


I have a workflow that I do use for my internal validation. You can check it out here
Email Verifier
I will leave it open for a few days before taking it down.
This one can validate a single email or bulk email. For a single email just add your email then submit and you get a full list of all the domain metrics including Validation, deliverable, MX records, etc that are relevant for the campaigns.
For bulk verifications just upload a list with Email addresses and the email to receive the verified email on.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.