Skip to main content

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​

  1. Open the node menu on the Flow Editor canvas
  2. Search for "Library" under Media I/O
  3. Add the Library node to your workflow

Selecting Assets​

  1. Click the Browse Library button on the node
  2. The Library Picker modal opens, showing your assets organized by tab (Flows / Storyboards)
  3. Use the search bar to filter by filename
  4. Click items to select them
  5. Click Add Selected to confirm

Selection Limits​

The Library node enforces selection limits per media type:

Media TypeMax Selections
Images10
Videos1
Audio1

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:

HandleColorShown When
image_outBlueAt least one image is selected
video_outPurpleAt least one video is selected
audio_outGreenAt 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:

  1. Reads the stored URLs and media types from the node configuration
  2. Validates all URLs
  3. Creates artifacts for each selected item
  4. Groups artifacts by type (image, video, audio) for output routing
  5. 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-library edge 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​

  1. Selected assets persist -- The Library node saves your selection in the workflow. When you reopen the workflow, your previously selected assets are still there.
  2. Preview mode -- If library data has not loaded yet, the node shows previews from cached URLs so you can still see what was selected.
  3. Remove individual items -- Click the X button next to any selected item to remove it without opening the picker again.
  4. Add more items -- If you have not reached the selection limit, an "Add more" button appears below your current selections.