Alephant email verification with BillionVerify
Alephant is an AI platform that helps teams build and orchestrate intelligent agents and workflows. When these agents collect or act on email addresses, verified contact data ensures downstream tasks run on real, reachable inboxes rather than dead addresses that waste compute and skew results.
Why verify before the send
AI agents that process email data are only as reliable as the data they receive. Invalid, disposable, or role-based addresses fed into an Alephant workflow silently corrupt outputs, trigger unnecessary retries, and inflate costs. BillionVerify filters out bad addresses before they enter the pipeline, keeping agent runs clean and results trustworthy.
Ready-to-use n8n workflow
Import this workflow into n8n β it verifies every address with BillionVerify before Alephant sends, so only deliverable contacts are emailed. Install the BillionVerify community node first, then add your API key. Adapted from this n8n template
{
"name": "Email weekly AI agent cost and token reports with Alephant and Gmail + BillionVerify",
"nodes": [
{
"id": "e4a9ecb0-d35a-47a4-8b45-b8651c4ed9f1",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
176,
-16
],
"parameters": {
"width": 480,
"height": 496,
"content": "## Track AI agent costs and token usage with Alephant AI Gateway\n\n### How it works\n\nThis workflow runs every Monday at 9 AM to collect AI cost and token usage data from Alephant AI Gateway. It adds report configuration, formats the usage summary into a readable report, and sends it by email through Gmail.\n\n### Setup steps\n\n1. Install the Alephant community node\n2. Create an Alephant Virtual Key credential (docs link below)\n3. Connect your Gmail credential\n4. Edit the 'Set Report Config' node - set your recipient email\n5. Adjust the Schedule Trigger if you want daily/hourly instead of weekly\n\n**Requirements**\n- Alephant account (free tier works) - https://alephant.io\n- Gmail account\n\nDocs: https://developers.alephant.io/\n"
},
"typeVersion": 1
},
{
"id": "83adfc10-10d2-4e4a-a678-04b2e0db6fc8",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
736,
-16
],
"parameters": {
"color": 7,
"width": 432,
"height": 336,
"content": "## Schedule usage fetch\n\nStarts the workflow on the weekly Monday morning schedule and retrieves the Alephant AI Gateway usage summary."
},
"typeVersion": 1
},
{
"id": "067b5a54-55d6-4c6f-959c-b6d78d79de91",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1216,
-16
],
"parameters": {
"color": 7,
"width": 432,
"height": 336,
"content": "## Configure and format report\n\nSets the report recipient configuration, then formats the Alephant usage data into an email-ready report."
},
"typeVersion": 1
},
{
"id": "503da710-b1d3-410f-b46f-e5f1c6621b83",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
1696,
-16
],
"parameters": {
"color": 7,
"height": 336,
"content": "## Send report email\n\nDelivers the formatted weekly cost and token usage report through Gmail."
},
"typeVersion": 1
},
{
"id": "34486343-b066-491a-95b5-b318a311376a",
"name": "Weekly Monday Trigger",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
784,
144
],
"parameters": {
"rule": {
"interval": [
{
"field": "weeks",
"triggerAtDay": [
1
],
"triggerAtHour": 9
}
]
}
},
"typeVersion": 1.2
},
{
"id": "4a6cd5bb-7893-49bd-a172-1cce9ababd76",
"name": "Fetch Alephant Usage Summary",
"type": "@alephantai/n8n-nodes-alephant-analytics.alephantUsage",
"position": [
1024,
144
],
"parameters": {},
"credentials": {
"alephantVirtualKeyApi": {
"id": "credential-id",
"name": "Alephant Virtual Key account"
}
},
"typeVersion": 1
},
{
"id": "04bc6b5b-5bab-4f5b-a126-1951177d03cd",
"name": "Set Email Recipient",
"type": "n8n-nodes-base.set",
"position": [
1264,
144
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "f1+1234567890-+1234567890",
"name": "recipient_email",
"type": "string",
"value": "you@example.com"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "c3c09c8d-c5e7-43a1-965e-f45e1931aa7d",
"name": "Format Usage Report",
"type": "n8n-nodes-base.code",
"position": [
1504,
144
],
"parameters": {
"jsCode": "// Pull the Usage Summary output from the Alephant node\nconst d = $('Fetch Alephant Usage Summary').first().json.data;\n\n// Cost: total_cost_cents is in CENTS - convert to dollars\nconst costUSD = (d.total_cost_cents / 100).toFixed(2);\n\n// Round the week-over-week percentages (they come back as long floats)\nconst costPct = Math.round(d.vs_previous_period.cost_pct);\nconst reqPct = Math.round(d.vs_previous_period.requests_pct);\n\n// Helper: turn a +/- number into a readable trend phrase\nconst trend = (pct) => {\n if (pct > 0) return `up ${pct}% vs previous period`;\n if (pct < 0) return `down ${Math.abs(pct)}% vs previous period`;\n return `no change vs previous period`;\n};\n\nconst totalTokens = d.total_tokens.input + d.total_tokens.output;\n\n// Build the email body (plain text)\nconst body =\n`AI Agent Cost Report - Alephant AI Gateway\n\nPeriod: ${d.period.from} to ${d.period.to}\n\nTotal cost: $${costUSD} (${trend(costPct)})\nTotal requests: ${d.total_requests} (${trend(reqPct)})\nTotal tokens: ${totalTokens} (input ${d.total_tokens.input} / output ${d.total_tokens.output})\n\nData source: ${d.data_source}${d.degraded ? ' (WARNING: data may be degraded)' : ''}\n\nSent automatically by your Alephant AI Gateway workflow.`;\n\n// Pass the body + recipient on to the Gmail node\nreturn [{\n json: {\n email_subject: `AI Agent Cost Report (${d.period.from} to ${d.period.to})`,\n email_body: body,\n recipient_email: $('Set Email Recipient').first().json.recipient_email\n }\n}];"
},
"typeVersion": 2
},
{
"id": "6edadefb-9099-4db3-b45c-1be5c2a98e02",
"name": "Send Usage Summary Email",
"type": "n8n-nodes-base.gmail",
"position": [
1744,
144
],
"webhookId": "c17a6bf9-7921-4f34-abfe-1fe84d1e88bb",
"parameters": {
"sendTo": "={{ $json.recipient_email }}",
"message": "={{ $json.email_body }}",
"options": {},
"subject": "={{ $json.email_subject }}",
"emailType": "text"
},
"credentials": {
"gmailOAuth2": {
"id": "credential-id",
"name": "Gmail Ash account"
}
},
"typeVersion": 2.1
},
{
"id": "1b7ae0bd-25d6-4f49-9a36-7f782152ffb1",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
736,
352
],
"parameters": {
"width": 880,
"height": 128,
"content": "## Who's it for\n\nTeams running production AI agents - autonomous workflows that call AI models on their own and can quietly rack up cost you only discover on the invoice. Also useful for solo developers and AI-first startups who want a regular read on AI spend."
},
"typeVersion": 1
},
{
"parameters": {
"operation": "verify",
"email": "={{ $json.recipient_email }}",
"additionalOptions": {}
},
"type": "n8n-nodes-billionverify.billionVerify",
"typeVersion": 1,
"position": [
1384,
144
],
"name": "Verify Email (BillionVerify)",
"credentials": {
"billionVerifyApi": {
"id": "",
"name": "BillionVerify account"
}
}
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "is-deliverable",
"leftValue": "={{ $json.is_deliverable }}",
"rightValue": "",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
}
}
]
}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2,
"position": [
1564,
144
],
"name": "IF deliverable"
}
],
"connections": {
"Format Usage Report": {
"main": [
[
{
"node": "Verify Email (BillionVerify)",
"type": "main",
"index": 0
}
]
]
},
"Set Email Recipient": {
"main": [
[
{
"node": "Format Usage Report",
"type": "main",
"index": 0
}
]
]
},
"Weekly Monday Trigger": {
"main": [
[
{
"node": "Fetch Alephant Usage Summary",
"type": "main",
"index": 0
}
]
]
},
"Fetch Alephant Usage Summary": {
"main": [
[
{
"node": "Set Email Recipient",
"type": "main",
"index": 0
}
]
]
},
"Verify Email (BillionVerify)": {
"main": [
[
{
"node": "IF deliverable",
"type": "main",
"index": 0
}
]
]
},
"IF deliverable": {
"main": [
[
{
"node": "Send Usage Summary Email",
"type": "main",
"index": 0
}
],
[]
]
}
},
"settings": {
"binaryMode": "separate",
"executionOrder": "v1"
}
}Workflow templates with Alephant
Ready-to-use workflows that verify emails before Alephant sends.
How it works
- 1
Connect BillionVerify to your Alephant workflow using the n8n community node, Integrately, or the REST API.
- 2
Pass email addresses collected by your agent to BillionVerify's verification endpoint.
- 3
Receive a verdict for each address: valid, invalid, disposable, catch-all, or role-based.
- 4
Filter or branch your workflow based on the result, forwarding only verified addresses.
- 5
Log verification outcomes alongside agent results for full data-quality visibility.
When to use this
Clean lead data before agent processing
When an Alephant agent ingests a list of contacts, route addresses through BillionVerify first. Disposable and invalid emails are stripped out so the agent operates on a reliable dataset from the start.
Guard email-triggered workflows
For workflows that fire on incoming email events, verify the sender address in real time. Catch-all and undeliverable addresses are flagged before the agent wastes resources acting on them.
FAQ
Does verification slow down my agent workflows?
BillionVerify returns results in milliseconds for single addresses and supports bulk batches, so typical agent pipelines see negligible latency added to their overall run time.
Can I verify addresses in bulk before a large agent run?
Yes. Upload a CSV or call the bulk API endpoint to verify thousands of addresses before triggering your Alephant workflow, ensuring the agent never processes stale data.
What types of bad addresses does BillionVerify catch?
It detects invalid syntax, non-existent mailboxes, disposable email providers, role-based aliases like info@ or support@, and catch-all domains that accept any address.
Verify emails in Alephant
Create a free account, grab your API key, and stop bounces before they happen.
Get started free