On this page
Learning objectives
- Choose the right boundary between rules and model reasoning
- Design idempotent triggers, retries, and error queues
- Keep credentials and customer data out of prompts and logs
Prerequisites
A mapped workflow · API access to at least two systems · A test workspace
Answer first
Canonical definition
AI marketing automation combines deterministic workflow steps with model calls only where classification, extraction, or drafting benefits from probabilistic reasoning.
Operating context
Why it matters
A workflow platform is strong at triggers, routing, retries, and records; an LLM is strong at interpreting unstructured inputs. Mixing those roles carelessly makes failures harder to diagnose.
The production design must assume duplicate events, timeouts, missing fields, and partially completed runs.
Method
Step by step
- 01
Classify each step
Mark steps as deterministic, probabilistic, human decision, or external side effect.
- 02
Define contracts
Use structured input and output schemas, validation, and explicit fallback values around every model call.
- 03
Control side effects
Add idempotency keys, dry-run modes, approval gates, and replay-safe writes before touching CRM or media systems.
- 04
Operate the queue
Expose failed runs, retry policy, owner, cost, and the original event without logging unnecessary personal data.
Hands-on lab
Automate a research-to-brief handoff
Trigger on an approved research record, create a structured brief, and route low-confidence output to review.
Deliverable
A testable workflow with schemas, retry policy, audit log, and manual recovery runbook.
What breaks
Common failure modes
- F1Using an LLM for a rule that code could enforce reliably
- F2Repeating external actions when a workflow retries
- F3Hiding failed runs inside a personal automation account
Beyond the demo
Production notes
- Use service accounts and least-privilege credentials with a named owner and expiry review.
- Keep a manual path for the workflow and rehearse recovery from partial failure.
Further reading
Sources
Related Tenten resources