AptlyStar

File

Read, fetch, write, append, compress, decompress, and manage sharing for files

The File Parser tool provides a powerful way to extract and process content from various file formats, making it easy to incorporate document data into your agent workflows. This tool supports multiple file formats and can handle files up to 200MB in size.

With the File Parser, you can:

  • Process multiple file formats: Extract text from PDFs, CSVs, Word documents (DOCX), text files, and more
  • Handle large files: Process documents up to 200MB in size
  • Parse files from URLs: Directly extract content from files hosted online by providing their URLs
  • Process multiple files at once: Upload and parse several files in a single operation
  • Extract structured data: Maintain formatting and structure from the original documents when possible

The File Parser tool is particularly useful for scenarios where your agents need to work with document content, such as analyzing reports, extracting data from spreadsheets, or processing text from various document sources. It simplifies the process of making document content available to your agents, allowing them to work with information stored in files just as easily as with direct text input.

Usage Instructions

Read workspace files by picker or canonical ID, fetch and parse files from URLs with optional headers, write new workspace files, append content to existing files, compress files into a .zip archive, extract a .zip archive into the workspace, or manage the public share link for a file.

Tools

file_fetch

Fetch and parse a file from a URL with optional custom headers.

Input

ParameterTypeRequiredDescription
headersobjectNoHTTP headers to include when fetching URL-based files.

Output

ParameterTypeDescription
filesfile[]Fetched files as UserFile objects
combinedContentstringCombined content of all fetched files

file_read

Input

ParameterTypeRequiredDescription
fileIdstringNoCanonical workspace file ID, or an array of canonical workspace file IDs.
fileInputfileNoSelected workspace file object.

Output

ParameterTypeDescription
filefileWorkspace file object
filesfile[]Workspace file objects

file_write

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

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

file_compress

Compress one or more workspace files into a single .zip archive stored in the workspace, for bundling files to download, transfer, or store.

Input

ParameterTypeRequiredDescription
fileIdstringNoCanonical workspace file ID, or an array of canonical workspace file IDs.
fileInputfileNoSelected workspace file object, or an array of file objects.
archiveNamestringNoName for the .zip archive (e.g., "documents.zip"). Defaults to the source file name when compressing a single file, otherwise "archive.zip".

Output

ParameterTypeDescription
idstringCompressed archive file ID
namestringCompressed archive file name
sizenumberCompressed archive size in bytes
urlstringURL to access the compressed archive
filesfile[]Compressed archive file object, as a single-item array

file_decompress

Extract the contents of a .zip archive into the workspace, preserving the archive folder structure.

Input

ParameterTypeRequiredDescription
fileIdstringNoCanonical workspace file ID of the .zip archive to extract.
fileInputfileNoSelected .zip archive file object.

Output

ParameterTypeDescription
filesfile[]Extracted workspace file objects

file_manage_sharing

Enable or disable the public share link for a workspace file, and set its access mode.

Input

ParameterTypeRequiredDescription
fileIdstringNoCanonical ID of the workspace file to update sharing for.
fileInputfileNoSelected workspace file object from the file picker.
isActivebooleanYesWhether the public link is enabled. Set false to make the file private.
authTypestringNoAccess mode for the link: public, password, email, or sso.
passwordstringNoPassword to protect the link. Required when authType is password.
allowedEmailsarrayNoAllowed emails or @domain patterns for email or SSO access.

Output

ParameterTypeDescription
urlstringPublic share URL for the file
isActivebooleanWhether the public link is enabled
authTypestringAccess mode: public, password, email, or sso
hasPasswordbooleanWhether the share is password-protected
allowedEmailsarrayAllowed emails/domains for email or SSO access

On this page