Back to Setup Guide

Real Workflows. Running Our Business.

6 production automation workflows powering MacAI HK — from cart enquiries to invoice generation. All running locally on Mac hardware with OpenClaw + n8n.

What We Automated

Three Pillars of Automation

📦
Orders & Sales
Cart enquiry pipeline, lead scoring and routing, automated invoice generation. Every sales touchpoint handled by AI.
💬
Customer Support
WhatsApp support bot with real inventory data, post-booking onboarding drip emails. Instant, accurate, 24/7.
Operations
Automated inventory monitoring and stock alerts every 6 hours. No more manual spreadsheet checks.

Infrastructure

The Stack

All 6 workflows run on a single Mac with Ollama providing local LLM inference. n8n orchestrates the automations, OpenClaw handles AI reasoning, and Cloudflare Workers + KV provide the edge layer.

Website
hkmac.ai
Cloudflare
Workers + KV
n8n
port 5678
Workflow Engine
OpenClaw
port 3456
AI Agent
Ollama
port 11434
Local LLM
KV
Inventory Data
Resend
Email Delivery
WhatsApp
Messaging
🛒
Sales

Cart Enquiry Pipeline

Before
Cart enquiries sent via mailto link. No tracking, no confirmation email, no way to know if the customer received a response. Leads fell through the cracks.
After
Cart submissions hit a webhook. OpenClaw drafts a personalised quote based on the selected configuration. Resend delivers the email. Every enquiry is logged and tracked.
1

Customer submits cart

Website sends selected hardware configuration and customer details to n8n webhook endpoint.

2

OpenClaw drafts quote

AI agent reads the cart data, checks current pricing from KV, and generates a personalised quote email in the customer's preferred language.

3

Resend delivers email

The quote email is sent via Resend API with branded HTML template, including a direct link to book a follow-up call.

4

Lead logged & scored

Enquiry details, quote amount, and customer info are stored for lead scoring and follow-up automation.

Cart Form
Webhook
KV Lookup
OpenClaw
Resend
Log
📋
Support

Post-Booking Onboarding

Before
Customer booked a session, received a single confirmation email, then heard nothing until the appointment day. No preparation guidance, no reminders.
After
Automated 4-email drip sequence: preparation checklist on booking, reminder the day before, setup guide after the session, and a check-in one week later.
D0
Day 0
Prep checklist: backup data, clear storage, update macOS
D-1
Day -1
Appointment reminder with time, location, and what to bring
D+1
Day +1
Post-setup guide: how to use Ollama, LM Studio, and your AI tools
D+7
Day +7
Check-in email: how is everything running? Need help? Book a follow-up
💬
Support

WhatsApp Support Bot

Before
Customer asks a question on WhatsApp. We manually check the website, copy-paste pricing, check stock availability, then type a reply. Response time: hours.
After
WhatsApp message triggers n8n. OpenClaw reads the question, queries real inventory data from KV, and sends an accurate reply with current pricing and availability. Under 30 seconds.
WhatsApp
n8n
KV Query
OpenClaw
Reply
🎯
Sales

Lead Qualification & Routing

Before
All enquiries land in one inbox. No priority, no scoring. A ready-to-buy enterprise lead gets the same treatment as a casual browser asking about specs.
After
OpenClaw analyses each enquiry for buying intent, budget signals, and urgency. Leads are scored HOT / WARM / INFO and routed to the appropriate response channel automatically.
HOT
Ready to Buy
WhatsApp alert + priority email response within 15 minutes
WARM
Interested
Personalised follow-up email with relevant case studies
INFO
Browsing
Auto-reply with FAQ links and setup guide
📦
Operations

Inventory & Stock Alerts

Before
Manual stock checks on the Apple HK website and supplier portals. Missed restocks, sold out configs, and no early warning when popular models ran low.
After
n8n runs every 6 hours: checks inventory API, filters low-stock items, OpenClaw drafts a summary alert, and sends a notification via email and WhatsApp.
1

Scheduled trigger

n8n cron node fires every 6 hours to initiate the inventory check cycle.

2

Check inventory API

Queries Cloudflare KV for current stock levels across all hardware configurations.

3

Filter low stock

Filters items below threshold. If all stock is healthy, the workflow exits silently with no alert.

4

Draft alert

OpenClaw summarises which items are low, recommends reorder quantities, and formats the alert.

5

Notify

Alert sent via email and WhatsApp with actionable reorder links and current stock counts.

🧾
Sales

Automated Invoice Generation

Before
After completing a setup, manually fill out an invoice template in Google Docs. Copy customer details, look up pricing, calculate totals, export PDF, email it. 15-20 minutes per invoice.
After
When a job status changes to "completed" in KV, n8n triggers automatically. OpenClaw generates an invoice number, pulls order data, renders the invoice, and emails it to the customer. Zero manual effort.
Status Change
KV Read
Generate #
Render
Send

Results

The Impact

0
Manual emails sent per enquiry (was 2-3)
6h
Max time to stock alert (was days)
100%
Leads scored & routed automatically
< 30s
Average WhatsApp response time

Get Started

Setup & Import Workflows

Everything you need to get these 6 workflows running on your Mac. Follow the steps below, or see the full guide for detailed instructions.

Prerequisites

💻
Apple Silicon Mac
M1 or later, 16GB+ RAM recommended
🧠
Ollama Running
Models pulled (llama3, mistral)
🦀
OpenClaw on :3456
AI agent running on port 3456
⚙️
n8n on :5678
Workflow engine running on port 5678

Setup Steps

1

Create Cloudflare Tunnel

Set up a Cloudflare Tunnel to expose your local n8n instance. Map n8n.hkmac.ai to localhost:5678 so webhooks can reach your Mac from the public internet.

2

Set Environment Variables

In the Cloudflare Pages dashboard, add environment variables for your Resend API key, WhatsApp token, OpenClaw endpoint, and KV namespace bindings.

3

Import Workflow JSONs

In n8n, go to Settings → Import and upload each workflow JSON file. All 6 workflows are available in the project repository.

4

Configure Credentials

Add your Resend API key, WhatsApp Business token, and Cloudflare API token as credentials in n8n. Each workflow references these shared credentials.

5

Activate & Test

Toggle each workflow to active in n8n. Start with the Cart Enquiry Pipeline to verify end-to-end connectivity before enabling the remaining workflows.

✅ Quick Test
  • Submit a test cart enquiry on the configure page to trigger the Cart Enquiry Pipeline webhook
  • Check the n8n execution log to confirm the workflow ran successfully and OpenClaw generated a response
  • Verify email delivery via the Resend dashboard — the test quote should appear in your inbox

Want this for your business?

Every workflow runs 100% locally on Mac hardware. No cloud AI, no subscriptions, no data leaving your device.

Book Assessment Setup Guide