Delete Artifact
Deletes an artifact from the 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 where the artifact is stored.
- Artifact Filename - (string) Name of the artifact to delete. Use "user:" prefix for user-scoped artifacts (e.g., "user:profile.jpg").
Outputs
This node does not have outputs.
How It Works
The Delete Artifact node removes files from the session's artifact service:
- Input Validation - Verifies that Session ID and Filename are provided
- Service Connection - Connects to the session's artifact service
- Deletion - Removes the specified artifact from storage
- Completion - Returns successfully after deletion
Common Use Cases
- Cleanup Operations - Remove temporary or obsolete files
- Storage Management - Free up storage space by deleting unused artifacts
- Privacy Compliance - Delete user data when no longer needed
- Workflow Completion - Clean up intermediate files after processing
- Error Recovery - Remove corrupted or invalid artifacts
- Version Management - Delete old versions of artifacts
Error Handling
The node will return errors in the following cases:
- Missing required fields - "Session ID and Filename are required"
- Artifact not found - Attempting to delete a non-existent artifact
- Artifact service error - Storage service is unavailable or has issues
- Permission errors - Insufficient permissions to delete the artifact
- Deletion failure - The artifact service fails to delete the file
Usage Notes
- Permanent Deletion - Deleted artifacts cannot be recovered. Ensure you have the correct filename before deletion.
- All Versions Deleted - Deleting an artifact removes all versions of that file, not just the latest.
- User-Scoped Artifacts - To delete user-scoped artifacts, include the "user:" prefix in the filename.
- Session-Scoped Artifacts - Regular filenames (without "user:" prefix) delete session-specific artifacts.
- Non-Existent Files - Attempting to delete a non-existent artifact will result in an error unless Continue On Error is enabled.
- No Undo - There is no built-in undo mechanism. Consider backing up important artifacts before deletion.
- Cascading Effects - Ensure no other parts of your workflow depend on the artifact before deleting it.