ShepHouse Guides

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):

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.

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

Last tested: 2026-11-14. Corrections welcome via the product order page linked from Shop.