// crm
Via APIFreshsales email verification with pingutil
Freshsales contacts come in from web forms, chat and imports, and sales sequences start before anyone checks whether the address works. A workflow that runs when a contact is created uses the Trigger webhook action to send the contact to a small service, which verifies the email with pingutil and writes the result to custom fields through the Freshsales API.
Where it connects: Freshsales workflow on Contacts (when a contact is created) with a Trigger webhook action, plus the Freshsales API to update contact custom fields
What goes wrong without it
- Our Freshsales sequences have contacts that bounce on the very first step.
- Web form contacts with personal Gmail addresses get the same lead score as buyers from real companies.
- Nobody fills in industry, so territory assignment is guesswork.
What you can do with Freshsales and pingutil
Verify contacts at creation
Write `status` to a dropdown custom field. Sequence and campaign filters exclude `invalid`.
Score by email type
Write `category` to a custom field and use it in lead scoring rules: `company` up, `free` and `isp` neutral, `disposable` down.
Add industry for assignment
Copy `company.industry` to a custom field so territory and assignment rules have a value to work with.
Set it up
- 1
Create contact custom fields Email status, Email category and Company industry; their API names start with `cf_`.
- 2
Deploy the service below with `FS_DOMAIN`, `FS_API_KEY`, `PINGUTIL_KEY` and `HOOK_SECRET`.
- 3
Create a workflow on Contacts that runs when a contact is created, and add a Trigger webhook action: POST, your service URL as callback, JSON encoding, simple content with the contact id and email fields.
- 4
Add a custom header `X-Hook-Secret: <your secret>` to the action; header names cannot contain spaces.
- 5
Use the Test webhook button, check the first payload in your service logs, then activate the workflow.
// node >= 18, npm install express
import express from 'express';
const FS = 'https://' + process.env.FS_DOMAIN + '.myfreshworks.com/crm/sales/api';
const fs = { authorization: 'Token token=' + process.env.FS_API_KEY, 'content-type': 'application/json' };
const pu = { authorization: 'Bearer ' + process.env.PINGUTIL_KEY, 'content-type': 'application/json' };
const app = express();
app.use(express.json());
app.post('/freshsales', (req, res) => {
if (req.headers['x-hook-secret'] !== process.env.HOOK_SECRET) return res.sendStatus(401);
res.sendStatus(200);
// Field names follow what you selected in the action's content; log one payload to confirm.
const c = req.body.contact ?? req.body;
if (c?.id && c?.email) handleContact(c.id, c.email).catch((e) => console.error(c.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; // fail open on 429 or errors
}
async function handleContact(id, email) {
const [v, l] = await Promise.all([pingutil('/v1/verify', { email }), pingutil('/v1/lookup', { input: email })]);
const custom_field = {};
if (v) custom_field.cf_email_status = v.status;
if (l) custom_field.cf_email_category = l.category;
if (l?.company?.industry) custom_field.cf_company_industry = l.company.industry;
if (!Object.keys(custom_field).length) return;
await fetch(FS + '/contacts/' + id, { method: 'PUT', headers: fs, body: JSON.stringify({ contact: { custom_field } }) });
}
app.listen(process.env.PORT ?? 3000);What to do with each result
| pingutil result | Action in Freshsales |
|---|---|
| `status: "invalid"` | Exclude from sequences and campaigns with a filter on Email status. |
| `status: "risky"`, `reason: "accept_all"` | Keep in sequences with fewer email steps; the mailbox cannot be confirmed. |
| `status: "unknown"` | Re-check later; not a verdict. |
| `category: "disposable"` | Lower the lead score or mark the contact as junk. |
| `company.industry` | Use in territory and assignment rules. |
Limits to plan for
- Freshsales documents up to 5 actions per workflow and retries a failed webhook for an hour, then for two more days, before ending it.
- Only the fields you select in the webhook content are sent, so include the contact id; the service needs it to write back.
- pingutil allows 300 verified addresses a day (3,000 a month) per account; contacts created after that stay unverified until a scheduled re-check. Those are Free plan limits; Enterprise has custom limits.
Freshsales documentation
- support.freshsales.io/support/solutions/articles/228946-how-to-use-workflows-with-webhooks-in-freshsales-
- developers.freshworks.com/crm/api/
Freshsales is a trademark of its owner. This integration uses Freshsales's documented extension points; it is not an official Freshsales app.
Common questions
- Can the Freshsales webhook call pingutil directly?
- The Trigger webhook action can POST to any URL, but pingutil's answer would not be written back to the contact. A small service, or an automation tool such as Zapier or Make, is needed to update the contact through the Freshsales API.
- Will the update re-trigger the workflow?
- Not if the workflow runs on contact created only. If you also run it on update, add a condition that Email status is empty.
Stop bad addresses in Freshsales 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 Freshsales setup will receive.