File

Usage Instructions

Read workspace file objects, extract the text content of files, fetch and parse files from URLs with optional headers, write new workspace files, or append content to existing files.

Actions

file_read

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
filesfile[]Workspace file objects (read) or fetched file objects (fetch)
contentsarrayArray of file text contents, one entry per file (get content)
combinedContentstringAll fetched file contents merged into a single text string (fetch)
idstringFile ID (write and append)
namestringFile name (write and append)
sizenumberFile size in bytes (write and append)
urlstringURL to access the file (write and append)

file_get_content

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
filesfile[]Workspace file objects (read) or fetched file objects (fetch)
contentsarrayArray of file text contents, one entry per file (get content)
combinedContentstringAll fetched file contents merged into a single text string (fetch)
idstringFile ID (write and append)
namestringFile name (write and append)
sizenumberFile size in bytes (write and append)
urlstringURL to access the file (write and append)

file_fetch

Input

ParameterTypeRequiredDescription

Output

ParameterTypeDescription
filesfile[]Workspace file objects (read) or fetched file objects (fetch)
contentsarrayArray of file text contents, one entry per file (get content)
combinedContentstringAll fetched file contents merged into a single text string (fetch)
idstringFile ID (write and append)
namestringFile name (write and append)
sizenumberFile size in bytes (write and append)
urlstringURL to access the file (write and append)

file_write

Create a new workspace file. If a file with the same name already exists, a numeric suffix is added (e.g.,

Input

ParameterTypeRequiredDescription
fileNamestringYesFile name (e.g., "data.csv"). If a file with this name exists, a numeric suffix is added automatically.
contentstringYesThe text content to write to the file.
contentTypestringNoMIME type for new files (e.g., "text/plain"). Auto-detected from file extension if omitted.

Output

ParameterTypeDescription
idstringFile ID
namestringFile name
sizenumberFile size in bytes
urlstringURL to access the file

file_append

Append content to an existing workspace file. The file must already exist. Content is added to the end of the file.

Input

ParameterTypeRequiredDescription
fileNamestringYesName of an existing workspace file to append to.
contentstringYesThe text content to append to the file.

Output

ParameterTypeDescription
idstringFile ID
namestringFile name
sizenumberFile size in bytes
urlstringURL to access the file

On this page