Posts can be written for a buying signal: the prompt gets its hypothesis and angle, and links carry its campaign tag. Plausible (Stats API v2) is read once a day for visitors on tagged links, recorded per signal as Visited. Stripe (restricted key) is read every hour: $0 checkouts are Signed up, paid invoices and one-time payments are Paid with their value, tied to a signal by the checkout's utm_campaign metadata or the payer's email. The Core's Cal.com has no API, so booking emails from Cal.com in the outreach mailbox count as Booked. New Settings → Website & sales; the signal page lists its posts and tagged links. Schema 11. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
120 lines
7.8 KiB
HTML
120 lines
7.8 KiB
HTML
{{define "content"}}{{with .Data}}{{$d := .}}{{$tab := .Tab}}
|
|
<div class="heading">
|
|
<h1>Outreach</h1>
|
|
<div class="buttons">
|
|
{{if not .NotReady}}<form method="post" action="/outreach/check" data-busy="Reading…"><input type="hidden" name="tab" value="{{$tab}}"><button type="submit" class="secondary">Check for replies</button></form>{{end}}
|
|
</div>
|
|
</div>
|
|
<p class="lede">Emails and LinkedIn messages to the people you accepted, each written from their buying signal's angle. Read and edit every draft: emails you queue go out one at a time, within your sending hours and daily limit; LinkedIn messages you send yourself. Replies, bounces and requests to stop come back from the inbox into the funnel.</p>
|
|
|
|
<section class="card status-line">
|
|
{{if not .Configured}}<p class="warn-text">Set up the mailbox under <a href="/settings/email">Settings → Email</a> before queuing emails. You can draft already.</p>
|
|
{{else if .NotReady}}<p class="warn-text">Sending is off: {{.NotReady}}.</p>
|
|
{{else}}
|
|
<p><strong>{{.SentToday}}</strong> of {{.S.DailyLimit}} emails sent today{{with .Counts.queued}}, <strong>{{.}}</strong> queued{{end}}. {{if .Window}}Paused: {{.Window}}.{{else}}Sending now, one every {{.S.GapMinutes}} minutes or more.{{end}}</p>
|
|
{{with .LastCheck}}<p class="small muted">Inbox read {{ago .At}}{{if .Error}}: <span class="error-text">{{.Error}}</span>{{else}}: {{.Read}} new {{if eq .Read 1}}message{{else}}messages{{end}}{{if .Replies}}, {{.Replies}} {{if eq .Replies 1}}reply{{else}}replies{{end}}{{end}}{{if .Bounces}}, {{.Bounces}} bounced{{end}}{{if .Stops}}, {{.Stops}} asked to stop{{end}}{{if .AutoReplies}}, {{.AutoReplies}} automatic{{end}}{{if .Bookings}}, {{.Bookings}} {{if eq .Bookings 1}}booking{{else}}bookings{{end}}{{end}}.{{end}}</p>{{end}}
|
|
{{end}}
|
|
</section>
|
|
|
|
{{if or .Emailable .Linkable}}
|
|
<form method="post" action="/outreach/draft-many" class="card row wrap" data-busy="Writing…">
|
|
<span>Write to accepted people nobody has written to yet ({{.Emailable}} with an email address, {{.Linkable}} on LinkedIn), 5 at a time:</span>
|
|
<select name="channel"><option value="email">Email</option><option value="linkedin">LinkedIn</option></select>
|
|
{{if .Signals}}<select name="signal"><option value="0">any signal</option>{{range .Signals}}<option value="{{.ID}}">{{.Name}}</option>{{end}}</select>{{end}}
|
|
<button type="submit" class="secondary small">Draft</button>
|
|
</form>
|
|
{{end}}
|
|
|
|
<nav class="tabs">
|
|
{{range .Tabs}}<a href="/outreach?tab={{.ID}}" {{if eq $tab .ID}}aria-current="page"{{end}}>{{.Label}}{{with index $d.Counts .ID}} <span class="muted">{{.}}</span>{{end}}</a>{{end}}
|
|
</nav>
|
|
|
|
{{range .Messages}}{{$m := .}}
|
|
<section class="card message" id="m-{{.ID}}">
|
|
<div class="prospect-head">
|
|
<div>
|
|
<h2>{{.Contact.Name}}{{with .Contact.Title}} <span class="muted small">{{.}}</span>{{end}}{{with .Company}} <span class="muted small">at {{.}}</span>{{end}}</h2>
|
|
<p class="meta">
|
|
<span class="badge">{{if eq .Channel "email"}}Email{{else}}LinkedIn{{end}}</span>
|
|
{{if eq .Channel "email"}}{{.To}}{{if eq .Contact.EmailStatus "valid"}} <span class="badge published">verified</span>{{else if eq .Contact.EmailStatus "risky"}} <span class="badge">risky</span>{{else if eq .Contact.EmailStatus "invalid"}} <span class="badge failed">bounces</span>{{else}} <span class="muted">not verified</span>{{end}}
|
|
{{else}}<a href="{{.Contact.LinkedIn}}" target="_blank" rel="noopener noreferrer">LinkedIn profile ↗</a>{{end}}
|
|
{{with index $d.SignalNames .SignalID}} · signal <strong>{{.}}</strong>{{end}}
|
|
· written {{ago .CreatedAt}}{{if not .SentAt.IsZero}} · sent {{ago .SentAt}}{{end}}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
|
|
{{if eq .Status "draft"}}
|
|
{{if eq .Channel "email"}}
|
|
<form method="post" action="/outreach/{{.ID}}/save">
|
|
<input type="hidden" name="tab" value="{{$tab}}">
|
|
<label>Subject <input name="subject" value="{{.Subject}}"></label>
|
|
<label>Email <textarea name="body" rows="9">{{.Body}}</textarea>
|
|
<span class="help">Your signature and the opt-out line are added under it. Links to your sites get UTM tags for this signal.</span></label>
|
|
<div class="actions">
|
|
<button type="submit" formaction="/outreach/{{.ID}}/queue">Queue to send</button>
|
|
<button type="submit" class="secondary">Save</button>
|
|
<button type="submit" class="secondary" formaction="/outreach/{{.ID}}/discard" data-confirm="Discard this draft?">Discard</button>
|
|
</div>
|
|
</form>
|
|
{{else}}
|
|
<form method="post" action="/outreach/{{.ID}}/mark-sent">
|
|
<input type="hidden" name="tab" value="{{$tab}}">
|
|
<label>Message <textarea name="body" id="li-{{.ID}}" rows="6" maxlength="{{$d.Limit}}" data-count="linkedin" data-limit="{{$d.Limit}}" aria-describedby="li-count-{{.ID}}">{{.Body}}</textarea>
|
|
<p class="count" id="li-count-{{.ID}}"></p>
|
|
<span class="help">Copy it, open their profile, and send it there (as a message, or a note with a connection request); then mark it sent.</span></label>
|
|
<div class="actions">
|
|
<button type="button" class="secondary" data-copy="li-{{.ID}}">Copy</button>
|
|
<a class="button secondary" href="{{.Contact.LinkedIn}}" target="_blank" rel="noopener noreferrer">Open their profile ↗</a>
|
|
<button type="submit">Mark as sent</button>
|
|
<button type="submit" class="secondary" formaction="/outreach/{{.ID}}/save">Save</button>
|
|
<button type="submit" class="secondary" formaction="/outreach/{{.ID}}/discard" data-confirm="Discard this draft?">Discard</button>
|
|
</div>
|
|
</form>
|
|
{{end}}
|
|
|
|
{{else if eq .Status "queued"}}
|
|
{{template "message-text" .}}
|
|
<div class="actions">
|
|
<form method="post" action="/outreach/{{.ID}}/send-now" data-busy="Sending…"><input type="hidden" name="tab" value="{{$tab}}"><button type="submit" class="small">Send now</button></form>
|
|
<form method="post" action="/outreach/{{.ID}}/unqueue"><input type="hidden" name="tab" value="{{$tab}}"><button type="submit" class="secondary small">Back to drafts</button></form>
|
|
</div>
|
|
|
|
{{else}}
|
|
{{template "message-text" .}}
|
|
{{with .Error}}<p class="{{if eq $m.Status "sent"}}warn-text{{else}}error-text{{end}} small">{{.}}</p>{{end}}
|
|
{{if not .RepliedAt.IsZero}}
|
|
<div class="reply"><p class="small muted">They replied {{ago .RepliedAt}}:</p><blockquote>{{.Reply}}</blockquote></div>
|
|
{{else if and (eq .Status "sent") (eq .Channel "linkedin")}}
|
|
<details class="outcome"><summary class="small">They replied</summary>
|
|
<form method="post" action="/outreach/{{.ID}}/replied" class="row wrap">
|
|
<input type="hidden" name="tab" value="{{$tab}}">
|
|
<label class="small grow">What they said <input name="reply" placeholder="optional"></label>
|
|
<button type="submit" class="secondary small">Record the reply</button>
|
|
</form>
|
|
</details>
|
|
{{end}}
|
|
{{if eq .Status "failed"}}
|
|
<div class="actions">
|
|
<form method="post" action="/outreach/{{.ID}}/queue"><input type="hidden" name="tab" value="{{$tab}}"><button type="submit" class="secondary small">Queue again</button></form>
|
|
<form method="post" action="/outreach/{{.ID}}/discard"><input type="hidden" name="tab" value="{{$tab}}"><button type="submit" class="secondary small">Discard</button></form>
|
|
</div>
|
|
{{end}}
|
|
{{end}}
|
|
</section>
|
|
{{else}}
|
|
<section class="card empty">
|
|
{{if eq $tab "draft"}}<p>No drafts. Write one from a person in <a href="/prospects?status=accepted">Review</a>, or draft for several accepted people above.</p>
|
|
{{else if eq $tab "queued"}}<p>Nothing queued.</p>
|
|
{{else if eq $tab "sent"}}<p>Nothing sent yet.</p>
|
|
{{else if eq $tab "replied"}}<p>No replies yet.</p>
|
|
{{else}}<p>Nothing failed or bounced.</p>{{end}}
|
|
</section>
|
|
{{end}}
|
|
{{end}}{{end}}
|
|
|
|
{{define "message-text"}}
|
|
{{if .Subject}}<p><strong>{{.Subject}}</strong></p>{{end}}
|
|
<div class="message-body">{{.Body}}</div>
|
|
{{end}}
|