/campaigns/templates.

Template kinds
| Type | Fields | Engine |
|---|---|---|
| subject, body | Visual block builder (Maily) → HTML render | |
| body | Plain text | |
| telegram | body | Plain text / parse_mode |
| prompt | content | LLM system prompt — used by autoreply, AI generate, lead-scoring |
Create a template
Email builder (visual)
type=email opens a visual block-based builder (built on Maily). Block types:
- Heading
- Paragraph
- Image
- Button (link rewrite for tracking)
- Divider
- Spacer
{ subject, body (HTML), design (JSON) }.
Raw HTML mode, markdown source mode, custom HTML block — coming soon.
Variable hint bar
A hint bar under the composer lists every valid variable. Click a hint → inserts it at the cursor. Common variables:{{customer.firstName}},{{customer.lastName}},{{customer.fullName}}{{customer.email}},{{customer.linkedinUrl}}{{customer.company.name}},{{customer.company.domain}}{{customer.language}},{{customer.country}}
Test send
Template detail header → Test send → modal:Override recipient (optional)
By default the message goes to the customer’s contact. Override to send it to your own email — verifies layout without spamming the customer.
Prompt template
type=prompt is used as an LLM system prompt. prompt-preview.tsx previews how the prompt renders against a sample customer.
Built-in prompt names
Templates with special names are looked up by services:| Name | Used by |
|---|---|
flow-generator | AI generate campaign workflow |
lead-scoring | AI lead fit scoring |
Template detail page
/campaigns/templates/:type/:name:
- Body preview
- Meta modal (rename, edit description)
- Test send
Used-by list (which campaigns reference the template), usage stats (open/click/reply rate per template), A/B test with a
random variable, edit history — coming soon.