← HUBCOMMUNITY/WORKFLOWS
06 · WORKFLOWS · TRIGGER → AI → SHIP

End-to-end automation templates.
Code-first. No no-code lock-in.

Each workflow is a complete recipe: trigger source, AI step, output destination — all on Vercel cron + serverless. Drop the code, set the env vars, deploy. No Zapier, no n8n, no monthly platform fee.

2 OF 8 WORKFLOWS LIVE · 6 OUTLINED25% COMPLETE
live workflows · full code

Two flagships — copy, deploy, ship.

Both include the architecture diagram, env vars, the actual Vercel serverless function code, and the gotchas I hit shipping them in production.

WORKFLOW 01 · CONTENT ENGINE · v1.2

One source article → 15+ pieces across channels

Drop a long-form blog post in. Get back: X thread (8 tweets), LinkedIn carousel script (9 slides), Beehiiv newsletter draft, native X video script (60s), Reddit-friendly version, podcast intro. All voice-matched, all queued in your scheduling tools.

RUNS · 12×/MO
COST · ~$0.04
STATUS · READY
TRIGGER
RSS feed poll
AI
Claude 4.7
OUTPUT
Typefully + AuthoredUp
RUNTIME
~22 sec / source

The flow

STEP 01Vercel cron polls /blogs/feed.xmlDAILY 07:00 ET
STEP 02New post? Fetch full contentVERCEL FETCH
STEP 03Claude generates 6 variants in parallelCLAUDE 4.7 · 6 PROMPTS
STEP 04Push to Typefully + AuthoredUp queuesREVIEW · APPROVE · SHIP

The code

// vercel.json
{
  "crons": [{
    "path": "/api/cron/content-engine",
    "schedule": "0 11 * * 1-5"  // weekdays 07:00 ET
  }]
}

// api/cron/content-engine.ts
import { Anthropic } from '@anthropic-ai/sdk';
import { parseFeed } from './_feed';
import { kv } from '@vercel/kv';

const anthropic = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY! });

export async function GET() {
  const feed = await parseFeed('https://aiopsforge.dev/blogs/feed.xml');
  const latest = feed.items[0];

  // Idempotency — don't reprocess
  const seen = await kv.get(`content-engine:${latest.guid}`);
  if (seen) return Response.json({ skipped: true });

  // Run 6 variants in parallel
  const variants = await Promise.all([
    generate('x-thread', latest),
    generate('linkedin-carousel', latest),
    generate('newsletter', latest),
    generate('x-video-script', latest),
    generate('reddit', latest),
    generate('podcast-intro', latest),
  ]);

  await queueToTypefully(variants[0], variants[3]);
  await queueToAuthoredUp(variants[1]);
  await emailDraft(variants[2]);

  await kv.set(`content-engine:${latest.guid}`, true, { ex: 86400 * 30 });
  return Response.json({ ok: true, variants: variants.length });
}

Env vars

  • ANTHROPIC_API_KEY · Claude API token
  • TYPEFULLY_API_KEY · for queueing X drafts
  • AUTHOREDUP_API_KEY · for LinkedIn drafts
  • KV_REST_API_URL + KV_REST_API_TOKEN · Vercel KV for idempotency

Gotchas

  • Idempotency is non-negotiable — Vercel cron retries on failure. Without the KV check, you'd generate duplicates every retry. Set TTL to 30 days minimum.
  • Don't auto-publish — all 6 variants go to a review queue. The voice match isn't perfect yet; human review takes ~5 min and saves shipping a bad post.
  • Parallel = cost spike — 6 prompts in parallel = ~$0.04/run vs ~$0.012 sequential. Worth it for the latency, but watch your monthly spend.
WORKFLOW 02 · CUSTOMER ONBOARDING · v1.0

Whop webhook → personalized onboarding sequence

When someone joins via Whop, fire a personalized Day-0 welcome (via Claude), tag them in Beehiiv with their referral source, schedule the 30-day sequence, post to your operator Slack. All in one webhook handler.

RUNS · PER SIGNUP
COST · ~$0.012
STATUS · READY
TRIGGER
Whop webhook
AI
Claude 4.7
OUTPUT
Beehiiv + Whop DM
RUNTIME
~1.8 sec

The flow

STEP 01Whop sends membership.created webhookHMAC SIGNATURE VERIFIED
STEP 02Claude personalizes welcome messageFIRST NAME · REFERRER · GOAL
STEP 03Add to Beehiiv · tag + sequence trigger9-EMAIL DAY 0-90
STEP 04Send Whop DM + ping operator Slack"NEW MEMBER · NAME"

The code

// api/whop-webhook-membership-created.ts
import crypto from 'crypto';
import { Anthropic } from '@anthropic-ai/sdk';
import { kv } from '@vercel/kv';

export async function POST(req: Request) {
  const body = await req.text();
  const sig = req.headers.get('x-whop-signature');

  // Verify HMAC
  const expected = crypto.createHmac('sha256', process.env.WHOP_WEBHOOK_SECRET!).update(body).digest('hex');
  if (sig !== expected) return new Response('invalid signature', { status: 401 });

  const event = JSON.parse(body);
  const { user, membership } = event.data;

  // Idempotency — don't double-process retries
  const seen = await kv.get(`whop:${event.id}`);
  if (seen) return Response.json({ skipped: true });

  // Personalize welcome with Claude
  const welcome = await anthropic.messages.create({
    model: 'claude-sonnet-4-6',
    max_tokens: 300,
    messages: [{
      role: 'user',
      content: `Write a 3-line welcome DM for ${user.first_name} who joined via ${membership.referrer || 'organic'}. Voice: operator-to-operator, no fluff, sentence case. Reference one specific thing in /community/start-here.`
    }]
  });

  // Add to Beehiiv with tag
  await fetch(`https://api.beehiiv.com/v2/publications/${PUB_ID}/subscriptions`, {
    method: 'POST',
    headers: { Authorization: `Bearer ${process.env.BEEHIIV_API_KEY}` },
    body: JSON.stringify({
      email: user.email,
      custom_fields: { first_name: user.first_name, whop_id: user.id },
      tags: ['members-active', `source:${membership.referrer || 'organic'}`]
    })
  });

  // Send Whop DM + Slack ping
  await sendWhopDM(user.id, welcome.content[0].text);
  await pingSlack(`New member: ${user.first_name} via ${membership.referrer || 'organic'}`);

  await kv.set(`whop:${event.id}`, true, { ex: 86400 * 7 });
  return Response.json({ ok: true });
}

Why this beats Zapier/Make

  • One file, full control — no flow editor, no broken steps when API changes
  • $0/mo platform fee — Vercel Hobby covers most volumes
  • Versioned in git — your automation is code, reviewable on every PR
  • Custom logic is easy — branch on referrer, A/B welcome variants, defer to manual on edge cases

6 more workflows · queued

What's coming.

Each ships with the same level of detail: architecture diagram, full code, env vars, gotchas. New workflow drops every 3 weeks.

03
Daily morning brief
Inbox + calendar + Slack → AI-summarized brief delivered to your phone at 06:00
NEXT
04
Competitor watch
Daily scan of 8 competitors → weekly intel report with pricing + launch alerts
NEXT
05
Stripe finance close
Pull payouts → categorize → tax-deduct flag → monthly statement PDF
DRAFT
06
Sales outreach drip
CRM trigger → personalized 5-touch sequence with stall-flagging
DRAFT
07
SEO/GEO audit nightly
Cron + Claude → flag missing schema, broken canonicals, OG gaps
SOON
08
Newsletter engine
Source articles + RSS feeds → drafted Tuesday issue ready for review
SOON