Skip to content

Blog Publish Automation

LevelDescriptionStatus
Level 1: ManualWriter → commit MDX → push → Vercel deploysCurrent default
Level 2: Semi-automatedAI drafts (mos-seo-content) → human reviews → manual commitCurrent for AI-written posts
Level 3: Git-triggeredBoxi CRM → GitHub API → auto-commit → Vercel deploysRoadmap: Sprint 1
Level 4: Fully automatedCRM scheduled → GitHub API → deploy → Postiz social queueRoadmap: Sprint 2

Agencies using advanced automation report 29% higher revenue impact (Averi AI, 2026). Building Level 3+4 puts Boxi in the top 1–2% of agencies by automation capability.

mos-seo-content → MDX file written + reviewed
└── Manual: commit to client repo → push → Vercel deploys (~60 sec)
└── Manual: create social posts in Postiz

Track each delivery as a Task in Boxi CRM.

Level 3 — GitHub API Publisher (to build)

Section titled “Level 3 — GitHub API Publisher (to build)”

Boxi CRM creates the MDX file directly in the client’s GitHub repo via the GitHub API. Vercel picks it up and deploys automatically.

// In Boxi CRM — publish blog post to client's Astro site
await fetch(
`https://api.github.com/repos/Traderfuz/${clientRepo}/contents/src/content/blog/${slug}.mdx`,
{
method: 'PUT',
headers: {
'Authorization': `Bearer ${GITHUB_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
message: `Add blog post: ${title}`,
content: btoa(mdxContent), // base64 encoded
branch: 'main',
}),
}
)

Store in Boxi provider config: GITHUB_TOKEN per client in lib/settings/provider-config-loader.ts (encryption infrastructure already built).

1. mos-seo-content → MDX written + reviewed
2. Stored in Boxi CRM (draft, with publishAt timestamp)
3. Boxi cron fires at publishAt:
├── GitHub API → commit MDX → Vercel deploys
└── Postiz API → schedule social posts: publish day + day 3 + day 7
// Schedule a social post via Postiz API
await fetch('https://postiz.yourdomain.com/api/posts', {
method: 'POST',
headers: { 'Authorization': `Bearer ${POSTIZ_API_KEY}` },
body: JSON.stringify({
integration: clientIntegrationId, // client's connected social account
content: 'Check out our latest guide...',
date: publishDate.toISOString(),
settings: { link: `https://clientsite.com/blog/${slug}` },
}),
})

Store in Boxi provider config: POSTIZ_API_KEY + per-client integration IDs.

await fetch(`https://clientsite.com/wp-json/wp/v2/posts`, {
method: 'POST',
headers: {
'Authorization': `Basic ${btoa(`${wpUser}:${wpAppPassword}`)}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ title, content, status: 'publish', slug }),
})

Same pattern — POST /collections/{collectionId}/items with Webflow API key.

Write in Google Docs → track delivery as a Boxi Task → client pastes into CMS.

  1. Now: Manual publish + Postiz manual scheduling. Track in Boxi Tasks.
  2. At >10 posts/week across clients: Build GitHub API publisher (Level 3). ~1–2 day sprint.
  3. Social automation first win: Boxi Workflow → Postiz API. One workflow template that auto-queues 3 social posts on every blog publish. Highest client-visible value.