Verify Emails on Google Sheets Using Custom Function

Search for a command to run...

No comments yet. Be the first to comment.
If you're running influencer campaigns for your Shopify brand and trying to keep track of replies manually, you're probably losing time and missing follow-ups. I’ve been there. I run influencer outreach for several Shopify stores, and I used to manag...
We’ve tried out lots of apps over time, and honestly—not all of them do what we really need. That’s why I’m writing this blog post: to share some of the challenges we’ve noticed with the Shopify Forms app and hear what others think too. If you’ve fou...
Hey everyone, Dorothi Viki here. For the last decade, I’ve been in the digital marketing trenches. I’ve managed budgets big and small, and I’ve seen firsthand how crucial it is to know what people are saying about you online. When you’re starting out...
If you’re a small business owner, freelancer, or consultant, your website is your storefront. But traditional website development can be expensive, slow, and intimidating. Platforms like SpreadSimple remove these barriers by allowing you to turn Goog...

For SEO professionals, content marketers, freelancers, and consultants, keyword research is non-negotiable. It’s the foundation of any effective search strategy. However, with so many tools behind paywalls, finding a reliable, high-quality, free Goog...
With the rise of AI agents and Claude-specific development environments, understanding Claude Code has become essential for modern developers, freelancers, and consultants. Whether you're building Multi-Component Programs (MCPs) or designing autonomo...
Hey there! I’m Dorothi Viki, and today I’m going to walk you through a super practical way to verify emails directly in Google Sheets using a custom function. Whether you're managing a newsletter, running a business, or just need to clean up your email list, verifying email addresses can save you from bounces and spam traps. From my experience, integrating email verification into Google Sheets can massively improve your email deliverability and keep your contacts clean. And guess what? We’re going to do this with MillionVerifier’s API!
If you work with email lists, you already know the importance of verifying them. Here are some key benefits:
Reduces bounce rates: Sending emails to invalid addresses harms your sender reputation.
Prevents spam traps: Some fake emails are actually traps designed to catch spammers.
Saves money: Many email marketing tools charge based on the number of emails sent.
Increases engagement: A clean email list means higher open rates and better email marketing performance.
With Google Sheets and a little scripting magic, we can verify emails in bulk, right inside the spreadsheet. Let's dive into it!
Before we create the custom function, we need to get an API key from MillionVerifier.
Go to MillionVerifier and sign up for an account.
Once logged in, navigate to the API section.
Copy your API key. We’ll need this in our script.
Open a new or existing Google Sheet.
Click on Extensions > Apps Script.
Delete any existing code and paste the script below.
/**
* Verify email using Millionverifier
* @param {email} input email
* @return result
* @customfunction
*/
function VERIFY_EMAIL(email) {
var apiKey = "tfXNVowLxOW5PaRYUWo76FE96";
var url = "https://api.millionverifier.com/api/v3/?api=" + apiKey + "&email=" + encodeURIComponent(email) + "&timeout=10";
try {
var response = UrlFetchApp.fetch(url, { muteHttpExceptions: true });
var json = JSON.parse(response.getContentText());
var resultMapping = {
1: "ok",
2: "catch_all",
3: "unknown",
4: "error",
5: "disposable",
6: "invalid"
};
var resultValue = resultMapping[json.resultcode] || "Unknown Result";
return [json.result];
} catch (e) {
return "API Error";
}
}
Once you've added the script, follow these steps to use it:
Close the script editor and return to your Google Sheet.
Use the function like any other built-in function.
=VERIFY_EMAIL(A2) where A2 contains an email address.Wait for the result – Google Sheets will call the API and return one of these:
ok (Valid email)
catch_all (Might be valid but uncertain)
unknown (Could not determine)
error (Something went wrong)
disposable (Temporary email address)
invalid (Fake or mistyped email)
This usually happens if:
Your API key is incorrect or expired.
MillionVerifier's service is down.
You've exceeded your API quota.
Solution: Double-check your API key and ensure you have available requests left in your MillionVerifier account.
If you notice slow responses:
Google Sheets functions run one at a time, so verifying thousands of emails might take longer.
You can optimize by verifying smaller batches of emails.
Some email servers block verification requests. In such cases, you might get catch_all or unknown. You may need to manually check these addresses.
Now that you can verify emails in Google Sheets, here are a few ways to improve your workflow:
Use Google Sheets filters to remove emails marked as invalid, error, or disposable.
You can modify the script to verify an entire column automatically without manually entering formulas.
Once you clean your email list, export it as a CSV and import it into your email marketing tool.
If you need any help, feel free to reach out to us at makeinfo.co/contacts. We’re happy to assist you with any issues or questions!
By implementing this Google Sheets custom function with MillionVerifier, you can save time and ensure that your email lists are accurate and up-to-date. I’ve used this approach for email marketing, client outreach, and internal data verification—and it works like a charm.
If you found this guide useful, share it with your team or anyone struggling with email verification. And if you have any questions, feel free to drop them in the comments below!