Skip to main content
Choose a file input tool by the kind of URL or file your flow receives, then pass its output to the next step.

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
Output:
  • 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). When value is an array of two or more URLs, result is an array of such row arrays, one per file (a one-element array collapses to a single row array).
CSV text is parsed with RFC 4180 semantics: a quoted field may contain commas and line breaks, and "" 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
Output:
  • 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 when value was 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 as result.

INPUT_TEXT

Input plain text data directly. Input:
  • value (string, required): Plain text content
Output:
  • Text content for processing

Examples

Example: Fetch Files from URLs

Example: Summarize a CSV file

Load a sales CSV, total the amount 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. The following input tools are documented on other pages: