File & Folder Operations
Manage files and folders in your cloud storage. Upload, download, move, copy, archive and more.
Read & Get Files
Retrieves a file by its ID from Serenities Drive. Choose output format based on how you need to use the file downstream.
Output Format Options:
- Binary: Binary data reference for file operations
- Base64: Base64-encoded string for APIs/embedding
Output:
{
"fileId": "abc123",
"fileName": "report.pdf",
"mimeType": "application/pdf",
"fileSize": 1024000,
"__type": "binary" // or "base64"
}Reads and extracts text content from various file formats including PDF, DOCX, XLSX, CSV, JSON, TXT, and more. Supports multiple input sources.
Input Sources:
- File ID: Read from Serenities Drive by file ID
- Base64: Read from base64-encoded string
- Binary: Read from binary data reference
Supported Formats:
Output:
{
"content": "Extracted text content...",
"fileName": "document.pdf",
"mimeType": "application/pdf",
"format": "pdf",
"metadata": { "pages": 5 }
}Returns file metadata (name, size, type, dates) without downloading the actual file content. Useful for checking files before processing.
Output:
{
"id": "abc123",
"name": "video.mp4",
"mimeType": "video/mp4",
"size": 52428800,
"createdAt": "2025-01-15T10:30:00Z",
"updatedAt": "2025-01-15T10:30:00Z",
"folderId": "folder123"
}Returns a list of all files in a folder. Use with Iterator to process each file individually.
Common Pattern: Process All Files
Create & Upload
Creates a new file with the specified content. Perfect for generating reports, exports, or processed data outputs.
Tip: Use {{nowDate}} or {{nowDateTime}} in file names to create unique, timestamped files.
Uploads binary data (from HTTP response, another file, etc.) as a new file. Preserves file type and encoding.
Example: Download and Upload
Download image from URL, then upload to your storage
Converts files between different formats (e.g., image formats, document formats). Supports common conversions.
Supported Conversions:
Move & Copy
Creates a copy of a file in the same or different folder. Optionally rename the copy.
Moves a file to a different folder. The original file is removed from its current location.
Renames a file without changing its location.
Permanently removes a file. This action cannot be undone.
Archive & Extract
Server-Only: Archive and Unarchive utilities run on the server and may not be available in all execution contexts due to their dependencies on server-side libraries.
Creates a ZIP archive containing multiple files. Perfect for bundling exports or creating backups.
Example: Archive all PDFs in folder
Extracts all files from a ZIP archive. Files are placed in the specified output folder.
Folder Operations
Creates a new folder at the specified location. Can create nested paths (e.g., "reports/2025/january").
Returns a list of all subfolders in a folder. Use with Iterator to process folders recursively.
Copy Folder
Copy folder and all contents
Move Folder
Move folder to new location
Delete Folder
Delete folder and contents
Common Patterns
Batch Process Files
List all files, iterate through each, process, then move to a "processed" folder.
Generate & Export Report
Query database, format as CSV/JSON, save to timestamped file.