Integrations · Automation
Validate emails in Latenode
Check email addresses in Latenode scenarios with Latenode's own HTTP Request node: when a form is submitted, a contact is created or a row is added, check the address and route the scenario on the result. Each check returns one of five statuses (valid, invalid, catch_all, unknown, disposable), the reason, and what to do with the address (send, send_with_caution, remove, retry_later). No code and nothing to install: you paste one cURL command into the node.
This guide follows Latenode's documentation and we tested the request it builds against a stand-in for our API. It has not run in a Latenode account yet, so button and menu names can differ a little in yours.
Add the check
Create a key on the API keys page with only the permission Validate addresses, and give it a daily credit cap, so a looping scenario cannot spend much more than the cap.
In your scenario, after the trigger that brings the address in, add an HTTP Request node.
Click Create from Example (CURL) (or Import from cURL), paste this command and click Create (or Generate):
curl -X POST https://api.email-validation.org/v1/validate \ -H "Authorization: Bearer $EV_API_KEY" \ -H "Content-Type: application/json" \ -d '{"email": "accepted@sandbox.email-validation.org"}'The node now has the method
POST, the URL, two headers and a raw JSON body. Leave Authorization on Without authentication: the key travels in the header.In the
Authorizationheader's Value, replace$EV_API_KEYwith your key, so it readsBearer ev_live_…. Paste the key exactly as it was shown to you. Never put the key in the URL: such requests are refused.Click Run once with the body as it is.
accepted@sandbox.email-validation.orgis a free test address: the node's output showsstatusvalid,actionsendandcredits_used0.In the body, replace the test address with the address from your trigger: select the text between the quotes and pick the email field from the Data window. Keep the quotes around it, so the body stays
{"email": "<the address>"}.
The output holds every result field. Use status, reason, action, did_you_mean and credits_used in later nodes.
For EU data residency, import this command instead, or change the URL's host to api-eu.email-validation.org. The same key and credits work on both.
curl -X POST https://api-eu.email-validation.org/v1/validate \
-H "Authorization: Bearer $EV_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email": "accepted@sandbox.email-validation.org"}'Route on the action
Connect the HTTP Request node to the nodes that come next and click Setup a filter on each route. In the Condition field, pick action from the HTTP Request node's output in the Data window and compare it with a value from the Operators window:
| Route | Condition | What to do |
|---|---|---|
| Mail it | action is send | Continue as usual. |
| Review | action is send_with_caution or retry_later | Hold it for review, or check it again later. |
| Drop | action is remove | Do not mail it. |
| Not checked | none: turn on Fallback router in the route's settings | Runs only when no other route is true, for example after a failed check. |
Route on action, not on status alone: a spam trap or a frequent complainer has the status valid, because the mailbox exists, and the action remove (why). Without the fallback route, a run in which no condition is true may stop at the node.
Errors and retries
When our API answers with an error, the answer has an HTTP status and a JSON body with the error's code, message and request_id (quote it to support), for example 402 with insufficient_credits. By default Latenode stops the scenario when a node fails.
In the node's advanced settings you can turn on Retry if This Node Returns an Error. Retry only the errors that charge nothing and pass with time, 429 (too many requests) and 503 (temporarily unavailable): set REGEXP to .*(429|503).* and keep Latenode's default of 2 attempts, 3 seconds apart, or a little more. A key that reached its daily cap also answers 429 (key_daily_cap): its retries fail too, at no cost, until the cap resets. Do not retry any other error (a refused key, no credits, a bad request): a retry cannot fix it.
To let the scenario go on when the check fails, turn on Ignore Errors instead: every value of the failed node is then null, so no route on action is true and the Not checked fallback route runs (without it, the run may stop there). Treat that address as not checked.
Each run of the node is one check. A definite result costs one credit; unknown results, malformed and test addresses are free. Running the scenario again, or restarting a run from the history, checks the address again. To check several addresses in one run, put an Iterator before the HTTP Request node and connect the node to the Iterator's top connector: it runs once per address, so 50 addresses are 50 checks and up to 50 credits. For long lists, send one bulk list instead.
Your data in Latenode
Latenode's Execution History shows the data that passed through each node in a run, so it holds the addresses you check and our answers. Turn on Hiding data in history in the HTTP Request node (its Advanced Settings choose what is hidden), and wherever else a node that carries addresses offers it.
A key typed into the header is part of the scenario: anyone who can open or edit the scenario, or a copy of it, can read it. Give such a key only Validate addresses and a daily credit cap.
You can keep the key in a global variable instead (Data Storage → Variables, then Bearer {{%.EV_API_KEY}} as the header's value), so several scenarios share one key. A global variable's value shows in plain text on the Variables page, so a key there needs the same care.