MarketingHub.ca (Dave Groups Inc, Ontario)

MarketingHub.ca — LLM Automation for a Digital Agency

A long-running engagement building LLM-backed automations into an agency's existing stack — HubSpot, Zapier, Monday.com, Slack — with a human approval step on every output that reaches a client.

Role
AI Consultant / Automation Architect
Period
Mar 2023–Present

01 Problem What was actually hard

Agency work is full of tasks that need judgement but follow a pattern: qualifying an inbound lead, drafting a campaign brief, enriching CRM records, writing a nurture sequence. The constraint was not model quality, it was integration and trust. The automations had to run inside tools the team already used, stay maintainable by people who are not engineers, avoid vendor lock-in, and never send an LLM-written message to a client without someone approving it.

02 Data Sourcing and preparation

Documented the existing workflows first — campaign templates, email sequences, lead-scoring rubrics — then extracted the historical record from HubSpot: past campaigns with vertical, objective and outcome, plus template response rates. That became both the retrieval corpus and the few-shot library. Output quality is measured by human review of a fixed sample per task type, scored on accuracy, tone match and strategic relevance, so a prompt change can be accepted or rejected on evidence.

03 Models Evaluated, kept, cut

6 evaluated 4 kept 2 cut

Kept 4

  • Mistral 7B Instruct

    Carries routine lead qualification and email drafting at the lowest cost per call

  • Llama 3.1 8B Instruct

    Escalation tier for strategy briefs and proposals

  • GPT-4

    Reserved for high-stakes work in unfamiliar verticals

  • Retrieval-augmented generation

    Grounds every output in that client's past campaigns — the thing that stopped outputs reading generic

Cut 2

  • LoRA fine-tuning

    Prompt templates plus retrieval reached the same quality without a training pipeline to maintain

  • Task-specific NLP models

    Brittle across client verticals; general models generalised better

04 Architecture How it fits together

A Python hub on Lambda sits between the agency stack and the models. A trigger — new lead email, form submission, board update — fires a webhook; the handler pulls client context from HubSpot, retrieves three semantically similar past campaigns as grounding, and routes to a model chosen by task complexity rather than always reaching for the strongest one. The draft goes to Slack for human approval, and only an approved output syncs back into HubSpot and triggers the next step. Every call is logged to PostgreSQL for audit, and highly-rated outputs are promoted into the few-shot library.

Architecture flow: Trigger then Lambda handler then Retrieve context then Route by complexity then Slack approval then Sync to HubSpot 01 Trigger new lead, form submission, board update 02 Lambda handler Zapier / HubSpot webhook 03 Retrieve context 3 similar past campaigns 04 Route by complexity Mistral 7B · Llama 3.1 · GPT-4 Rejected — back to draft 05 Slack approval nothing reaches a client unreviewed 06 Sync to HubSpot

05 Production Deployment and operation

Serverless on AWS Lambda, so idle costs nothing. Integrations span HubSpot (lead sync, deal stages, enrichment), Zapier (triggers), Monday.com (task creation) and Slack (approval checkpoints). A weekly sampled review keeps quality visible, and the conditional routing rule is re-tuned from that review — the great majority of traffic stays on the cheapest model.

06 Deep dive The long version, in full

Problem

Digital marketing agencies excel at strategy and execution but drown in repetitive work: qualifying leads from inquiry emails, writing campaign briefs from client requirements, scheduling social posts, enriching CRM data, and sending automated nurture sequences. Each task requires judgment but follows patterns.

MarketingHub.ca (Dave Groups Inc, Ontario) operated efficiently but wanted to scale without proportional headcount increase. The challenge: LLM tools were emerging but integrating them into existing stacks (HubSpot, Zapier, Monday.com) required custom glue code, and maintaining such integrations was effort-intensive.

The goal: Make LLM-powered automation accessible to non-technical team members without vendor lock-in.

Data Preparation

We mapped the entire agency workflow: documented campaign templates (SEO, paid ads, content marketing), email sequences (cold outreach, nurture, sales), and decision criteria (lead scoring, deal qualification).

From HubSpot, we extracted:

  • 500+ past campaigns (client name, vertical, objectives, results)
  • Lead scoring rubrics (qualification criteria per vertical)
  • Email templates and response rates

We created prompt libraries—reusable templates for common tasks:

  • “Summarize this lead inquiry email in 2 sentences. Route to: [SEO / Paid Ads / Content]. Scoring: [High / Med / Low]. Reason:”
  • “Draft an email response to this lead, matching our tone (helpful, not salesy)”
  • “Create a campaign brief for a [vertical] client with budget $[amount]. Suggest strategy for [goal]”

Evaluation data: human review of 100 LLM-generated outputs per task type. Measured accuracy, tone-matching, strategic relevance.

Models Evaluated

Model Result Use Case
Mistral 7B Kept Routine lead qualification, email drafts (60% of workflows)
Llama 3.1 8B Kept Complex strategy briefs, client proposals (30% of workflows)
GPT-4 Kept High-stakes strategy work, novel client verticals (10% of workflows)
RAG Kept Ground all outputs in client-specific data for consistency
Fine-tuning (LoRA) Cut Prompt engineering + few-shot + RAG achieved 95% of fine-tuning quality without overhead
Custom NLP Cut LLMs generalize better; custom models brittle across client verticals

Architecture

A hub-and-spoke automation system:

[Trigger: new lead email]
  v
Zapier -> Lambda (webhook)
  v
Retrieve context from HubSpot (past client data)
  v
Build RAG query (retrieve 3 similar past leads)
  v
Prompt LLM (Mistral or Llama, conditional on complexity)
  <- [Lead email] + [Client context] + [Past examples]
  v
Generate output (lead summary, routing, score)
  v
Post to Slack (human review/approval)
  v
On approval: sync back to HubSpot + trigger next workflow

Intelligence routing: Simple tasks (lead qualification, email drafts) -> Mistral 7B (~0.5¢ per call). Complex tasks (strategy briefs for new verticals) -> Llama 3.1 (~2¢) or GPT-4 (~8¢) if high confidence needed.

RAG layer: Every LLM call retrieves 3 semantically similar past campaigns using Sentence Transformers embeddings. This grounds the model in MarketingHub’s voice and historical performance.

Production & Scale

Deployed as serverless AWS Lambda functions (scale to zero when idle; pay only for executions). Integrations span:

  • HubSpot: Sync leads, update deal stages, enrich company data
  • Zapier: Trigger workflows on form submissions, new email, etc.
  • Monday.com: Auto-populate task details in project boards
  • Slack: Human review checkpoints; final approvals

All LLM outputs logged for audit trail. Weekly human review (5% sample) ensures quality; high-scoring examples fed back into prompt library.

Key results:

  • 40+ workflows automated across lead gen, email, strategy, CRM enrichment
  • ~120 human hours saved per week (agency staff freed for higher-value work)
  • Cost: ₹2–15 per workflow (vs ₹50–200 for manual work)
  • Client satisfaction: 5.0 out of 5 on communication, quality, value

Client testimonial (from MarketingHub’s internal review):

“Thanks for the accurate work, keep it up! I highly recommend your service. I hope you’ll continue delivering the same excellent quality of work for me in the future.” — onlineasset, 5.0 out of 5

Learnings

  1. Prompt engineering beats fine-tuning at this scale. Reusable templates + few-shot examples are faster to iterate than model training.
  2. Conditional model routing saves costs. 95% of tasks run on Mistral; only hard cases escalate to stronger models.
  3. Human-in-the-loop is essential for agency work. LLM outputs are starting points; client preferences and brand voice require human judgment.
  4. RAG enables consistency across 50+ client campaigns. Without it, LLM outputs felt generic.

Ongoing: Expanding automation to campaign performance analysis (weekly reporting), audience analysis (segmentation), and competitor tracking.

workflows automated
40+
cost per workflow
₹2–15 depending on model and complexity

Stack

  1. Models & inference What does the thinking
    • Mistral 7B Instruct
    • Llama 3.1 8B Instruct
    • GPT-4 (selective)
    • Sentence Transformers (retrieval)
  2. Runtime & services What holds the connection open
    • Python (FastAPI, asyncio)
  3. Data & state What is remembered
    • PostgreSQL
  4. Cloud & delivery What it runs on
    • AWS Lambda
  5. Interfaces & integrations What people and other systems touch
    • HubSpot CRM API
    • Zapier webhooks
    • Monday.com API
    • Slack API