Using Library in Workflows
The Content Library integrates with the Flow Editor through the Library node and through automatic saving of workflow outputs.
The Library Node
The Library node is a Media I/O node that lets you select assets from your Content Library and feed them into a workflow as inputs.
Adding a Library Node
- Open the node menu on the Flow Editor canvas
- Search for "Library" under Media I/O
- Add the Library node to your workflow
Selecting Assets
- Click the Browse Library button on the node
- The Library Picker modal opens, showing your assets organized by tab (Flows / Storyboards)
- Use the search bar to filter by filename
- Click items to select them
- Click Add Selected to confirm
Selection Limits
The Library node enforces selection limits per media type:
| Media Type | Max Selections |
|---|---|
| Images | 10 |
| Videos | 1 |
| Audio | 1 |
When in "all" mode, these limits apply per type. The node displays a counter showing how many items are selected out of the maximum.
Output Handles
The Library node dynamically shows output handles based on what you have selected:
| Handle | Color | Shown When |
|---|---|---|
| image_out | Blue | At least one image is selected |
| video_out | Purple | At least one video is selected |
| audio_out | Green | At least one audio file is selected |
Handles that have no matching selected assets are dimmed. Connect the appropriate handle to downstream nodes.
How It Works at Execution Time
When the workflow runs, the Library handler:
- Reads the stored URLs and media types from the node configuration
- Validates all URLs
- Creates artifacts for each selected item
- Groups artifacts by type (image, video, audio) for output routing
- Passes artifacts to connected downstream nodes
If no files are selected, the node throws an error and the workflow stops.
Auto-Save to Library
When Auto-Save is enabled in the Flow Editor, workflow outputs are automatically saved to the Content Library after each node completes.
How Auto-Save Works
- Each generated image, video, or audio artifact is saved via the
save-to-libraryedge function - Files are uploaded to permanent storage (BunnyCDN) and a database record is created
- Assets are organized under the Flow context using the workflow name as the folder
- Duplicate URLs within the same run are automatically skipped
- The auto-save counter increments with each saved item
Folder Structure
Auto-saved assets are organized as:
Flow
└── /workflow-name
└── image_1710000000000
└── video_1710000001000
└── ...
The workflow name is slugified (lowercased, special characters removed) for the folder path. Each file gets a unique name based on its type and timestamp.
Auto-Save Does Not Block Execution
Auto-save runs in the background. If it fails (network error, storage issue), the workflow continues without interruption. Failures are logged to the console but do not affect the workflow result.
Common Workflow Patterns
Using a Reference Image
Feed a saved image into an image-to-video or style transfer node:
Library (reference image) --> Image to Video --> Preview
Extending a Previous Video
Pick a previously generated video and extend it:
Library (video) --> Video Extend --> Preview
Analyzing Saved Content
Use the Brain node to analyze library assets:
Library (image) --> Brain (describe/analyze) --> Text Preview
Multiple Inputs
Use multiple Library nodes for workflows that need several inputs:
Library (background) --\
--> Combine/Process --> Output
Library (subject) --/
Tips
- Selected assets persist -- The Library node saves your selection in the workflow. When you reopen the workflow, your previously selected assets are still there.
- Preview mode -- If library data has not loaded yet, the node shows previews from cached URLs so you can still see what was selected.
- Remove individual items -- Click the X button next to any selected item to remove it without opening the picker again.
- Add more items -- If you have not reached the selection limit, an "Add more" button appears below your current selections.