Auto-respond to link-building requests in your inbox
Set up an agent that ingests inbound link emails, classifies them, drafts replies, sends safe cases autonomously, and escalates only payment requests and high-value partners.
Every inbound link-building or partnership email gets classified, drafted, and (for safe cases) sent — autonomously. You only see the ones that need human judgment: payment requests, suspicious senders, high-value partners.
| Outcome | Inbound link requests handled in minutes; only the consequential ones land on your desk |
| Time | ~10 min setup |
| Cost | 0.5 credits per classified message + 3 per draft + 2 per sent reply |
| Prereqs | Gmail or Outlook connection, link-building integrations (Apollo + Instantly recommended) |
What it does
new email lands in connected inbox
↓
ingested as InboundMessage
↓
classified: guest_post_pitch | link_swap | link_insertion | paid_link_insertion | spam | other
↓
eval gates evaluate (workspace rules + per-account overrides)
↓
if all pass: agent drafts and sends autonomously (if enabled), or drafts + queues
if any trip: WAITING_APPROVAL with reason + preview
↓
on send: LinkBuildingEvent created + relationship status updatedStep 1 — Connect inbox
curl -X POST .../v1/link-building/inbound/settings -d '{
"enabled": true,
"connectedInbox": {
"type": "gmail",
"address": "seo@acme.com"
}
}'Returns an OAuth URL — open it, grant access, you're connected.
Step 2 — Set up the essential eval gates
# Escalate any payment-related messages
curl -X POST .../v1/link-building/inbound/eval-gate -d '{
"name": "payment_request_escalation",
"applies_to": "link_building.inbound",
"when": { "llm_check": "Is the sender asking for money or implying a paid arrangement?" },
"then": { "action": "escalate_to_approval", "reason": "Partner mentioned payment" }
}'
# Auto-decline very low DR senders
curl -X POST .../v1/link-building/inbound/eval-gate -d '{
"name": "low_dr_decline",
"applies_to": "link_building.inbound",
"when": { "field_lt": { "senderDR": 20 } },
"then": { "action": "decline", "reason": "Site quality below threshold" }
}'
# Mark obvious spam
curl -X POST .../v1/link-building/inbound/eval-gate -d '{
"name": "obvious_spam",
"applies_to": "link_building.inbound",
"when": { "llm_check": "Does this look like template-based mass spam?" },
"then": { "action": "mark_spam" }
}'Step 3 — Configure default tone + auto-send
curl -X PATCH .../v1/link-building/inbound/settings -d '{
"defaultTone": "friendly",
"defaultAnglesYouConsider": ["guest_post", "link_insertion", "link_swap"],
"autoSendIfAllGatesPass": true
}'When autoSendIfAllGatesPass: true, the agent autonomously sends responses for messages where every gate passes. Disable if you want every send to require human approval (recommended for the first month while you tune the gates).
Step 4 — Per-partner overrides
For relationships you want extra care on:
# Always escalate inbound from a high-value partner
curl -X PUT .../v1/link-building/inbound/account-settings/acct_*** -d '{
"mode": "always_escalate",
"customNotes": "Long-time partner; double-check anything beyond a friendly reply"
}'
# Auto-decline a known bad actor
curl -X PUT .../v1/link-building/inbound/account-settings/acct_bad -d '{
"mode": "auto_decline"
}'Step 5 — Wire the approval queue
curl -X POST .../v1/webhooks -d '{
"url": "https://hooks.our-portal.com/lb-inbound",
"events": ["link_building.inbound.requires_review", "link_building.inbound.received"]
}'Your portal renders the preview + approve/reject buttons that call link_building.inbound.approve / .reject.
Step 6 — Monitor the queue
curl .../v1/link-building/inbound/pendingReturns the items waiting on review, grouped by reason.
One-shot script
#!/usr/bin/env bash
set -euo pipefail
KEY="${CITATIONBENCH_API_KEY:?}"
WS="${WORKSPACE_ID:?}"
BASE="https://api.citationbench.com/v1"
# 1. Enable + connect (interactive OAuth follows)
curl -sf -X POST $BASE/link-building/inbound/settings \
-H "Authorization: Bearer $KEY" -H "X-Workspace-Id: $WS" \
-d '{ "enabled": true, "connectedInbox": { "type": "gmail" } }'
# 2. Essential gates
for GATE in \
'{"name":"payment_request","applies_to":"link_building.inbound","when":{"llm_check":"Is the sender asking for money?"},"then":{"action":"escalate_to_approval"}}' \
'{"name":"low_dr","applies_to":"link_building.inbound","when":{"field_lt":{"senderDR":20}},"then":{"action":"decline"}}' \
'{"name":"spam","applies_to":"link_building.inbound","when":{"llm_check":"Does this look like spam?"},"then":{"action":"mark_spam"}}'
do
curl -sf -X POST $BASE/link-building/inbound/eval-gate \
-H "Authorization: Bearer $KEY" -H "X-Workspace-Id: $WS" \
-d "$GATE"
done
# 3. Default tone + auto-send (start with auto-send off; enable after a week)
curl -sf -X PATCH $BASE/link-building/inbound/settings \
-H "Authorization: Bearer $KEY" -H "X-Workspace-Id: $WS" \
-d '{ "defaultTone": "friendly", "autoSendIfAllGatesPass": false }'
echo "Inbound responder armed. Review pending: $BASE/link-building/inbound/pending"Gotchas
- Start with auto-send off. Run for a week with
autoSendIfAllGatesPass: false; review every draft. Then enable auto-send once you trust the gates. - The LLM gates are heuristic. They miss edge cases. Add more gates as you discover patterns.
- Sender reputation. Auto-sending high volumes from your real Gmail can hurt deliverability. The send happens via Instantly's pool, not your Gmail directly — but the auth/account reputation can still ripple. Pace if you're at scale.
- Eval gates compose. The
nonepredicate is essential — e.g., "auto-decline UNLESS we've placed a link with them before." See Eval Gates. - GDPR / privacy. The agent reads inbox content. Make sure that's compliant in your jurisdiction.
Related
- API: Link Building · inbound
- API: Link Building · campaign management
- Concept: Eval Gates
- Concept: Approval Workflows
- Playbook: Turn SERP into outreach campaigns (the inverse — outbound)
SERP → outreach campaigns
From one seed keyword to a scoped outreach campaign of 10–25 personalized emails — SERP scraping, Apollo contact discovery, LLM drafts, bulk approval, and Instantly send in under 15 minutes.
Build an SEO agent
A reusable Claude Code project that runs end-to-end SEO ops via the CitationBench MCP server — tell Claude what you want, it composes tools, persists results, and pauses for approval.