Model the real business
This is a productized service loop: find qualified buyers, sell a defined article package, collect payment, produce evidence-backed work, deliver or publish it under the destination’s rules, and report what actually happened. “Authority” is an observed outcome—not a ranking promise.
Research, writing, editorial review, publication access where legitimate, distribution, and transparent reporting.
Guaranteed rankings, guaranteed Domain Rating, undisclosed advertorials, followed paid links, fake expertise, or invented traffic.
The 12-skill operating loop
- Offer:
Positioning and ideal buyers, followed by sales enablement.
- Acquire:
PR/account mapping, revenue operations, approved one-to-one outreach, and consented lifecycle email.
- Close:
Proposal, scope, disclosure, payment, revisions, licensing, and cancellation terms.
- Fulfil:
Content strategy, deep research, production, copy editing, and named approval.
- Measure:
Publication receipt, Search Console evidence, optional licensed authority metric, invoice reconciliation, and renewal decision.
Minimum tools and connectors
| Connector | Responsibility | Default | Secret/config |
|---|---|---|---|
| runtime | Run schedules, webhooks, queues, approvals, retries, and logs | Railway worker + Postgres | DATABASE_URL |
| research | Research buyers, briefs, topics, sources, and claims | LLM API + web/search tool | MODEL_API_KEY, SEARCH_API_KEY |
| crm | Store companies, contacts, opportunities, consent, scopes, and renewals | HubSpot CRM | HUBSPOT_ACCESS_TOKEN |
| mailbox | Receive replies and send approved one-to-one business messages | Google Workspace or Microsoft 365 | MAILBOX_OAUTH |
| lifecycle-email | Send consented onboarding, delivery, status, and renewal messages; process bounces and complaints | Resend | RESEND_API_KEY, RESEND_WEBHOOK_SECRET |
| cms | Create drafts, upload media, publish approved articles, and retain revision IDs | WordPress REST API | CMS_BASE_URL, CMS_USERNAME, CMS_APP_PASSWORD |
| billing | Create checkout or invoices and reconcile payment webhooks | Stripe | STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET |
| search-evidence | Measure impressions, clicks, queries, pages, indexing, and sitemaps | Google Search Console API | GOOGLE_OAUTH_CLIENT |
| authority-metric · optional | Measure DR/backlinks only when a licensed third-party metric is part of the contract | Ahrefs API or equivalent | SEO_DATA_API_KEY |
Google Search Console provides owned-site search evidence. If the contract names Ahrefs Domain Rating, connect Ahrefs or another licensed authority-data provider; Search Console does not calculate DR.
DATABASE_URL=
MODEL_API_KEY=
SEARCH_API_KEY=
HUBSPOT_ACCESS_TOKEN=
MAILBOX_OAUTH=
RESEND_API_KEY=
RESEND_WEBHOOK_SECRET=
CMS_BASE_URL=
CMS_USERNAME=
CMS_APP_PASSWORD=
STRIPE_SECRET_KEY=
STRIPE_WEBHOOK_SECRET=
GOOGLE_OAUTH_CLIENT=
SEO_DATA_API_KEY= # optional unless authority metric is contractedConnect email as two lanes
Business mailbox
Google Workspace or Microsoft 365 receives replies and sends low-volume, relevant messages only after approval. Store the contact source and applicable legal basis in CRM.
Lifecycle provider
Resend handles opted-in onboarding, status, delivery, renewal, receipts, and notices. Check suppression before every send.
Event processor
Verify webhook signatures, acknowledge quickly, deduplicate event IDs, and update delivered, bounced, complained, unsubscribed, or replied states.
Resend’s acceptable-use policy prohibits unsolicited cold outreach. Do not put scraped prospects into Resend. Keep prospecting in the approved mailbox lane and move a contact to lifecycle email only after the required consent or customer relationship exists.
Run it 24/7 as bounded jobs
Schedules and webhooks create jobs; workers do not improvise unlimited campaigns. Every external side effect has a durable idempotency key and a state transition.
{
"id": "job_01",
"type": "publish_article",
"orderId": "order_42",
"idempotencyKey": "publish:order_42:revision_3",
"status": "awaiting_approval",
"evidenceIds": ["source_1", "source_2"],
"proposedAction": { "cmsDraftId": 884, "linkRel": "sponsored" },
"approvedBy": null,
"attempt": 0
}- Every 15 minutes: ingest replies, bounces, complaints, payments, and CMS events.
- Hourly: qualify new leads, prepare outreach drafts, advance approved fulfilment jobs, and alert on stalled work.
- Daily: refresh search evidence, delivery deadlines, cash status, suppressions, and approval queues.
- Weekly: produce pipeline, margin, delivery, SEO, complaints, and renewal reports.
Build the scheduler ↗ · Build the worker ↗ · Add production controls ↗
Core records
| Record | Must retain |
|---|---|
| Contact | Company, role, source URL, relevance, contact type, consent or lawful-basis status, suppression, last touch. |
| Opportunity | Package, value, stage, next action, owner, capacity slot, probability, loss reason. |
| Order | Signed scope, payment state, deadline, destination, revisions, disclosures, link rules, acceptance criteria. |
| Article | Brief, sources, claims, drafts, reviewer, approvals, CMS revision, canonical URL, publication receipt. |
| Message | Audience class, template version, approval, idempotency key, provider ID, delivery and suppression events. |
| Metric snapshot | Property, date range, source provider, query/page dimensions, backlinks, authority metric, and limitations. |
Approval gates
- first message to a new recipient.
- proposal or contract.
- refund or pricing exception.
- article publication or paid placement.
- new connector permission or higher spending limit.
The agent may automatically research, draft, classify, create CMS drafts, assemble proposals, prepare invoices, and compile reports. It should not automatically send to a new recipient, sign terms, issue refunds, or publish a commercial article until the named approver authorises that exact action.
Acceptance test before live operation
- Use test accounts.
Create one fake buyer, one test order, a Stripe test payment, and a private CMS draft.
- Replay every webhook.
Confirm duplicate email, payment, and CMS events do not create duplicate messages, invoices, or posts.
- Test suppression.
Mark the contact unsubscribed and prove every sender path refuses the message.
- Test the publication gate.
Remove approval and prove the system can create a draft but cannot publish it.
- Test failure recovery.
Crash the worker after a provider accepts a request and verify the retry reconciles the provider ID instead of repeating the side effect.