Chaining playbooks | WRITER Knowledge Base

Chaining playbooks

Last updated 9 days ago

Who can use this feature

All users can create and use playbooks.

What are chained or nested playbooks?

You can nest existing playbooks inside your current playbook to chain complex workflows together. This allows you to modularize your workflows, making them easier to build, test, and maintain. For example, you could have a "Research" playbook that feeds its output directly into a "Drafting" playbook.

A nested playbook (also called a child playbook) is an existing playbook that you call from within another playbook (the parent). The parent playbook orchestrates the overall workflow, and the child playbooks handle discrete, modular steps.

Example workflow:

This modular structure makes workflows easier to build, test, maintain, and reuse across different parent playbooks.

Looking to get started using playbooks? See our getting started article here.

When to chain playbooks together vs. use a single playbook

Use chained (nested) playbooks when:

Use a single playbook when:

How to call a nested playbook

Open your playbook in the editor and type / in your instructions where you want the nested playbook to run. Select the playbook you want to run as a step from the menu.

Ensure your instructions clearly state what inputs the nested playbook should use and what it should do with the output.

To pass data from a parent playbook into a child playbook, include explicit text instructions in the parent playbook that name the input and its value. For example: "Pass the value of  Customer_Name to the child playbook's 'Customer' input." There is no UI field for mapping parent inputs to child inputs as WRITER Agent is built to do this automatically. We recommend adding additional instructions in the parent playbooks to define the mapping clearly.

Passing data from a parent to a child playbook

Child playbooks can accept inputs defined in the parent, but there is currently no UI field for mapping parent inputs to child inputs directly. Use explicit text instructions in the parent step to define the mapping.

How to define the mapping:

Identify the input key in the child playbook (e.g., Customer_Name, Topic, Source_File).

In the parent step's instructions, write a clear mapping statement.

Example:

"Pass the value of Customer_Name to the child playbook as its Customer input. Pass Campaign_Brief as its Brief input."

Tips:

File handling across chained playbooks

Files uploaded or generated in one child playbook are automatically available to the parent playbook. If a playbook cannot locate a file, WRITER agent will attempt to search the workspace repeatedly, the tips below will help WRITER Agent locate files passed between your playbooks.

Example upstream instruction (Playbook 1):

"Save your final research summary as research_output.md in the workspace root."

Example downstream instruction (Playbook 2):

"Read research_output.md from the workspace. Use its contents as the basis for drafting."

Files attached at the playbook level

Files attached at the top level of a parent playbook are not always reliably accessible to individual child playbooks.

Best practice: Attach files directly to the specific playbook that needs them, using that step's Context panel. This ensures the file is available when that step executes.

Running batch jobs with chained playbooks

Playbooks support batch execution, where a CSV is used to run a child playbook once per row.

Before starting a batch run

Starting a batch run

  1. In the parent playbook step, attach your CSV as the batch input.
  2. Map CSV column headers to the child playbook's input keys in the step instructions.
  3. Select Run to start the batch.

Stopping a batch run

Best practices for chaining

Structuring complex workflows:

Design for modularity.

Use explicit file naming conventions.

Test child playbooks independently first.

Write self-contained step instructions.

Use single playbooks for file-intensive workflows.

Start batch jobs small.

FAQs

Can I use a playbook inside another playbook?

Yes! You can nest playbooks to create modular, chained workflows. Simply type / in your playbook instructions and select the playbook you want to call. This is highly recommended for breaking down complex, multi-step processes into manageable pieces.

What happens if a nested playbook fails?

If the playbook is called as part of a batch processing workflow, then the rest of the processing will continue and you’ll see batch processes missing/failed within the Sessions tab. If it's an integral part of a sequence of steps, WRITER Agent will try to complete the workflow a few times and if it cannot resolve the issue then the overall workflow will pause. You can use the individual step testing feature to isolate the nested playbook, troubleshoot the specific issue, and then resume your workflow.

How do I pass an input from the parent to the child playbook?

There is no UI field for input mapping between parent and child as WRITER Agent will automatically map the inputs between the playbooks. However, specific instructions will help the agent know what to pass where, especially when there are many similar fields or when there are inputs that are then passed on to a child. Write the mapping as explicit text instructions in the parent step — for example: "Pass Topic to the child playbook as its Subject input."

What happens if a child playbook fails?

The parent playbook pauses when a child playbook fails. Use the Sessions tab in the playbook editor to open the child run, review the error, and identify the cause. Fix the child playbook, and return to the parent playbook and start a new session.