How it works
Load the prompt template
The system uses the
flow-generator prompt template (stored in the workspace, customizable). See Templates.Inject context
The prompt is pre-filled with:
- Node catalog — every available node, params + output
- Customer fields — fields you can reference via
{{customer.*}} - Current workflow — snapshot of the existing graph (if any)
Call the LLM (Chat slot)
The model configured under AI Models emits a JSON graph against a strict schema.
Validate
The engine tries to compile the graph. On failure (cycle, missing field, invalid node id) → returns an error without applying.
Replace nodes + layout
Deletes every existing node on the campaign, inserts the new ones, saves a placeholder layout.
The customizable prompt
Theflow-generator template controls how the LLM is instructed. Defaults:
- Role: workflow architect for outbound marketing
- Injects node catalog + customer fields
- Injects the current workflow
- Demands JSON output matching the schema
flow-generator) to steer style (e.g. prefer short flows or email-heavy designs).
How to write a good prompt
State the goal
“3-step cold outreach for fintech leads, target 5% reply rate.”
List steps explicitly
Number each step, one per line. Don’t make the AI guess the order.
Specify branches
“If reply → handoff. If clicked but no reply → wait 5 days then follow up. If no opens after 7 days → cooldown.”
Reference variables
“Personalize subject by industry. Body cites the product use case for
{{customer.country}}.”Example prompts
Limits & gotchas
AI Generate uses the chat slot under Settings → AI Models. You need an active Chat slot. Token cost goes against your provider key.
Review after generate
The output is a starting skeleton, not the final shape. Always review:- Subject/body per messaging node — AI writes generic copy, adjust the brand voice.
- Replace inline body with template references for reused content.
- Pick specific credentials (AI inserts placeholders).
- Tune Wait durations for the audience’s timezone.
- Validate → fix compile errors.
- Test with 1–2 customers before activating broadly.