Workflows
A workflow is a chain of helpers that run in sequence, each one passing its output to the next. You give the workflow a single input, and it handles everything from there.
When would I use a workflow?
Use a workflow when a task has distinct stages that naturally follow each other — and where the output of one stage is exactly what the next stage needs as its input.
For example:
- Research → Summary → Email draft — first helper extracts key points from a document, second writes a summary, third drafts an email based on the summary
- Raw notes → Structured brief → Proposal — first helper structures messy notes, second turns them into a clear brief, third drafts a proposal from the brief
- Transcript → Action items → Follow-up — first helper pulls action items from a meeting transcript, second assigns owners and priorities, third writes the follow-up email
If your task only has one stage, or if the stages don't feed naturally into each other, you're better off using individual helpers.
How to create a workflow
- Click New workflow in the sidebar
- Give the workflow a name
- Add steps in order — each step is a helper from your helpers folder
- Save
That's it. Workflows are saved as .yml files in your helpers folder, alongside your helper files.
How to use a workflow
Select the workflow from the sidebar. You'll see a list of the steps it contains and an input area.
Paste your starting input (or pick a file) and click Use workflow. Margaret runs each helper in sequence — you can watch the progress step by step. Each step's output is shown as it completes, and collapses neatly when the next step begins.
When the workflow finishes, each step's output is saved to your helpers folder as a separate file.
What gets passed between steps?
The full text output of each step is passed as the input to the next step. Margaret doesn't summarise or trim it — whatever the previous helper produced is exactly what the next one receives.
This means your helpers need to be written with the chain in mind. If step 2 expects a structured brief, step 1's Output Format should produce something that looks like a structured brief.
Missing helpers
If a workflow references a helper that no longer exists (because it was renamed or deleted), Margaret will show a warning and won't let you run it until the issue is fixed. You can either recreate the missing helper with the same name, or edit the workflow file to update the reference.
Limitations
- Workflows run sequentially — one step at a time, in order. There's no branching or parallel execution.
- Each step uses its own default model. You can change a step's model by editing the helper it uses.
- There's no way to insert a manual step mid-workflow — it runs start to finish automatically.
For tasks that need human review between steps, run the helpers individually instead.