// crm
Via APIPipedrive email verification with pingutil
Pipedrive persons arrive from web forms, the LeadBooster chatbot, imports and reps, and none of them are checked before reps start emailing. A webhook on person creation sends each new person to a small service that verifies the address with pingutil, looks up the company, and writes the results to person and organization custom fields through the Pipedrive API.
Where it connects: Pipedrive Webhooks v2 (event_action create, event_object person) to a small service that updates person and organization custom fields via the API
What goes wrong without it
- Reps send their first email from Pipedrive and the bounce comes back before they finish the follow-up task.
- Organizations get created from email domains with no industry or size, so nobody knows which ones matter.
- Our filters for "hot leads" are full of personal Gmail addresses from the pricing page form.
What you can do with Pipedrive and pingutil
Verify persons as they are created
The service writes `status (reason)` to an "Email status" person field. A Pipedrive filter on that field keeps `invalid` persons out of reps' outreach views.
Enrich the organization
For `company` domains, `/v1/lookup` returns `company.industry` and `company.employee_size_estimate`. The service writes them to custom fields on the person's organization.
Tag personal and throwaway signups
Write `category` to the person. `free` and `isp` persons can go to a nurture pipeline; `disposable` ones can be archived.
Set it up
- 1
Create a person custom field "Email status" and organization fields "Industry" and "Company size", then read their generated keys from `GET /api/v1/personFields` and `GET /api/v1/organizationFields`.
- 2
Deploy the service below on any HTTPS host, with `PIPEDRIVE_TOKEN`, `PINGUTIL_KEY`, `WEBHOOK_SECRET` and the field keys as environment variables.
- 3
In Settings, Tools and apps, Webhooks (or through the API), create a webhook with event action `create`, event object `person`, version 2.0, and HTTP Basic auth.
- 4
Subscribe to create only: the service updates the person, and a change webhook would trigger it again.
- 5
Add a filter on the Email status field and share it with the sales team.
// node >= 18, npm install express
import express from 'express';
const PD = 'https://yourcompany.pipedrive.com/api/v2';
const pd = { 'x-api-token': process.env.PIPEDRIVE_TOKEN, 'content-type': 'application/json' };
const pu = { authorization: 'Bearer ' + process.env.PINGUTIL_KEY, 'content-type': 'application/json' };
const basic = 'Basic ' + Buffer.from('pipedrive:' + process.env.WEBHOOK_SECRET).toString('base64');
const app = express();
app.use(express.json());
app.post('/pipedrive', (req, res) => {
if (req.headers.authorization !== basic) return res.sendStatus(401);
res.sendStatus(200); // answer inside Pipedrive's 10-second window, work afterwards
const id = req.body?.meta?.entity_id;
if (id) handlePerson(id).catch((e) => console.error('pingutil step failed', id, e));
});
async function pingutil(path, body) {
const r = await fetch('https://pingutil.com' + path, {
method: 'POST', headers: pu, body: JSON.stringify(body), signal: AbortSignal.timeout(30_000),
});
return r.ok ? r.json() : null; // 429 or error: return null, leave fields empty for a nightly retry
}
async function handlePerson(id) {
const person = (await fetch(PD + '/persons/' + id, { headers: pd }).then((r) => r.json())).data;
const emails = person?.emails ?? [];
const email = (emails.find((e) => e.primary) ?? emails[0])?.value;
if (!email) return;
const [v, l] = await Promise.all([pingutil('/v1/verify', { email }), pingutil('/v1/lookup', { input: email })]);
if (v) {
await fetch(PD + '/persons/' + id, {
method: 'PATCH', headers: pd,
body: JSON.stringify({ custom_fields: { [process.env.EMAIL_STATUS_KEY]: v.status + ' (' + v.reason + ')' } }),
});
}
if (l?.category === 'company' && l.company && person.org_id) {
await fetch(PD + '/organizations/' + person.org_id, {
method: 'PATCH', headers: pd,
body: JSON.stringify({ custom_fields: {
[process.env.ORG_INDUSTRY_KEY]: l.company.industry,
[process.env.ORG_SIZE_KEY]: l.company.employee_size_estimate,
} }),
});
}
}
app.listen(process.env.PORT ?? 3000);What to do with each result
| pingutil result | Action in Pipedrive |
|---|---|
| `status: "valid"` | Leave the person in normal outreach. |
| `status: "invalid"` (e.g. `mailbox_not_found`) | Hide from outreach filters; ask the rep to find a new address. |
| `status: "risky"`, `reason: "role_based"` | Shared inbox such as `info@`; look for a named contact at the organization. |
| `category: "free"` or `"isp"` | Move to a nurture pipeline instead of the sales pipeline. |
| `company.industry`, `company.employee_size_estimate` | Write to organization custom fields for filtering and prioritization. |
Limits to plan for
- Pipedrive treats a webhook as failed without a 2xx response within 10 seconds and retries it, so the service acknowledges first and verifies afterwards.
- API v2 uses PATCH with a `custom_fields` object; older v1 examples with PUT and fields at the root do not apply to v2 endpoints.
- pingutil allows 300 verified addresses a day (3,000 a month) per account. For an existing database, export persons and verify them in batches of 50 with `/v1/verify/batch` over several days. Those are Free plan limits; Enterprise has custom limits.
Pipedrive documentation
- pipedrive.readme.io/docs/guide-for-webhooks-v2
- developers.pipedrive.com/tutorials/update-custom-field-pipedrive-api
- support.pipedrive.com/en/article/automations-webhook-requests
Pipedrive is a trademark of its owner. This integration uses Pipedrive's documented extension points; it is not an official Pipedrive app.
Common questions
- Can Pipedrive Automations call pingutil directly?
- Pipedrive Automations can send a webhook request with Pipedrive fields in the body on Advanced and higher plans. That gets the address out, but writing the result back into a custom field still needs something that calls the Pipedrive API, such as the service above or an automation tool.
- Why only the create event?
- Because the service updates the person after verifying. A change webhook would fire on that update and verify the same address again in a loop.
Stop bad addresses in Pipedrive today
Sign in with your email, create an API key and paste it into the step above. Test on a few real addresses first: the live demo shows exactly what your Pipedrive setup will receive.