SaaS

How Victor Ayomipo Built Alfred, an OpenClaw Agent for Creem Revenue

Built by Vayo · · Source: DEV

Quick answer

Victor Ayomipo built Alfred, an OpenClaw agent in Discord that watches a Creem store. It sends a morning revenue digest, flags failed payments with a billing portal link, and answers a cancellation with a win-back discount code and a draft email.

Result: In the author's tests on a test store, Alfred answered revenue questions in Discord, flagged a failed payment with a billing portal link, and met a simulated cancellation with a 20% off win-back code and a draft email.

What they built

Victor Ayomipo (Vayo on DEV) built Alfred, an OpenClaw agent that lives in their Discord and watches their Creem store. According to the write-up, Alfred has three jobs:

  • Daily revenue digest: a store health summary every morning by 8 am.
  • Failed payment alerts: when a subscription goes past due, Alfred generates a billing portal link so Ayomipo can look into it.
  • Churn response: when a subscription is canceled, Alfred creates a win-back discount code and drafts a re-engagement email.

The code is published as the creem-agent repo on GitHub and as a skill on ClawHub.

How it works

Ayomipo describes four parts.

  • The model: OpenClaw with OpenRouter's free tier models to keep costs near zero, and Claude or Gemini for heavier tasks. They warn that OpenClaw sends 100k to 200k tokens of context per message.
  • The Creem skill: a single prompt-based SKILL.md that tells Alfred to use the official Creem CLI. Ayomipo says a first attempt with complex TypeScript tools kept breaking. The rules include running the billing command for past due subscriptions, creating a discount and drafting an email for canceled ones, and fetching Creem's live docs if the CLI fails.
  • The webhook relay: a small Express server between Creem and OpenClaw. It checks the HMAC-SHA256 signature on each webhook, drops duplicates by event ID, and forwards the event to OpenClaw as a prompt. In the article it runs locally and is exposed through ngrok.
  • The heartbeat: OpenClaw wakes Alfred every 30 minutes. A Python script pulls transactions, subscriptions and customers from the Creem CLI, compares them with saved state, and stays silent if nothing changed. The heartbeat runs with light context to save tokens.

Alfred's persona and priorities live in the workspace files SOUL.md, IDENTITY.md and USER.md. One principle is that protecting MRR is the main goal.

The result

The article reports tests on a test store, not live business numbers. Asked for MRR and active subscribers, Alfred correctly reported zero, since the store only had one-time transactions. A triggered past due event produced an alert with a billing portal link. A simulated cancellation of a $29 a month plan produced a 20% off, 3 month discount code and a draft win-back email.

Ayomipo says they lost about 3 hours to a bug where Alfred processed webhooks but never posted to Discord. The fix was adding the channel ID to the webhook payload. Their takeaway is that a well configured agent with good skills and a heartbeat is about 70% ready for average use.

How to build something similar

  • Start with one alert, such as failed payments, and get it posting to your chat channel before adding more.
  • Put a small relay in front of your agent that verifies webhook signatures and drops duplicate events, so the agent only acts on real ones.
  • Use a scheduled check that compares current state with the last saved state and stays quiet when nothing changed. This keeps token costs down.
  • Have the agent draft discounts and customer emails for your approval before anything goes out to a customer.

The original post

Victor Ayomipo · View on DEV

Want to build something like this?

Join the Shipping Skool community free. Paid members get live bootcamp calls every week.

Join Shipping Skool — Free

More use cases

← All AI agent use cases