preflight document
This block is part of the anthropic group and was last modified in core v15.0.0.
preflight document v15.0.0 Convert a document (PDF, image, HTML, spreadsheet, text) to clean Markdown with a cheap model, stripping boilerplate; run before sending it to an expensive model to cut tokens.
- flow
flow - connection required
anthropicconnection - file required
fileThe document to convert. Text and spreadsheets convert for free; PDFs/images/HTML use a cheap model.
- model
valueModel for the conversion. Defaults to claude-haiku-4-5 (cheap). • Suggestions:
claude-haiku-4-5claude-sonnet-4-6 - max tokens
numberMax Markdown tokens to generate. Defaults to 16000.
- flow
flow - connection
anthropicconnection - success
condition - markdown
valueThe cleaned Markdown; feed this to a message block instead of the raw file.
- file
fileThe cleaned Markdown as a .md file; wire straight into a message block's attachments pin.
- format
valueDetected document kind: text | spreadsheet | pdf | image | html | unsupported.
- cost
numberUSD cost of the conversion (0 for text/spreadsheet).
- usage
object - partial
value - warnings
array<value>Non-fatal notices: unsupported_format (the file type can't be converted), cost_unknown.
- errors
array<value>Error codes when the call fails (success=false): config_error, internal_error, model_not_allowed, budget_exceeded, concurrency_limit_exceeded, rate_limited, refused, max_tokens, transport_error.
- error detail
value
document to markdown |
extract text |
clean document |
ocr |
pdf to markdown |
strip boilerplate |
A typical wiring for preflight document: a function trigger starts the flow; get file from assets feeds the file pin; the flow out pin feeds debug.

Version history
Introduced in v15.0.0.
Back to
anthropic Return to the main group to view all sub-groups Back to anthropic Return to the group to view all blocks within this group
