// forms and surveys
Via APIGoogle Forms email verification with pingutil
Google Forms response validation can check that an answer looks like an email, but it cannot tell whether the mailbox exists or is a throwaway. An Apps Script form-submit trigger calls pingutil for every new response and writes the status to a sheet, so you know which sign-ups and survey contacts are reachable before you email them. Google Forms has no hook that runs before a response is accepted, so this flags responses after submit.
Where it connects: Google Apps Script installable form-submit trigger (onFormSubmit) with UrlFetchApp
What goes wrong without it
- We collect waitlist sign-ups in a Google Form and a lot of the launch emails bounce.
- The form is public, so people enter fake addresses just to see the next section.
- Someone has to scan the response sheet by eye to find the obviously fake emails.
What you can do with Google Forms and pingutil
Mark every waitlist response as reachable or not
The trigger appends the pingutil status, reason and typo suggestion to a results sheet, which you filter before exporting the list to your email tool.
Separate work emails from personal ones
Swap the call to /v1/lookup with skip_enrichment to add the category column (company, free, disposable, educational) for B2B interest forms.
Check old responses in one go
Loop over form.getResponses() in a one-off function and call /v1/verify/batch with up to 50 addresses per request.
Set it up
- 1
Open the form, choose the three-dot menu, then Apps Script, and paste the script below.
- 2
In Project Settings, add script properties PINGUTIL_KEY (your pingutil key) and RESULTS_SHEET_ID (a spreadsheet with a tab named Verification).
- 3
Run installTrigger once from the editor and accept the authorization prompts for Forms, Sheets and external requests.
- 4
If the form does not collect respondent emails, make sure the email question is titled Email or change the title in the script.
- 5
Submit a test response and check the Verification tab for a new row.
const PROPS = PropertiesService.getScriptProperties();
function installTrigger() {
ScriptApp.newTrigger('onFormSubmit')
.forForm(FormApp.getActiveForm())
.onFormSubmit()
.create();
}
function findEmail(response) {
const collected = response.getRespondentEmail(); // set when the form collects emails
if (collected) return collected;
const item = response.getItemResponses().find(function (r) {
return r.getItem().getTitle() === 'Email';
});
return item ? String(item.getResponse()).trim() : '';
}
function onFormSubmit(e) {
const response = e.response; // FormResponse
const email = findEmail(response);
if (!email) return;
let result = null;
try {
const res = UrlFetchApp.fetch('https://pingutil.com/v1/verify', {
method: 'post',
contentType: 'application/json',
headers: { Authorization: 'Bearer ' + PROPS.getProperty('PINGUTIL_KEY') },
payload: JSON.stringify({ email: email }),
muteHttpExceptions: true,
});
if (res.getResponseCode() === 200) result = JSON.parse(res.getContentText());
} catch (err) {
console.warn('pingutil unavailable, logging as unchecked', err);
}
SpreadsheetApp.openById(PROPS.getProperty('RESULTS_SHEET_ID'))
.getSheetByName('Verification')
.appendRow([
new Date(),
response.getId(),
email,
result ? result.status : 'unchecked',
result ? result.reason : '',
result && result.did_you_mean ? result.did_you_mean : '',
]);
}What to do with each result
| pingutil result | Action in Google Forms |
|---|---|
| status: "valid" | Keep the row; safe to import into your email tool. |
| status: "invalid" | Filter the row out before export. Optionally remove it with form.deleteResponse(id) if you do not want it at all. |
| status: "risky" | Keep, but send to these addresses only after the valid ones so bounces stay low. |
| status: "unknown" or unchecked | Re-run the check later from a time-driven trigger. |
| did_you_mean is set | Use the suggested address when you contact the respondent. |
Limits to plan for
- Google Forms accepts the response before any script runs. Apps Script can flag or delete it afterwards, but it cannot show the respondent an error.
- UrlFetchApp has no per-request timeout option and Apps Script enforces daily quotas on URL fetches and trigger runtime. A slow mailbox check holds the trigger until it returns.
- Each response uses one of your account's 300 verified addresses a day (3,000 a month). For large public forms, use /v1/lookup with skip_enrichment (2,000 lookups a day, 30,000 a month) to catch disposable and random addresses first. Those are Free plan limits; Enterprise has custom limits.
Google Forms documentation
- developers.google.com/apps-script/guides/triggers/events
- developers.google.com/apps-script/guides/triggers/installable
- developers.google.com/apps-script/reference/url-fetch/url-fetch-app
Google Forms is a trademark of its owner. This integration uses Google Forms's documented extension points; it is not an official Google Forms app.
Common questions
- Do I still need this if my form collects verified Google emails?
- Less so. If the form is set to collect verified emails, respondents sign in with a Google account, so the address is real. The check matters for public forms where people type the address themselves.
- Can Google Forms reject a fake email before submit?
- No. Built-in response validation only checks the format. pingutil runs from an Apps Script trigger after the response is saved, so you flag or remove it afterwards.
Stop bad addresses in Google Forms 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 Google Forms setup will receive.