# Google Sheets + Dizo

> A tiny Apps Script adds a =DIZO_EMAIL() function to Google Sheets that finds verified work emails per row.

Type: REST recipe — base URL `https://api.dizo.ai/v1`. No native app needed.

## Steps
1. Extensions → Apps Script, paste the code below.
2. Project Settings → Script properties: add `DIZO_API_KEY`.
3. In a cell: `=DIZO_EMAIL(A2, B2, C2)` (first, last, domain).

## Code.gs
```
function DIZO_EMAIL(first, last, domain) {
  if (!first || !domain) return "";
  const key = PropertiesService.getScriptProperties().getProperty("DIZO_API_KEY");
  const res = UrlFetchApp.fetch("https://api.dizo.ai/v1/email/find", {
    method: "post",
    contentType: "application/json",
    headers: { Authorization: "Bearer " + key },
    payload: JSON.stringify({ first_name: first, last_name: last, company_domain: domain, max_credits: 1 }),
    muteHttpExceptions: true,
  });
  if (res.getResponseCode() === 404) return "not found";
  return JSON.parse(res.getContentText()).email.address;
}
```

## Notes
- Sheets recalculates custom functions; paste results as values once done so rows are not re-requested (repeats are also de-duplicated by Idempotency-Key if you add one).

## Related API docs
- [/docs/email-find](https://dizo.ai/docs/email-find.md)
- [/docs/email-verify](https://dizo.ai/docs/email-verify.md)
