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:
@@ -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 == "" {
|
||||
|
||||
Reference in New Issue
Block a user