# Verify emails in n8n

Source: https://docs.rocketverifier.com/integrations/n8n

> Install the n8n-nodes-rocketverifier community node, add a RocketVerifier API credential, and use the RocketVerifier node to verify emails, run bulk jobs and check credits. The RocketVerifier Trigger starts a workflow on any RocketVerifier event and rejects every delivery whose signature does not match.

The `n8n-nodes-rocketverifier` package adds two nodes that share one credential: **RocketVerifier**, an action node, and **RocketVerifier Trigger**, which starts workflows from RocketVerifier events.

## Install the node

In n8n open **Settings, Community Nodes, Install** and enter the package name:

```text
n8n-nodes-rocketverifier
```

On self-hosted n8n you can also install it from the command line and restart n8n:

```bash
cd ~/.n8n/nodes
npm install n8n-nodes-rocketverifier
```

## Add the credential

Create a **RocketVerifier API** credential:

| Field | Value |
| --- | --- |
| API Key | A key from [API keys](https://app.rocketverifier.com/dashboard/api-keys). Use an `rv_test_` sandbox key with `@sandbox.rocketverifier.com` addresses to build without spending credits. |
| Base URL | `https://api.rocketverifier.com`. Leave it as is. |

n8n tests the credential with `GET /v1/credits`. A key restricted to scopes needs `verify:single` for Verify, `verify:bulk` for Create, `jobs:read` for status, progress, results, lists and downloads, `jobs:write` for Delete, and `webhooks:manage` for the trigger.

## Verify an email

**Email, Verify** checks one address in real time and outputs the full [verification result](https://docs.rocketverifier.com/api/verify#response): `status`, `sub_status`, `score`, `catch_all_verdict`, `did_you_mean`, `verified_at` and every evidence field.

Options:

- **Convert Yes/No Fields to Booleans:** turns `domain.acceptAll`, `domain.disposable`, `domain.free`, `account.role`, `account.disabled`, `account.fullMailbox`, `toxic`, `abuse` and `spam_trap` from `"yes"` and `"no"` into `true` and `false`. `"unknown"` stays as is. Off by default.
- **Idempotency Key:** sent as the `Idempotency-Key` header, so a retried item is never charged twice.
- **Timeout (Seconds):** 5 to 60. See [`timeout`](https://docs.rocketverifier.com/api/verify#request) for how the API applies it.

## Run bulk jobs

The **Batch Job** resource covers the full job lifecycle.

| Operation | What it does |
| --- | --- |
| **Create** | Submits up to 100,000 addresses (comma, semicolon or newline separated, or an expression that returns an array) with an optional **Job Name** and **Idempotency Key**. |
| **Get Status** | Returns a job's status and summary counts. |
| **Get Progress** | A poll-friendly view from `GET /v1/jobs/{id}/progress`: `processed`, `remaining`, `percent`, `counts`, `counts_by_status`, `rate_per_minute` and `eta_seconds`. |
| **Get Results** | Per-email results with `sub_status` and `verified_at`, optionally filtered by classification. Use **Page** and **Limit** (up to 1,000 per page) or **Return All**. Turn on **Split Into Items** for one item per email. |
| **Get Many** | Lists your jobs, optionally filtered by status (`awaiting_confirmation`, `ingesting`, `pending`, `processing`, `completed`, `failed`, `cancelled`). Up to 100 per page, or **Return All**. One item per job by default. |
| **Download Results** | Exports a completed job as a **CSV File (Binary)**, ready for Google Drive, S3 or email, or as **JSON** (`job_id` and `results`). A job that is still running returns `job_not_complete`. |
| **Delete** | Cancels the job and refunds credits for every address still waiting to be processed. |

The **Credit, Check** operation returns your balance and the credits used today and this month.

## Start a workflow from RocketVerifier events

**RocketVerifier Trigger** registers a webhook when the workflow is activated (or when you click **Listen for test event**) and deletes it when the workflow is deactivated. Changing the events or the n8n URL recreates it.

| Event | Fires when |
| --- | --- |
| `job.completed` | A bulk job finished. `data` has `job_id`, the counts and `download_url`. |
| `job.failed` | A bulk job failed. `data.error` says why. |
| `credits.low` | A charge left the balance at 100 credits or fewer. |
| `credits.depleted` | The balance reached zero. |
| `email.verified` | A single verification finished. |
| `monitor.alert` | A list health or domain authentication monitor raised an alert. |

The output is the full envelope `{ event, event_id, timestamp, data }`. Turn on **Only Output Data** to get `data` alone, and set **Webhook Name** to change the name shown in RocketVerifier (default `n8n: <workflow name>`).

### How deliveries are verified

Every delivery is checked before the workflow runs, and anything that fails gets HTTP 401:

- The `X-RocketVerifier-Signature` header (`t=<unix seconds>,v1=<hex HMAC-SHA256>`) is computed over the raw request bytes with the secret returned when the webhook was created. Several `v1` entries are accepted during secret rotation.
- The timestamp must be within 300 seconds of the n8n server clock. Change it under **Options, Signature Tolerance**, and keep the server clock in sync.
- Comparison is constant time.

See [webhook signatures](https://docs.rocketverifier.com/api/webhooks) for the scheme.

## Example workflows

- **Sheet row to verified row:** Google Sheets trigger, then Verify, then update the row with `status` and `score`.
- **Clean form leads:** Typeform trigger, then Verify, then an IF node on `status` equal to `deliverable` before adding the lead to your CRM.
- **Scheduled list clean:** Schedule, then Create. A second workflow starts on `job.completed`, runs Download Results as CSV and uploads the file to Google Drive.
- **Low balance alert:** `credits.low`, then a Slack message.

## Frequently asked questions

### Why does my IF node treat "no" as true?

The API returns flags such as `domain.disposable` as the strings `"yes"`, `"no"` or `"unknown"`, and a non-empty string is truthy. Turn on Convert Yes/No Fields to Booleans, or compare explicitly with `$json.domain.disposable === "yes"`.

### Does the trigger work on self-hosted n8n?

Yes, as long as n8n is reachable over public HTTPS. RocketVerifier only delivers webhooks to https URLs. Set `WEBHOOK_URL` when n8n runs behind a proxy or tunnel.

### What happens if I rotate the webhook secret?

The trigger keeps the secret it received when the webhook was created. Deactivate and reactivate the workflow so it registers a fresh webhook and secret.
