You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/content/docs/en/execution/files.mdx
+25-23Lines changed: 25 additions & 23 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,37 +25,39 @@ You can access any of these properties when referencing files from previous bloc
25
25
26
26
## The File Block
27
27
28
-
The **File block** is the universal entry point for files in your workflows. It accepts files from any source and outputs standardized file objects that work with all integrations.
28
+
The **File block** is the universal entry point for files in your workflows. It has several operations:
29
29
30
-
**Inputs:**
31
-
-**Uploaded files** - Drag and drop or select files directly
32
-
-**External URLs** - Any publicly accessible file URL
33
-
-**Files from other blocks** - Pass files from Gmail attachments, Slack downloads, etc.
30
+
| Operation | What it does | Key output |
31
+
| --- | --- | --- |
32
+
|**Read**| Returns workspace file objects you select or reference. Does **not** load file text. |`files` (`UserFile[]`) |
33
+
|**Get Content**| Extracts the text of one or more files (PDF, DOCX, CSV, etc. are parsed automatically). |`contents` (`string[]`, one entry per file) |
34
+
|**Fetch**| Downloads and parses a file from an external URL, with optional request headers. |`files`, `combinedContent`|
35
+
|**Write**| Creates a new workspace file. |`id`, `name`, `size`, `url`|
36
+
|**Append**| Appends content to an existing workspace file. |`id`, `name`, `size`, `url`|
34
37
35
-
**Outputs:**
36
-
- A list of `UserFile` objects with consistent structure (`name`, `url`, `base64`, `type`, `size`)
37
-
-`combinedContent` - Extracted text content from all files (for documents)
38
+
`UserFile` objects share a consistent structure (`name`, `url`, `base64`, `type`, `size`), so they work with every integration.
38
39
39
-
**Example usage:**
40
+
### Reading file text: chain Read → Get Content
40
41
41
-
```
42
-
// Get all files from the File block
43
-
<file.files>
42
+
**Read intentionally returns only file objects, not their text.** To read the text of files, pass the file objects into a **Get Content** operation:
// Get combined text content from parsed documents
49
-
<file.combinedContent>
48
+
// Block 2 — File (Get Content): set its file input to <file1.files>
49
+
// → returns an array of extracted text, one entry per file
50
+
<file2.contents> // all file contents
51
+
<file2.contents[0]> // text of the first file
50
52
```
51
53
52
-
The File block automatically:
53
-
- Detects file types from URLs and extensions
54
-
- Extracts text from PDFs, CSVs, and documents
55
-
- Generates base64 encoding for binary files
56
-
- Creates presigned URLs for secure access
54
+
The same pattern works for files produced anywhere — feed `<gmail.attachments>`, `<agent.files>`, or `<start.files>` straight into **Get Content**. You never need to extract `base64` or `url` yourself to get text.
55
+
56
+
<Callouttype="info">
57
+
Extracted `contents` can be large. The File block stores it through the execution large-value system automatically, so big documents don't bloat your run payloads.
58
+
</Callout>
57
59
58
-
Use the File block when you need to normalize files from different sources before passing them to other blocks like Vision, STT, or email integrations.
60
+
Use the File block when you need to normalize files from different sources, read their text, or hand standardized file objects to other blocks like Vision, STT, or email integrations.
59
61
60
62
## Passing Files Between Blocks
61
63
@@ -138,7 +140,7 @@ Use `url` for direct downloads or `base64` for inline processing.
138
140
## Blocks That Work with Files
139
141
140
142
**File inputs:**
141
-
-**File** - Parse documents, images, and text files
143
+
-**File** - Read file objects, extract text with Get Content, fetch URLs, write, and append
0 commit comments