Tutorial · Marketing Automation
Build an end-to-end Workflow that cleans leads, generates personalized content, and sends across channels
Turn a raw customer-lead CSV into a batch of personalized emails + SMS, sent automatically. 60 minutes.
What You'll Get
A Workflow scheduled (every workday 09:00):
Prerequisites
- A leads CSV (name / email / industry / last contacted / recent product viewed)
- An email-sending API (SMTP / SendGrid / Mailchimp)
- A CRM write-back API (optional)
Step 1 · Connect SMTP (10 minutes)
Org · Credential management — register:
Workspace · Tools → Add HTTP Plugin:
Step 2 · Upload CSV as Data Source (5 minutes)
Workspace → Data · Data source → New → upload leads.csv.
Step 3 · Build the Workflow (35 minutes)
Workspace → Apps · Workflow → New → Lead Marketing Pro.
3.1 Start Node
Inputs (empty, since it's scheduled):
3.2 Read CSV
Drag a Code node to read the data source's CSV:
3.3 Batch Node
Drag a Batch node to run the downstream branch per lead:
Sub-flow:
Sub-node 1 · LLM Scoring
Sub-node 2 · Conditional
Sub-node 3 · LLM Generates Email
Sub-node 4 · Send Email
Tool node Email Sender.send:
Sub-node 5 · Write Back to CRM (optional)
HTTP node writes back to CRM, marking "marketed".
3.4 End Node
Step 4 · Debug (5 minutes)
Trial-run → watch the per-lead execution. Open Trace to verify:
- Are scores reasonable?
- Are emails personalized?
- Are API calls successful?
Step 5 · Configure Scheduling (2 minutes)
Workbench → Schedule → New:
Step 6 · Post-Launch Monitoring
Workspace → Observability:
| Metric | Target |
|---|---|
| Single-run latency | < 10 min (≤ 1000 leads) |
| Email send success rate | > 99% |
| Score distribution | Reasonable share of 7+ |
| Tokens per lead | Evaluate cost structure |
Going Further
| I want to… | Add |
|---|---|
| Add SMS channel | After the conditional, fan out an SMS node in parallel |
| Different industries, different templates | Add intent classification by industry to fan out |
| Track click-through | Add UTM params in emails; aggregate click logs in another Workflow |
| Retry failed emails | Add a retry node (auto-retry not in MVP yet — manual loop required) |
Reflections
- Don't treat the LLM as a hammer — LLM scoring is pricey at million-lead scale; use rules + LLM for fallback
- Don't blast emails simultaneously — add sleep / rate-limit nodes to protect downstream
- Don't skip CRM write-back — without tracking, no retro
Next Steps
- Customer service scenario → Customer service bot
- A/B testing → add multi-branch + random assignment
- Connect CDP / marketing cloud → Integration · Data connectors