Skip to content

// support, community and events

Via API

Freshdesk email verification with pingutil

When a requester mistypes their address on the portal or widget, every agent reply on the ticket bounces and the ticket ages until someone notices. A Ticket Creation automation with the Trigger Webhook action posts the ticket id and requester email to your endpoint, pingutil verifies it, and your code adds a tag and a private note to the ticket so the agent knows before replying.

Where it connects: Freshdesk automation rule on Ticket Creation with the Trigger Webhook action, then the Freshdesk API (tickets, notes)

What goes wrong without it

  • Our agent wrote a careful answer, it bounced, and the customer escalated on social media saying nobody replied.
  • We only find out a requester email is wrong when the bounce comes back hours later.
  • Bots fill the support widget with junk tickets from temp-mail addresses and agents triage them by hand.

What you can do with Freshdesk and pingutil

  • Warn the agent before the first reply

    An invalid result adds a private note to the ticket with the reason and any did_you_mean suggestion, so the agent can confirm the address with the customer by phone or chat instead of replying into a bounce.

  • Filter junk tickets

    Disposable addresses get an email-disposable tag. A second automation or a filtered view keeps those tickets out of the main queue.

  • Measure how many replies would bounce

    Tags make it easy to report on how many new tickets arrive with an unreachable requester, which tells you whether your portal form needs better validation.

Set it up

  1. 1

    Create a pingutil API key and set it as PINGUTIL_KEY on your receiver, plus FRESHDESK_DOMAIN, FRESHDESK_API_KEY and a SHARED_SECRET of your choice.

  2. 2

    In Freshdesk, go to Admin, Workflows, Automations, open the Ticket Creation tab and click New Rule.

  3. 3

    Set the conditions you want (for example, source is Portal or Widget), then add the Trigger Webhook action with request type POST and your endpoint URL.

  4. 4

    Turn on Add custom headers and add X-Pingutil-Secret: your SHARED_SECRET. Under Content choose JSON, Advanced, and send {"ticket_id": "{{ticket.id}}", "email": "{{ticket.requester.email}}"}.

  5. 5

    Deploy the handler below, which checks the secret, answers right away, then tags the ticket and adds a private note through the Freshdesk API.

  6. 6

    Create a test ticket with a mistyped address and confirm the note and tag appear.

Express receiver for a Freshdesk Trigger Webhook
import express from 'express';

const app = express();
app.use(express.json());
const FD = 'https://' + process.env.FRESHDESK_DOMAIN + '.freshdesk.com/api/v2';
const auth = 'Basic ' + Buffer.from(process.env.FRESHDESK_API_KEY + ':X').toString('base64');

async function verify(email: string) {
  try {
    const res = await fetch('https://pingutil.com/v1/verify', {
      method: 'POST',
      headers: { authorization: 'Bearer ' + process.env.PINGUTIL_KEY, 'content-type': 'application/json' },
      body: JSON.stringify({ email }),
      signal: AbortSignal.timeout(30000),
    });
    return res.ok ? await res.json() : null; // fail open on 429 / 5xx
  } catch {
    return null;
  }
}

app.post('/webhooks/freshdesk', async (req, res) => {
  if (req.get('X-Pingutil-Secret') !== process.env.SHARED_SECRET) return res.sendStatus(401);
  res.sendStatus(200); // Freshdesk retries non-2xx responses, so answer first

  const { ticket_id, email } = req.body;
  const v = await verify(email);
  if (!v || v.status === 'valid' || v.status === 'unknown') return;

  const tag = v.reason === 'disposable_domain' ? 'email-disposable' : v.status === 'invalid' ? 'email-invalid' : 'email-risky';
  const ticket = await fetch(FD + '/tickets/' + ticket_id, { headers: { authorization: auth } }).then((r) => r.json());
  await fetch(FD + '/tickets/' + ticket_id, {
    method: 'PUT', // tags on update replace the list, so merge with the existing ones
    headers: { authorization: auth, 'content-type': 'application/json' },
    body: JSON.stringify({ tags: [...(ticket.tags ?? []), tag] }),
  });

  let body = 'pingutil: requester email is ' + v.status + ' (' + v.reason + ').';
  if (v.did_you_mean) body += ' Did they mean ' + v.did_you_mean + '?';
  await fetch(FD + '/tickets/' + ticket_id + '/notes', {
    method: 'POST',
    headers: { authorization: auth, 'content-type': 'application/json' },
    body: JSON.stringify({ body, private: true }),
  });
});

app.listen(3000);

What to do with each result

pingutil resultAction in Freshdesk
status: 'invalid' with did_you_meanTag email-invalid and add a private note with the suggested address for the agent to confirm.
status: 'invalid' (mailbox_not_found, no_mx)Tag email-invalid; the agent contacts the customer through another channel or closes as unreachable.
reason: 'disposable_domain'Tag email-disposable and keep the ticket out of the main queue with a view or a second rule.
status: 'risky'Tag email-risky and add a note; reply as normal but expect a possible bounce.
status: 'valid' or 'unknown'No change to the ticket.

Limits to plan for

  • Freshdesk allows up to 1,000 webhook calls per hour per account across all automation rules, and retries failed calls every 30 minutes up to 48 times.
  • Freshdesk does not sign webhook requests, so protect the endpoint with a custom header secret as shown.
  • Returning customers trigger the rule on every new ticket. pingutil caches results, but each call still counts toward the 300 verifications per day (3,000 a month) default, so add a condition that skips requesters you already checked (for example a contact field). Those are Free plan limits; Enterprise has custom limits.

Freshdesk documentation

Freshdesk is a trademark of its owner. This integration uses Freshdesk's documented extension points; it is not an official Freshdesk app.

Common questions

Can the automation rule use the pingutil response directly?
Not with Trigger Webhook; Freshdesk does not pass the response back into the rule. That is why the receiver writes the tag and note through the Freshdesk API itself.
Will this slow down ticket creation?
No. The webhook runs after the ticket is created, and the receiver answers Freshdesk before it calls pingutil.

Stop bad addresses in Freshdesk 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 Freshdesk setup will receive.