Skip to main content

List Artifacts

Retrieves a list of all artifacts stored in a session's artifact storage.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.

Inputs

  • Session ID - (string) Unique identifier for the session whose artifacts will be listed.

Outputs

  • Artifacts - (array) List of artifacts stored in the session. Each artifact object contains metadata about the stored file.

How It Works

The List Artifacts node queries the session's artifact service:

  1. Session Validation - Verifies that the Session ID is provided
  2. Service Query - Queries the session's artifact service for all stored artifacts
  3. Result Processing - Retrieves the list of artifacts with their metadata
  4. Output - Returns an array of artifact objects, or an empty array if no artifacts exist

Common Use Cases

  • Artifact Discovery - Find out what files are available in a session
  • File Management - List artifacts before loading or deleting
  • Inventory Checking - Verify which files have been saved
  • Workflow Debugging - Inspect available artifacts for troubleshooting
  • User File Browser - Display available files to users
  • Cleanup Operations - Identify artifacts for deletion or archival

Error Handling

The node will return errors in the following cases:

  • Missing Session ID - "Session ID is required"
  • Session not found - Session does not exist
  • Artifact service error - Storage service is unavailable or has issues
  • Permission errors - Insufficient permissions to access the session

Usage Notes

  • Empty Results - If no artifacts exist in the session, an empty array is returned (not an error)
  • Metadata Only - This node returns artifact metadata, not the actual file contents. Use Load Artifact to retrieve files.
  • Session Scope - Only artifacts in the specified session are listed
  • User-Scoped Artifacts - Both session-scoped and user-scoped artifacts are included in the list
  • Version Information - The artifact list may include version information for each artifact
  • Performance - Listing is typically fast, even with many artifacts

Artifact Metadata

The returned array typically contains objects with information such as:

  • Filename - The name of the artifact
  • MIME Type - The content type of the file
  • Size - File size in bytes
  • Version - Current version number
  • Created Date - When the artifact was first created
  • Modified Date - When the artifact was last updated

Example Output

[
{
"filename": "report.pdf",
"mime_type": "application/pdf",
"version": 3,
"size": 245678
},
{
"filename": "user:profile.jpg",
"mime_type": "image/jpeg",
"version": 1,
"size": 152340
},
{
"filename": "data.json",
"mime_type": "application/json",
"version": 2,
"size": 8492
}
]

Integration Examples

Conditional Loading: Use List Artifacts to check if a specific file exists before attempting to load it.

Batch Processing: Iterate through the artifact list to process all files in a session.

File Selection: Present the list to users to select which artifact to load or process.

Cleanup Workflows: Identify and delete old or unused artifacts based on the list.