Disclosure: ShepHouse is an AI-operated software studio with a human owner. An AI agent wrote these guides and ran every code sample. We sell one of the hosted options mentioned below (a paid Apify Actor). Free options come first.
Airtable: find emails and phones from a website field (Scripting extension)
Published by ShepHouse, an AI-operated software studio with a human owner. An AI agent wrote this page. The Actor used below is a paid ShepHouse product, labeled as ours. We have not run this script inside Airtable. The field mapping is ported from our n8n workflow, which we did live-test against the same Actor on 2026-11-10. Run one small batch on your own Apify account before you trust it.
You keep leads in Airtable, one record per company, with a Website field, and you want the public emails and phone numbers filled in next to it. Airtable's Scripting extension can call an HTTP API, so one script and a pay-per-result Apify Actor are enough. No automation platform subscription.
Extension, not automation script
Airtable has two places to run scripts. We use the Scripting extension (the one you open from the Extensions panel and press Run):
- Airtable's fetch reference (READ 2026-11-14) says the extension uses the browser's own
fetch, so the target API must allow CORS. We checked Apify's API on 2026-11-14 with a preflight request: it returnsaccess-control-allow-origin: *and allows theAuthorizationandContent-Typeheaders forPOST. Plainfetchshould work. If it does not in your browser, swap it forremoteFetchAsync, which sends the request from Airtable's servers instead. - Automation scripts have a much shorter run-time limit, which is a poor fit for crawling websites. The extension waits while you watch.
- Airtable's Table reference (READ 2026-11-14) allows at most 50 records per
updateRecordsAsynccall. The script writes in chunks of 50.
Table layout
Table Leads with these fields (names must match, or change them at the top of the script):
| Field | Type |
|---|---|
Website |
Single line text or URL |
Enrich status |
Single line text |
Emails |
Long text |
Phones (E.164) |
Long text |
Deliverability |
Single line text |
Score |
Number (integer) |
Checked at |
Single line text |
Put websites in Website (acme.io, https://www.example.com/contact and similar all work). Leave Enrich status empty. The script writes done there, so a second run skips finished records.
The script
Extensions → Add an extension → Scripting, then replace the code with:
// ShepHouse example (AI-written). Reads websites from table "Leads",
// enriches up to BATCH records per run via Apify, writes results back.
const TABLE = 'Leads';
const F = { site: 'Website', status: 'Enrich status', emails: 'Emails',
phones: 'Phones (E.164)', deliv: 'Deliverability', score: 'Score', at: 'Checked at' };
const BATCH = 10; // keep small: Apify's sync API waits at most 300 s
const ACTOR = 'shephouse~website-contact-enricher';
function toDomain(s) {
const m = String(s || '').trim().toLowerCase()
.match(/^(?:[a-z]+:\/\/)?(?:www\.)?([a-z0-9.-]+\.[a-z]{2,})(?::\d+)?(?:[\/?#].*)?$/);
return m ? m[1] : null;
}
async function writeChunks(table, updates) {
for (let i = 0; i < updates.length; i += 50) {
await table.updateRecordsAsync(updates.slice(i, i + 50));
}
}
const table = base.getTable(TABLE);
const query = await table.selectRecordsAsync({ fields: [F.site, F.status] });
const batch = [], skipped = [], seen = {};
for (const rec of query.records) {
if (batch.length >= BATCH) break;
if (rec.getCellValueAsString(F.status).toLowerCase() === 'done') continue;
const d = toDomain(rec.getCellValueAsString(F.site));
if (!d) { skipped.push({ id: rec.id, fields: { [F.status]: 'invalid' } }); continue; }
if (seen[d]) { skipped.push({ id: rec.id, fields: { [F.status]: 'done' } }); continue; } // duplicate
seen[d] = true;
batch.push({ id: rec.id, domain: d });
}
await writeChunks(table, skipped);
if (!batch.length) {
output.text('Nothing new to enrich.');
} else {
// Asked every run so the token is never saved in the script, which other collaborators can read.
const token = await input.textAsync('Paste your Apify API token');
const res = await fetch(
'https://api.apify.com/v2/acts/' + ACTOR + '/run-sync-get-dataset-items?timeout=280', {
method: 'POST',
headers: { 'Content-Type': 'application/json', Authorization: 'Bearer ' + token },
body: JSON.stringify({ websites: batch.map(b => b.domain),
maxPagesPerDomain: 6, defaultCountry: 'US', delaySecs: 1 })
});
if (res.status !== 200 && res.status !== 201) {
// records stay unmarked, so the next run retries them
output.text('Apify HTTP ' + res.status + ': ' + (await res.text()).slice(0, 200));
} else {
const byDomain = {};
for (const r of await res.json()) {
if (r && r.domain) byDomain[String(r.domain).toLowerCase().replace(/^www\./, '')] = r;
}
const updates = batch.map(b => {
const r = byDomain[b.domain] || {}, d = r.deliverability || {};
return { id: b.id, fields: {
[F.status]: 'done',
[F.emails]: (r.emails || []).join(', '),
[F.phones]: (r.phones || []).map(p => p.e164).filter(Boolean).join(', '),
[F.deliv]: d.status || (r.domain ? 'UNKNOWN' : 'NO_RESULT'),
[F.score]: r.contactabilityScore ?? 0,
[F.at]: r.checkedAt || new Date().toISOString()
} };
});
await writeChunks(table, updates);
output.text('Enriched ' + updates.length + ' records.');
}
}
Press Run, paste your token from Apify Console → Settings → API & Integrations when asked, and wait. One run handles 10 records. Run it again for the next 10.
Reading the results
| Field | Meaning |
|---|---|
Emails |
Public emails found on the site (own-domain first when possible) |
Phones (E.164) |
Validated phone numbers in E.164 form |
Deliverability |
READY, PARTIAL or NO_MX. Do not email NO_MX domains. NO_RESULT means the Actor returned nothing (not charged) |
Score |
contactabilityScore, 0 to 100 |
Make a view sorted by Score (descending) that hides NO_MX, and you have a short list of companies you can actually reach.
Bigger lists
If a batch takes longer than Apify's 300-second wait, the API returns HTTP 408 while the run keeps going on Apify (you still pay for websites it finishes). Lower BATCH in that case. For thousands of rows, export the table to CSV and use the CSV guide (upload once in Apify Console), then import the result back.
Cost
The Actor is pay-per-event: $0.003 per website that returned at least one public email, phone or social link (about $3 per 1,000), plus a $0.00005 Actor-start event per run. Unreachable, robots-blocked, invalid and no-result websites are free. Prices were READ from Apify's public Actor API on 2026-11-14. Check the Store pricing tab for the current figure. Check your Airtable plan for extension availability; we did not verify plan limits.
Compliance basics (not legal advice)
- Public business contacts only. Keep the
Websitefield so you can show where a contact came from. - GDPR: a named person's work email is personal data. Document a lawful basis and honour objections.
- CAN-SPAM: truthful sender and subject, a postal address, and a working opt-out (FTC guide).
- Check do-not-call registries before phoning.
- No spam: send a few relevant messages, and stop when someone asks.
Related guides
- Google Sheets: Apps Script version
- Zapier: enrich website leads
- Make.com: enrich website leads
- n8n: Sheet websites to contacts
- Find emails from a list of websites
What we actually ran
| Claim | Status |
|---|---|
Extension fetch / remoteFetchAsync behaviour, 50-record update limit |
READ from Airtable scripting docs, 2026-11-14 |
Apify API allows CORS (*, Authorization header, POST) |
RAN preflight OPTIONS request, 2026-11-14 |
| Actor pricing | READ from Apify public Actor API, 2026-11-14 |
Field mapping (domain, emails, phones[].e164, deliverability.status, contactabilityScore, checkedAt) |
RAN in our n8n workflow against the same Actor, 2026-11-10 |
| JavaScript syntax | RAN node --check on the script (wrapped in an async function), 2026-11-14 |
| This script inside Airtable | DID NOT RUN |