Skip to content

Integration

Verify emails in Google Sheets.

Select a column of email addresses, choose Verify, and get Passed, Failed or Unknown with a reason in the columns next to them. It uses your EasyMailVerify API key and normal pay-as-you-go credits.

  1. 1Create an account , buy credits, then create an API key on the API keys page.
  2. 2In your Google Sheet, open Extensions → Apps Script, delete any code there, paste the script below, and click Save.
  3. 3Reload the sheet. An EasyMailVerify menu appears. Choose 1. Set API key and paste your key. Google asks you to allow the script the first time; it only reads the selected cells, writes results next to them, and calls easymailverify.com.
  4. 4Select the column of emails (with or without the header) and choose 2. Verify selected emails. A few minutes later, choose 3. Get results.
  5. EasyMailVerify.gs
    // EasyMailVerify for Google Sheets
    // Docs: https://easymailverify.com/integrations/google-sheets
    const EMV_API = "https://easymailverify.com/api/v1";
    const EMV_COLUMNS = ["Result", "Reason", "Suggested email", "Disposable", "Role account", "Catch-all", "Free provider"];
    
    function onOpen() {
      SpreadsheetApp.getUi()
        .createMenu("EasyMailVerify")
        .addItem("1. Set API key", "emvSetKey")
        .addItem("2. Verify selected emails", "emvVerifySelection")
        .addItem("3. Get results", "emvGetResults")
        .addItem("Check credit balance", "emvBalance")
        .addToUi();
    }
    
    function emvSetKey() {
      const ui = SpreadsheetApp.getUi();
      const res = ui.prompt("EasyMailVerify API key", "Paste a key from easymailverify.com/api-keys (starts with emv_live_).", ui.ButtonSet.OK_CANCEL);
      if (res.getSelectedButton() !== ui.Button.OK) return;
      const key = res.getResponseText().trim();
      if (!/^emv_live_[0-9a-f]{64}$/.test(key)) return ui.alert("That doesn't look like an EasyMailVerify API key.");
      // Stored for you only; other editors of this sheet can't read it.
      PropertiesService.getUserProperties().setProperty("EMV_KEY", key);
      ui.alert("API key saved.");
    }
    
    function emvRequest(method, path, body) {
      const key = PropertiesService.getUserProperties().getProperty("EMV_KEY");
      if (!key) throw new Error("Set your API key first (EasyMailVerify > 1. Set API key).");
      const options = {
        method: method,
        contentType: "application/json",
        headers: { Authorization: "Bearer " + key, "Idempotency-Key": Utilities.getUuid() },
        muteHttpExceptions: true,
      };
      if (body) options.payload = JSON.stringify(body);
      const res = UrlFetchApp.fetch(EMV_API + path, options);
      const data = JSON.parse(res.getContentText() || "{}");
      if (res.getResponseCode() >= 400) throw new Error((data.error && data.error.message) || "Request failed (" + res.getResponseCode() + ")");
      return data;
    }
    
    function emvVerifySelection() {
      const ui = SpreadsheetApp.getUi();
      const sheet = SpreadsheetApp.getActiveSheet();
      const range = sheet.getActiveRange();
      if (!range || range.getNumColumns() !== 1) return ui.alert("Select one column of email addresses first.");
      const emails = range.getValues().map(function (r) { return String(r[0]).trim(); })
        .filter(function (e) { return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e); });
      if (!emails.length) return ui.alert("No email addresses found in the selection.");
      const ok = ui.alert("Verify " + emails.length + " addresses?", "Duplicates are checked once. Passed and Failed results use 1 credit each; Unknown results are free.", ui.ButtonSet.OK_CANCEL);
      if (ok !== ui.Button.OK) return;
      const list = emvRequest("post", "/lists", { emails: emails, name: SpreadsheetApp.getActive().getName() + " / " + sheet.getName() });
      PropertiesService.getDocumentProperties().setProperty("EMV_JOB", JSON.stringify({
        id: list.id, sheet: sheet.getName(), row: range.getRow(), col: range.getColumn(), rows: range.getNumRows(),
      }));
      ui.alert("List submitted", list.unique_emails + " unique addresses are being checked. Use EasyMailVerify > 3. Get results in a few minutes.", ui.ButtonSet.OK);
    }
    
    function emvGetResults() {
      const ui = SpreadsheetApp.getUi();
      const job = JSON.parse(PropertiesService.getDocumentProperties().getProperty("EMV_JOB") || "null");
      if (!job) return ui.alert("Nothing submitted yet. Select emails and use 2. Verify selected emails.");
      const list = emvRequest("get", "/lists/" + job.id);
      if (list.processed < list.unique_emails && !/^complete/.test(list.status))
        return ui.alert("Still checking: " + list.processed + " of " + list.unique_emails + " done. Try again shortly.");
      const byEmail = {};
      for (let offset = 0; ; offset += 5000) {
        const page = emvRequest("get", "/lists/" + job.id + "/results?limit=5000&offset=" + offset).results;
        page.forEach(function (r) { byEmail[r.email.toLowerCase()] = r; });
        if (page.length < 5000) break;
      }
      const sheet = SpreadsheetApp.getActive().getSheetByName(job.sheet);
      const values = sheet.getRange(job.row, job.col, job.rows, 1).getValues();
      const yes = function (b) { return b ? "Yes" : ""; };
      const out = values.map(function (r, i) {
        const r0 = byEmail[String(r[0]).trim().toLowerCase()];
        if (!r0) return i === 0 && !/@/.test(String(r[0])) ? EMV_COLUMNS : EMV_COLUMNS.map(function () { return ""; });
        return [r0.status.charAt(0).toUpperCase() + r0.status.slice(1), r0.reason, r0.suggested_email || "",
          yes(r0.disposable), yes(r0.role_account), yes(r0.catch_all), yes(r0.free_provider)];
      });
      sheet.getRange(job.row, job.col + 1, out.length, EMV_COLUMNS.length).setValues(out);
      ui.alert("Done", "Results were added in the " + EMV_COLUMNS.length + " columns to the right of your emails. " + list.passed + " passed, " + list.failed + " failed, " + list.unknown + " unknown.", ui.ButtonSet.OK);
    }
    
    function emvBalance() {
      const b = emvRequest("get", "/balance");
      SpreadsheetApp.getUi().alert("You have " + b.credits_available.toLocaleString() + " credits available.");
    }
    

What you get in your sheet

  • Result: Passed, Failed or Unknown.
  • Reason: a plain-language explanation, such as a mailbox that doesn't exist or a misspelled domain.
  • Suggested email: a likely correction when the domain looks like a typo.
  • Disposable, Role account, Catch-all, Free provider: flags to help you decide what to keep.

Prefer to upload a file?

Download the sheet as CSV and use bulk email verification instead. Developers can call the REST API directly.

Check whole lists, not one address at a time

Upload a CSV or TXT file and see every address marked Passed, Failed or Unknown, with a reason. Pay as you go; credits never expire and Unknown results are free.

Verify a list

Frequently asked questions

Does this cost extra?

No. The script is free; it uses your normal credits. Passed and Failed results use one credit each, Unknown results are free, and duplicates are checked once.

Where is my API key stored?

In your own Google account's private script storage (user properties). Other people who can edit the sheet can't read it. You can delete the key from your EasyMailVerify API keys page at any time.

How many addresses can I check at once?

Up to 50,000 per run, the same limit as an uploaded file. Large lists take a while; use Get results to see progress.

Will results overwrite my data?

Results are written into the seven columns directly to the right of the emails you selected, so leave those columns empty.

Does it work with Excel?

Not directly; Excel can't send the secure headers the API needs. Export the sheet as CSV and upload it to EasyMailVerify, or call the API from Power Automate or a script.

More tools