File Block
Read, fetch, write, and append files
One block with five operations for working with files in your workflows. Read and Get Content take an existing file (by URL or upload) and hand the next block the file object or its extracted text; Fetch downloads and parses a file from an external URL; Write creates a new workspace file from text content; Append adds text to the end of an existing workspace file. PDFs, CSVs, Word/Excel, CAD (DWG/DXF/STEP), and images are parsed automatically.
Overview
| Property | Value |
|---|---|
| Type | file |
| Category | tools |
| Color | #40916C |
When to Use
- Extract text from uploaded PDFs, CSVs, Word/Excel documents, or images for downstream AI processing
- Download and parse a file from a public or pre-signed URL without manual uploading
- Save AI-generated text as a named workspace file that other workflows can access
- Accumulate results across workflow runs by appending to a shared workspace file
- Pass the raw file object (
files) or merged text (combinedContent) to subsequent blocks - Parse CAD files (DWG, DXF, STEP, IGES) as part of engineering automation workflows
Configuration
Operation
Selects what the block does. All other fields are conditional on this value.
| Option | id | Description |
|---|---|---|
| Read | read | Accept a file (URL or upload) and return the file object plus extracted text |
| Get Content | get_content | Accept a file (URL or upload) and return only the extracted text |
| Fetch | fetch | Download and parse a file directly from an external URL |
| Write | write | Create a new workspace file from text content |
| Append | append | Add text to the end of an existing workspace file (creates the file if it does not exist) |
Default: read
Select Input Method
Visible for operations: Read, Get Content, Fetch.
Chooses how the file is supplied.
| Option | id | Description |
|---|---|---|
| File URL | url | Provide a URL to a remote file |
| Upload Files | upload | Upload one or more files directly in the block |
File URL (filePath)
Visible when Select Input Method is url and operation is Read, Get Content, or Fetch.
- Type: short-input
- Placeholder:
Enter URL to a file (https://example.com/document.pdf) - Accepts any publicly accessible URL or pre-signed URL pointing to a supported file type.
Upload Files (file)
Visible when Select Input Method is upload and operation is Read, Get Content, or Fetch.
- Type: file-upload
- Supports multiple files (up to 100 MB per upload)
- Accepted extensions:
.pdf,.csv,.docx,.dwg,.dxf,.step,.stp,.iges,.igs,.png,.jpg,.jpeg,.gif,.bmp,.tiff,.svg,.xlsx,.xls,.txt,.md
File Name (fileName)
Visible for operations: Write, Append.
- Type: short-input
- Placeholder:
summary.md - Required. The name (including extension) of the workspace file to create or append to. The extension determines the auto-detected content type.
Content (content)
Visible for operations: Write, Append.
- Type: long-input
- Placeholder:
Text content to save (reference another block with {{block.content}}) - The text body to write into the file. Use
{{blockName.field}}to reference output from another block.
Content Type (contentType)
Visible for operation: Write only. Advanced mode.
- Type: short-input
- Placeholder:
text/markdown (auto-detected from extension if omitted) - Optional MIME type override. If omitted the server infers the type from the file name extension.
Inputs & Outputs
Inputs
operation(string) — Operation to execute:read,get_content,fetch,write, orappendinputMethod(string) — Input method selection:urloruploadfilePath(string) — File URL path (used when inputMethod isurl)fileType(string) — File type hint (auto-detected if omitted)file(json) — Uploaded file data (one object or array of objects with apathproperty)fileName(string) — Name of the file to write or append tocontent(string) — Content to write or appendcontentType(string) — MIME type for written files (Write operation only)
Outputs
files(json) — Array of parsed file objects, each containingcontent,fileType,size,name,binary, and optionalmetadata(Read / Get Content / Fetch)combinedContent(string) — All file contents merged into a single text string separated by dividers (Read / Get Content / Fetch)id(string) — Workspace file ID assigned after creation (Write / Append)name(string) — Final saved file name, possibly de-duplicated (Write / Append)size(number) — File size in bytes (Write / Append)url(string) — URL to access the saved workspace file (Write / Append)
Tools
- File Parser (
file_parser) — Parses one or more files supplied as a URL or uploaded path. CallsPOST /api/files/parse, returnsfiles(array of parsed results) andcombinedContent(merged text). Used for the Read, Get Content, and Fetch operations. - File Write (
file_write) — Creates a new workspace file from text content. CallsPOST /api/files/write, returns the new file'sid,name,size,type, andurl. Used for the Write operation. - File Append (
file_append) — Appends text to the end of an existing workspace file (creates it if absent). CallsPOST /api/files/append, returns the updated file'sid,name,size,type, andurl. Used for the Append operation.
YAML Example
# Example 1 — Read a PDF from a URL and pass its text to the next block
file_1:
type: file
name: "File"
inputs:
operation: "read"
inputMethod: "url"
filePath: "https://example.com/report.pdf"
connections:
outgoing:
- target: agent_1
# Example 2 — Write AI-generated text as a workspace file
file_2:
type: file
name: "File"
inputs:
operation: "write"
fileName: "summary.md"
content: "{{agent_1.combinedContent}}"
connections:
outgoing:
- target: response_1
# Example 3 — Append a log entry to an existing workspace file
file_3:
type: file
name: "File"
inputs:
operation: "append"
fileName: "run-log.txt"
content: "{{agent_1.combinedContent}}"
connections:
outgoing:
- target: response_1