Advanced Workflow Patterns
Combine Steps into patterns that branch on a score, let Members pick from AI suggestions, reuse one agent and pass work between tools.
Combine Steps Into Patterns
Each Step does one job. The tools that feel made for each Member come from how you combine them: a score that sends a beginner and an expert down different paths, a list of ideas your Member picks from, one agent you improve in one place and use in five workflows. This page shows six patterns that work well, with invented examples. Each Step has its own page with every setting, linked from the pattern that uses it.
You build these patterns in the workflow editor. Spark doesn't add Condition, Compute, Save to Profile Steps or Dynamic Choice fields, and a later Spark change replaces every Step. Finish asking Spark for changes before you start. See What a Spark Change Replaces.
Branch on a Score
Give each Member the path that fits where they are. A Compute Step turns answers into a number, and a Condition Step sends the run one way or the other.
For example, a Launch Readiness workflow:
Ask for numbers
In a Human Input Step, ask with Slider or Number fields, such as Clarity, Confidence and Audience Size, each from 1 to 10. A typed answer like "pretty good" can't be used in math. See Input Field Types.
Work out the score
Add a Compute Step named Readiness Score with the formula round(({{clarity}} + {{confidence}} + {{audience_size}}) / 3, 1). See Compute Step.
Branch on it
Add a Condition Step with the expression {{readiness_score}} >= 7. Connect True to the Launch Plan Agent step and False to the Foundations Plan Agent step. See Condition Step.
Join the paths again
Connect both Agent steps to the same next Step, such as an Info Step with the next steps. A Step with a connection from each branch runs whichever branch the run takes.
Test every path
Click Preview and run the workflow once with high ratings and once with low ones.
Pass the score to the AI too. An Agent step connected straight after the Compute Step receives the number automatically, and you can insert {{readiness_score}} in any later Step's instructions.
Variables from the branch the run didn't take have no value. If the Next Steps Info Step inserts {{launch_plan}}, it has no value for Members on the False path. In Steps after the paths join, use only variables from Steps every run passes through.
Route by a Choice
When the path depends on what your Member picked, branch on their answer instead of a score. A Select or Checkbox answer gives you exact values to check.
For example, a Content Planner asks "Where will you post this?" with the options LinkedIn and Newsletter:
| Expression | Sends the run down True when |
|---|---|
equalText({{channel}}, "LinkedIn") | Your Member chose LinkedIn. |
equalText({{wants_a_call}}, "Yes") | Your Member checked a Checkbox field. |
Compare text with equalText. A comparison such as {{channel}} == "LinkedIn" works only on numbers, so with a text answer the Condition Step fails. See Write the Expression.
For three or more paths, chain Condition Steps: the first checks for LinkedIn, and its False branch leads to a second Condition Step that checks for Newsletter.
Let the AI Suggest and Your Member Pick
Have an Agent step come up with options, then let your Member choose the one they want before the next Step builds on it. Your Member stays in charge of the direction, and no one retypes anything.
For example, a Newsletter Writer:
Ask for a list in a set format
End the Suggest Angles Agent step's instructions with "List five angles as a bulleted list under a heading called Angles."
Offer the list as choices
In the next Human Input Step, add a Dynamic Choice field. Set Options Source to Step Output, Step to Suggest Angles, Section Heading to "Angles" and Options Are to List Items. See Dynamic Choice Fields.
Build on the choice
In the Write Draft Agent step's instructions, click Insert Variable and insert the Dynamic Choice answer under Input Fields.
Turn on Allow Editing to let your Member adjust the angle they picked, or Allow Writing Their Own to let them type a different one.
To let your Member see and change the result itself before the workflow goes on, turn on Pause for Human Review on the Agent step instead. Later Steps get the result your Member approved, with their edits. See Human Review.
Reuse One Agent Across Workflows
When several workflows need the same job done, such as writing in your voice or scoring a sales page, build it once as an agent and run it from each workflow with an Agent step in Saved Agent mode. Improve the agent, and every workflow that uses it gets the change.
Build and test the agent
Create the agent, write its instructions and attach its knowledge. Test it on its own. See Creating and Configuring an Agent.
Run it from each workflow
In each workflow, add an Agent step, click Saved Agent under Mode and choose the agent under Target Agent. Under Additional Knowledge Sources, add anything only this workflow needs. See Use a Saved Agent.
Choose how each workflow follows changes
Leave Always Use Latest Version on to use the agent as it is each time. Turn it off in a live workflow to freeze it while you try changes to the agent, then click Update to Latest when you're happy. See Always Use Latest Version.
Write a shared agent to work from what it's given. In a workflow, its answers come from the workflow's Steps, not the agent's own input fields. See What the Step Uses from the Agent.
Pass Work From One Tool to the Next
Assets let one tool pick up where another left off. The first tool saves its result as an Asset with a name you can search for, and the second offers your Member only those Assets.
For example, a Client Plan workflow and a Session Prep workflow:
Name the Asset in the first tool
In the Client Plan workflow, turn on Save as Asset on the Agent step that writes the plan. In Asset Name, type "Client Plan - " and insert the client's name. See Save as Asset and Asset Name.
Offer those Assets in the second tool
In the Session Prep workflow, add a Dynamic Choice field with Options Source set to Assets and "Client Plan" in Only Asset Names Containing. See Assets.
Your Member picks the plan for the client they're meeting, and the Steps after it receive the whole plan.
Remember Answers for Next Time
Save what your Member tells you once so every tool knows it after that. A Save to Profile Step writes an answer or a result into a User Knowledge field, and any tool can use that field.
For example, an Onboarding workflow asks for your Member's ideal client, then a Save to Profile Step saves the answer to an Ideal Client field. Later, a Sales Page Writer agent attaches that field and writes for that client without asking again.
Create the field
Add a User Knowledge field for the value. See User Knowledge Fields.
Save to it
Add a Save to Profile Step right after the Step with the answer, and choose the field under Target Field. Use Prompt Member to Confirm to let your Member check the value first. See Save to Profile Step.
Use it in other tools
In another tool's Agent step or agent, attach the field under User Knowledge Fields in Manage Knowledge Sources. See Attach Knowledge.
Test Patterns Before You Publish
- Run every path. Click Preview once for each branch, with answers you chose to take it.
- Check the numbers by hand. Work out a score yourself, then check that the run gives the same one.
- Watch what reaches the AI. If an Agent step's result talks about a variable's name in curly brackets, that variable had no value on this path.