Choose a file input tool
The File Input tools allow you to fetch files from specified URLs.Key Features
INPUT_PDF_FILE: Fetch PDF files from URLs.INPUT_CSV_FILE: Fetch CSV files from URLs.INPUT_DOCX_FILE: Fetch DOCX files from URLs and return the extracted text.INPUT_JSON: Input JSON data directly.INPUT_FILE: Input generic files from URLs.INPUT_TEXT: Input plain text data directly.
Tools
INPUT_PDF_FILE
Fetch PDF files from URLs for processing. Input:value(string, required): URL of the PDF file to fetch
- File content and metadata for further processing
INPUT_CSV_FILE
Fetch CSV files from URLs and parse them into rows. Input:
Output:
result: the parsed rows as an array of string arrays (one inner array per row, including the header row). Whenvalueis an array of two or more URLs,resultis an array of such row arrays, one per file (a one-element array collapses to a single row array).
"" inside a quoted field decodes to a literal ". A leading BOM is stripped, blank lines are skipped, and rows with a different number of fields are kept as-is rather than rejected. A quoted field that is never closed fails the step with a ValidationError that names the record where the problem starts, instead of silently dropping the rest of the file.
Use this tool when later steps need CSV rows or cells. If characters come out garbled, set encoding (for example shift_jis). See Summarize a CSV file for a transformation example.
INPUT_DOCX_FILE
Fetch DOCX (Word) files from URLs and return the extracted text. Input:
Output:
result: Text extracted from the DOCX file(s)
INPUT_JSON
Input JSON data directly as a string. Input:value(string, required): JSON string to parse
- Parsed JSON data ready for processing
INPUT_FILE
Input generic files from URLs. Input:
Output:
result: the fetched file URL as a string (an array of URLs whenvaluewas an array). Pass it to a downstream step that takes a file URL; the file body is not read into the output.filenames/extensions: the filename(s) and extension(s) extracted from the URL(s), in the same shape asresult.
INPUT_TEXT
Input plain text data directly. Input:value(string, required): Plain text content
- Text content for processing
Examples
Example: Fetch Files from URLs
Example: Summarize a CSV file
Load a sales CSV, total theamount column per region in Python, then ask a model for a report.
{{steps.sales_csv.result}} is inserted as JSON text, so json.loads returns the rows as a list with the header first; cells are strings, so convert numbers yourself. The printed JSON becomes steps.summarize_sales.result.data (for example result.data.total_sales), and the report text is in steps.sales_report.result.content. Rename amount and region to match your file’s header row.
Example: JSON Data Processing
Download limits
The file input tools (INPUT_FILE, INPUT_PDF_FILE, INPUT_CSV_FILE, INPUT_DOCX_FILE, INPUT_IMAGE_FILE, INPUT_FILE_AS_TEXT) apply these limits to every URL they fetch:
A step that exceeds a limit fails without downloading the rest of the file, and when one file of a list fails, the downloads still in progress are stopped.
INPUT_CSV_FILE and INPUT_IMAGE_FILE also fail when the URL answers with an HTTP error status, instead of reading the error page as data.
Related Input Tools
The following input tools are documented on other pages:INPUT_WEBHOOK,INPUT_SLACK_EVENT,INPUT_IMAGE_FILE,INPUT_FILE_AS_TEXT,INPUT_TWILIO_SMS: see Choose an input toolINPUT_JSON_WITH_VALIDATION: see Input JSON with Validation