{"componentChunkName":"component---src-templates-tag-js","path":"/tags/google-script/","result":{"data":{"site":{"siteMetadata":{"title":"LoginRadius Blog"}},"allMarkdownRemark":{"totalCount":1,"edges":[{"node":{"fields":{"slug":"/engineering/eva-google-script/"},"html":"<p>Suppose, You have a massive amount of data and want to add them to your new product campaign. You are probably not sure that all of them belong to the right audience; some might be spam or disposable emails.</p>\n<h4 id=\"now-the-actual-problem-is-that-how-can-i-do-validate-so-many-email-addresses\" style=\"position:relative;\"><a href=\"#now-the-actual-problem-is-that-how-can-i-do-validate-so-many-email-addresses\" aria-label=\"now the actual problem is that how can i do validate so many email addresses permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Now, the actual problem is that how can I do validate so many email addresses?</h4>\n<p>Well, it would be great to verify them all together in a single shot with 100% accurate results without any manual interaction.</p>\n<p>I am writing this article as so many of us have the same concern and are looking for a business email validator that can resolve this problem with high accuracy.</p>\n<p>Here we have the tool <a href=\"https://eva.pingutil.com/\">EVA</a> (Email Verification APIs), which provides excellent email verification services with their open APIs.</p>\n<h2 id=\"eva-service-with-google-sheet\" style=\"position:relative;\"><a href=\"#eva-service-with-google-sheet\" aria-label=\"eva service with google sheet permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>EVA service with Google Sheet</h2>\n<p>Google allows you to create scripts using your custom functions with the service you wanted to use. You can make these functions in standard JavaScript with a basic <a href=\"https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/JavaScript_basics\">understanding of JS</a>. Here is the guide to start with <a href=\"https://developers.google.com/apps-script/guides/sheets/functions\">Custom Functions in Google Sheets</a>.</p>\n<h2 id=\"custom-function\" style=\"position:relative;\"><a href=\"#custom-function\" aria-label=\"custom function permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Custom Function</h2>\n<p><code>=eva(email)</code></p>\n<p>Eva needs the email address only from you and the rest will perform with their excellent service. You can also go through the <a href=\"https://www.loginradius.com/blog/engineering/email-verification-api/\">Email Verification API (EVA)</a> article for more details about EVA.</p>\n<p>Here is the custom function created using the EVA Services to validate email.</p>\n<pre class=\"grvsc-container dark-default-dark\" data-language=\"js\" data-index=\"0\"><code class=\"grvsc-code\"><span class=\"grvsc-line\"><span class=\"mtk4\">function</span><span class=\"mtk1\"> </span><span class=\"mtk11\">eva</span><span class=\"mtk1\">(</span><span class=\"mtk12\">email</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">url</span><span class=\"mtk1\"> = </span><span class=\"mtk8\">&quot;https://api.eva.pingutil.com/email?email=&quot;</span><span class=\"mtk1\">+</span><span class=\"mtk12\">email</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">res</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">UrlFetchApp</span><span class=\"mtk1\">.</span><span class=\"mtk11\">fetch</span><span class=\"mtk1\">(</span><span class=\"mtk12\">url</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk3\">// Get status of the API</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">status</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">res</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getResponseCode</span><span class=\"mtk1\">();</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">status</span><span class=\"mtk1\"> != </span><span class=\"mtk7\">200</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk4\">false</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">contextText</span><span class=\"mtk1\"> = </span><span class=\"mtk12\">res</span><span class=\"mtk1\">.</span><span class=\"mtk11\">getContentText</span><span class=\"mtk1\">();</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk4\">var</span><span class=\"mtk1\"> </span><span class=\"mtk12\">result</span><span class=\"mtk1\"> = </span><span class=\"mtk10\">JSON</span><span class=\"mtk1\">.</span><span class=\"mtk11\">parse</span><span class=\"mtk1\">(</span><span class=\"mtk12\">contextText</span><span class=\"mtk1\">);</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\"> </span><span class=\"mtk3\">// Logic to check Business Email</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">if</span><span class=\"mtk1\"> (</span><span class=\"mtk12\">result</span><span class=\"mtk1\">[</span><span class=\"mtk8\">&quot;data&quot;</span><span class=\"mtk1\">][</span><span class=\"mtk8\">&quot;disposable&quot;</span><span class=\"mtk1\">] === </span><span class=\"mtk4\">false</span><span class=\"mtk1\"> && </span><span class=\"mtk12\">result</span><span class=\"mtk1\">[</span><span class=\"mtk8\">&quot;data&quot;</span><span class=\"mtk1\">][</span><span class=\"mtk8\">&quot;webmail&quot;</span><span class=\"mtk1\">] === </span><span class=\"mtk4\">false</span><span class=\"mtk1\"> &&  </span><span class=\"mtk12\">result</span><span class=\"mtk1\">[</span><span class=\"mtk8\">&quot;data&quot;</span><span class=\"mtk1\">][</span><span class=\"mtk8\">&quot;spam&quot;</span><span class=\"mtk1\">]  === </span><span class=\"mtk4\">false</span><span class=\"mtk1\"> && </span><span class=\"mtk12\">result</span><span class=\"mtk1\">[</span><span class=\"mtk8\">&quot;data&quot;</span><span class=\"mtk1\">][</span><span class=\"mtk8\">&quot;deliverable&quot;</span><span class=\"mtk1\">] === </span><span class=\"mtk4\">true</span><span class=\"mtk1\">) {</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">    </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk4\">true</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  }</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">  </span><span class=\"mtk15\">return</span><span class=\"mtk1\"> </span><span class=\"mtk4\">false</span><span class=\"mtk1\">;</span></span>\n<span class=\"grvsc-line\"><span class=\"mtk1\">}</span></span></code></pre>\n<h2 id=\"add-script\" style=\"position:relative;\"><a href=\"#add-script\" aria-label=\"add script permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Add Script</h2>\n<p>We are all set with our script and now need to add this script under Google Script Editor under tools and save it.</p>\n<p><img src=\"/baf429b5e3e42b9ce2690eb275de9b06/script-editor.gif\" alt=\"Google Script\"></p>\n<h2 id=\"run-script\" style=\"position:relative;\"><a href=\"#run-script\" aria-label=\"run script permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Run Script</h2>\n<p>That all! Now I need to drag this formula to the entire rows on which I want to perform validation.</p>\n<p><img src=\"/d42e4776a173bf405925530f125c685e/drag.gif\" alt=\"Drag\"></p>\n<p>Perfect :)</p>\n<h2 id=\"setup-trigger\" style=\"position:relative;\"><a href=\"#setup-trigger\" aria-label=\"setup trigger permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Setup Trigger</h2>\n<p>You can set up a trigger to action (i.e., on open, edit or change in sheet) by navigating tools -> script editor and click on the left alarm icon.</p>\n<p><img src=\"/f439932ac1d6329ba8d43c814efeffef/trigger.gif\" alt=\"Trigger\"></p>\n<h2 id=\"conclusion\" style=\"position:relative;\"><a href=\"#conclusion\" aria-label=\"conclusion permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Conclusion</h2>\n<p>In this article, I've explained EVA services to validate email addresses in bulk using the google script editor. If you like what you read, leave a \"thank you note\" in the comment section.</p>\n<style class=\"grvsc-styles\">\n  .grvsc-container {\n    overflow: auto;\n    -webkit-overflow-scrolling: touch;\n    padding-top: 1rem;\n    padding-top: var(--grvsc-padding-top, var(--grvsc-padding-v, 1rem));\n    padding-bottom: 1rem;\n    padding-bottom: var(--grvsc-padding-bottom, var(--grvsc-padding-v, 1rem));\n    border-radius: 8px;\n    border-radius: var(--grvsc-border-radius, 8px);\n    font-feature-settings: normal;\n  }\n  \n  .grvsc-code {\n    display: inline-block;\n    min-width: 100%;\n  }\n  \n  .grvsc-line {\n    display: inline-block;\n    box-sizing: border-box;\n    width: 100%;\n    padding-left: 1.5rem;\n    padding-left: var(--grvsc-padding-left, var(--grvsc-padding-h, 1.5rem));\n    padding-right: 1.5rem;\n    padding-right: var(--grvsc-padding-right, var(--grvsc-padding-h, 1.5rem));\n  }\n  \n  .grvsc-line-highlighted {\n    background-color: var(--grvsc-line-highlighted-background-color, transparent);\n    box-shadow: inset var(--grvsc-line-highlighted-border-width, 4px) 0 0 0 var(--grvsc-line-highlighted-border-color, transparent);\n  }\n  \n  .dark-default-dark {\n    background-color: #1E1E1E;\n    color: #D4D4D4;\n  }\n  .dark-default-dark .mtk4 { color: #569CD6; }\n  .dark-default-dark .mtk1 { color: #D4D4D4; }\n  .dark-default-dark .mtk11 { color: #DCDCAA; }\n  .dark-default-dark .mtk12 { color: #9CDCFE; }\n  .dark-default-dark .mtk8 { color: #CE9178; }\n  .dark-default-dark .mtk3 { color: #6A9955; }\n  .dark-default-dark .mtk15 { color: #C586C0; }\n  .dark-default-dark .mtk7 { color: #B5CEA8; }\n  .dark-default-dark .mtk10 { color: #4EC9B0; }\n</style>","frontmatter":{"date":"February 22, 2021","updated_date":null,"title":"How to Verify Email Addresses in Google Sheet","tags":["EVA","Google Script","Email Validation"],"coverImage":{"childImageSharp":{"fluid":{"aspectRatio":1.5037593984962405,"src":"/static/532c1db0bab60ffa3eead6e63d119ff7/ee604/eva.png","srcSet":"/static/532c1db0bab60ffa3eead6e63d119ff7/69585/eva.png 200w,\n/static/532c1db0bab60ffa3eead6e63d119ff7/497c6/eva.png 400w,\n/static/532c1db0bab60ffa3eead6e63d119ff7/ee604/eva.png 800w,\n/static/532c1db0bab60ffa3eead6e63d119ff7/e6250/eva.png 1074w","sizes":"(max-width: 800px) 100vw, 800px"}}},"author":{"id":"Narendra Pareek","github":"pareek-narendra","avatar":null}}}}]}},"pageContext":{"tag":"Google Script"}},"staticQueryHashes":["1171199041","1384082988","2100481360","23180105","528864852"]}