Phase 2 part 5: find people and verify emails with Hunter.io

Review gets Find people (Domain Search by the departments, seniority and
count set in Settings → Lead sources), Find their email (Email Finder for
a named person at a company), and Verify (one, or every unchecked address
in New). Every call is kept in enrich_runs (schema 9) with its result and
credits, and shown on the card. Nothing runs on a schedule. Sources are
shown by name (Hunter.io, origami.chat, explee.com).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-22 05:53:52 -07:00
co-authored by Claude Opus 5.5
parent efca73bcd4
commit 82d569da9c
18 changed files with 1348 additions and 11 deletions
+8 -1
View File
@@ -341,6 +341,7 @@ func (s *Server) sourcesPage(w http.ResponseWriter, r *http.Request) {
s.render(w, r, "sources", page{Title: "Lead sources", Nav: "settings/sources", Data: map[string]any{
"Sources": s.leadSources(),
"Project": s.origamiProject(),
"Hunter": s.hunterSettingsData(),
}})
}
@@ -349,7 +350,7 @@ func (s *Server) sourcesSave(w http.ResponseWriter, r *http.Request) {
http.Error(w, err.Error(), http.StatusBadRequest)
return
}
if err := s.saveSecrets(r, leadSourceKeys); err != nil {
if err := s.saveSecrets(r, append(leadSourceKeys, hunterKey)); err != nil {
s.serverError(w, err)
return
}
@@ -357,6 +358,10 @@ func (s *Server) sourcesSave(w http.ResponseWriter, r *http.Request) {
s.serverError(w, err)
return
}
if err := s.saveHunterSettings(r); err != nil {
s.serverError(w, err)
return
}
redirect(w, r, "/settings/sources", "saved")
}
@@ -382,6 +387,8 @@ func (s *Server) sourcesTest(w http.ResponseWriter, r *http.Request) {
if who != "" {
data["OK"] = "The key works (" + who + ")."
}
case "hunter":
data = s.testHunter(ctx)
case signals.SourceOrigami:
key := s.Secrets.Get(secrets.OrigamiAPIKey)
if key == "" {