# Any document in. Edited, split, or structured out.

> Pull digital exports and literal physical documents — scanned mailroom packets, handwritten forms, crumpled receipt photos, and faxed contracts — straight into the container's local file manager. Parse layouts, extract typed fields, edit and flatten PDFs, separate batch scans, classify, and summarize — then pass changed files or data to other flows, drives, data warehouses, data lakes, databases, or any API.

Source: https://stepwork.com/procedures/file-processing

## Saved to the local file manager. Passed straight to anything next.

Every run happens inside an isolated local or cloud container with its own real filesystem. Files downloaded from a portal, email, or scanner share land directly in the device's local file manager — then flow straight through File processing into other flows, drives, data warehouses, data lakes, databases, or APIs.

- **Export in container browser:** An Execution step signs into a non-API portal inside the container and clicks Export — no API connector required.
- **Lands in local file manager:** The downloaded file saves right to the container's local /Downloads directory and exposes its exact downloaded_file_path.
- **File processing reads the path:** The Procedure wires downloaded_file_path straight into File processing to parse, extract fields, split scans, or edit PDFs.
- **Pass through to anything:** Hand the raw, split, or edited file and structured outputs straight to other flows, Google Drive, data warehouses, data lakes, databases, or REST APIs.

Downstream destinations:
- **Other flows & Procedures:** Trigger ERP upload or approval flow
- **Google Drive & SharePoint:** File to /Finance/2026/Nov/
- **Data warehouses:** Snowflake · BigQuery · Redshift
- **Data lakes:** S3 · Databricks · Parquet / JSON
- **Databases:** Postgres · MySQL · SQL Server
- **REST APIs & webhooks:** POST file + extracted JSON

## Parse physical documents into sections. Write clean data straight back to PDF.

Watch real physical documents — stamped copier scans, handwritten W-9s photographed on a desk, crumpled receipts, and faxed contracts — decompose section by section into structured blocks, then watch upstream Procedure data write live into fillable PDF forms and flatten into final documents.

Decompose scans & photos into typed sections:
- **Stamped invoice scan:** scan_0031.pdf · 300 DPI scan
- **Handwritten W-9 photo:** w9-brightline.jpg · Desk photo + coffee ring
- **Crumpled receipt photo:** IMG_4182.jpg · Wood table capture
- **Faxed signed contract:** northwind-msa.pdf · Faxed page 7 of 7

Detect form slots, write live values, and flatten final PDFs:
- **Write & flatten Form W-9:** /Downloads/vendor_w9_filled_final.pdf — 47 / 48 fields written · 1 signature guarded
- **Write Carrier Claim PDF:** /Downloads/apex_freight_claim_88412.pdf — 22 / 23 fields written · Ready for portal upload

## Parse, extract, edit, split, classify, and summarize.

Digital exports and literal physical documents — office copier scans, handwritten forms, phone photos of receipts, stamped bills of lading, and faxed contracts — all flow through one production document engine inside your Procedure.

Works on physical paper & digital files alike:
- Mailroom paper scans
- Handwritten forms & W-9s
- Phone receipt photos
- Faxed & wet-ink contracts
- Stamped BOLs & manifests
- 35+ file types · 100+ languages

- **Parse documents:** Layout-aware Markdown, structured blocks, and searchable OCR from any scan. A hybrid computer-vision and vision-language layout parser reads headings, merged multi-page tables, checkboxes, handwriting, figures, charts, formulas, and signatures in exact reading order — and can even embed a searchable OCR layer directly back into scanned PDFs.
- **Extract fields:** Structured JSON with per-field confidence scores and bounding-box citations. Map messy physical scans, multi-page invoice tables, or packages of related files into strict typed schemas — strings, dates, currencies, checkboxes, nested objects, and 1,000+ row arrays — backed by page bounding-box coordinates and confidence scores for every extracted value.
- **Edit & fill PDFs:** Modify literal documents programmatically — fill forms, check boxes, and flatten. Auto-detect every field on a fillable or static PDF form, populate text inputs, checkboxes, dropdowns, multi-line fields, and character-per-box fields (like EINs or SSNs) from upstream Procedure variables or natural-language instructions, then flatten into a locked final PDF ready to upload or email.
- **Split & separate:** Pull a physical paper stack apart into separate named files and loop per document. Feed one combined 24-page mailroom scan, closing binder, or 50-invoice PDF stack. Vision-based boundary detection finds visual headers, layout shifts, mid-page breaks, and unique identifiers (like invoice # or member ID), saves each separated file into Downloads, and automatically loops downstream cards once per document.
- **Classify & route:** Sort physical scans and inbox drops by visual layout & content before acting. Define up to 25 document categories in plain language. Vision-based classification recognizes form layouts, logos, and content cues — even on image-only scans — returning the matched category and numerical confidence score so Rule logic branches cleanly and escalates low-confidence edge cases to humans.
- **Summarize & verify:** Page-cited document summaries, clause digests, and tamper checks before money moves. Pipe layout-aware parsed text, tables, and charts straight into Stepwork AI and Summary cards to generate executive briefs, contract renewal digests, and claims abstracts grounded in exact pages — while running confidence, missing-field, and tampering checks before downstream payments or approvals execute.

## Configure once. Test on a real file before running.

Every File processing card is configured and verified against your real digital or scanned physical documents inside the editor.

- **Fetch digital or physical files:** Pull files from Google Drive, email inboxes, non-API web portals, on-prem scanner shares, or scheduled automatic exports — PDFs, phone photos, copier scans, Office docs, CSV, HTML, XML, and .eml.
- **Pick an operation & accuracy:** Choose Parse / Read text, Extract fields, Edit & fill PDF form, Split into documents, or Classify document — chain with AI Summary or Verification, and pick Standard or High accuracy.
- **Discover fields or form slots:** Define up to 100 typed fields or 25 categories, or drop a sample document so Stepwork auto-discovers extraction fields and editable PDF form slots for you.
- **Test on the live pipeline:** Drop a real sample scan or PDF into the modal and inspect exact parsed text, confidence scores, split pages, or the edited PDF before saving the card.
- **Deliver anywhere or loop:** Send edited PDFs, split files, summaries, or extracted JSON to other flows, Google Drive, data warehouses, data lakes, databases, REST APIs, ERPs, or Slack Approvals.

## Fetch from anywhere. Deliver anywhere.

Because File processing runs inside a Stepwork Procedure, it is never trapped behind an API integration. Pull digital files or scanned physical documents from email, Google Drive, non-API portals, on-prem desktop systems, or scheduled exports — then route edited PDFs, separated documents, summaries, or extracted data to warehouses, data lakes, databases, Drive, ERPs, or any API.

Pull files from:
- **Google Drive & cloud folders:** Pull PDFs, mailroom scans, phone photos, and spreadsheets from Drive, SharePoint, Box, or Dropbox.
- **Emails & shared inboxes:** Ingest .eml files, scanned attachments, and signed contracts from Gmail, Outlook, or intake mailboxes.
- **Non-API web portals:** Sign into bank, carrier, healthcare, supplier, or government portals and click Download for you.
- **On-prem & scanner shares:** Fetch physical copier scans, legacy ERP exports, SAP GUI files, and VPN-only local network shares.
- **Scheduled automatic exports:** Trigger daily, weekly, or month-end report exports automatically without manual clicks.

Send files or data to:
- **Data warehouses, lakes & databases:** Load parsed CSVs, large tables, and JSON into Snowflake, BigQuery, Databricks, S3 data lakes, Postgres, or MySQL.
- **Google Drive & cloud archives:** Rename, organize, and file split PDFs, edited/flattened forms, searchable OCR PDFs, or raw exports.
- **REST APIs & webhooks:** Pass edited or split files, Markdown, summaries, or cited JSON straight to internal endpoints via API.
- **ERPs, CRMs & portals:** Enter bills, update records, or upload edited and flattened PDFs back into NetSuite, SAP, Salesforce, or portals.
- **Email, summaries & Slack approvals:** Deliver filled packets by email, trigger Slack sign-off, or post page-cited AI document summaries.

## From raw paper scans to edited PDFs and summaries.

Watch each document operation work directly inside a Stepwork Procedure — wired over typed ports into downstream apps, loops, approvals, and data stores.

## Pull typed fields and huge tables from physical scans and photos.

Define the exact fields you need — text, number, boolean, date, currency, list, or nested table arrays — or run one-click field discovery on a sample scan. Every field becomes a typed output port alongside extracted_json, backed by confidence scores and page citations.

What it outputs:
- Up to 100 typed fields per card, large multi-page tables, plus full extracted_json
- Reads printed text, ballpoint handwriting, checkboxes, rubber stamps, and wet-ink signatures
- Per-field confidence scores and bounding-box source citations for audit trails
- Standard or High accuracy depending on scan quality and layout complexity

_Visual: A File processing step reads four physical documents in turn — a handwritten restaurant receipt, a faxed contract, a handwritten W-9, and a stamped invoice scan — and pipes typed fields straight into Ramp, Salesforce, NetSuite, and QuickBooks._

## Edit, populate, and flatten literal PDF forms without re-typing.

Upload any fillable or static business PDF to detect its fields automatically, map upstream Procedure variables into text boxes, checkboxes, dropdowns, and character-per-box fields (up to 300 fields), and output a ready-to-send or flattened filled_file_path.

How PDF editing works:
- Detects and edits text, checkbox, dropdown, multi-line, and character-per-box (EIN/SSN) fields
- Populate deterministically by schema (up to 300 fields) or plain-language instructions
- Flatten completed PDFs into locked final copies while preserving valid signatures where supported
- Automatically flags unsigned signature blocks instead of guessing, outputting filled_file_path

_Visual: Upstream vendor variables map into an Edit & fill PDF form card that populates legal name, tax classification checkbox, and EIN on a blank W-9 PDF while flagging the signature line for human sign-off, outputting filled_file_path._

## Separate physical batch scans into individual files and loop per doc.

Mailrooms, closing binders, and AP copier trays routinely pack ten physical documents into one PDF. Split into documents detects visual headers, layout breaks, and unique identifiers — saving each separated file into Downloads and looping downstream cards once per document.

How separation works:
- Separates mixed physical packets or 50 repeated invoices by unique invoice # or member ID
- Saves clean individual files into a <stem> documents folder inside the container's Downloads
- Outputs file_path, filename, category, start_page, end_page, identifier, and document_count
- Linking any per-document output automatically loops every downstream step once per file

_Visual: An 18-page physical batch PDF is split by a File processing card into three separate documents — an invoice, a W-9, and a packing slip — and a dashed loop frame runs downstream extraction and ERP steps once for each separated file._

## Sort incoming physical scans and attachments into the right branch.

Name up to 25 document categories in plain language. Vision-based classification reads visual layouts, logos, and text cues — returning the matched category and numerical confidence score so Rule logic branches cleanly and escalates edge cases to humans.

How routing works:
- Define up to 25 custom categories in plain language — no training code required
- Visual layout recognition works on image-only scans and phone photos (IMG_4182.jpg)
- Outputs category and numerical confidence ports ready for Rule logic thresholds
- Route low-confidence or unknown files straight to a Slack review or Approval card

_Visual: Incoming scans pass through a Classify document card returning category and confidence, flowing into a Rule logic card that sends Vendor Invoices to AP bill entry and W-9 Tax Forms to vendor onboarding._

## Parse complex layouts, tables, and charts into clean Markdown & text.

When you need complete document contents — multi-page contracts, rate tables, financial charts, policy packets, or handwritten field logs — layout-aware parsing returns clean text, Markdown blocks, and page_count ready for AI, Scripts, or searchable OCR PDFs.

What layout parsing captures:
- Preserves exact reading order across multi-column pages, merged tables, and footers
- Captures charts, diagrams, checkboxes, stamps, formulas, and 100+ languages
- Can embed a searchable OCR layer directly into scanned physical PDFs
- Feeds cleanly into AI cards, Python/JS/Bash Scripts, or vector/warehouse pipelines

_Visual: A 14-page scanned vendor MSA PDF enters a Parse & read card outputting clean text and page_count, piping straight into AI prompt, Python Script, and Summary cards._

## Turn dense multi-page documents into cited briefs and trust checks.

Chain layout-aware parsing directly into Stepwork AI and Summary cards to distill 30-page contracts, claims packets, or board reports into page-cited briefs, renewal dates, and risk flags — paired with confidence and tamper verification before downstream actions run.

What downstream teams get:
- Page-cited executive briefs, redline digests, and key clause / renewal date callouts
- Summarizes multi-page financial schedules, rate tables, and embedded charts accurately
- Pairs with confidence checks and tampering / post-signature verification signals
- Posts structured summaries directly to Slack, CRM deal notes, email, or your data warehouse

_Visual: A 32-page scanned commercial contract passes through Parse & read into an AI Summary card producing key terms, renewal dates, and verification checks, fanning out over primary pipes to Slack, CRM deal notes, and a data warehouse._

## Physical scans. Production scale. Zero guesswork.

Engineered for messy operational reality — from crumpled paper receipts and 200-page mailroom scans to strict compliance logs.

- **Physical scans, handwriting & 35+ formats:** Processes copier scans, tilted phone photos, faxes, ballpoint handwriting, rubber stamps, and wet-ink signatures alongside PDFs, Office docs, spreadsheets, and .eml files in 100+ languages.
- **Layout-aware tables, charts & OCR:** Hybrid computer-vision layout models preserve merged multi-page tables, checkboxes, formulas, and charts — and can embed searchable OCR straight back into scanned PDFs.
- **Confidence scores, citations & verification:** Per-field confidence scores and bounding-box source locations show where every value came from, with tampering and post-signature checks to catch altered documents before acting.
- **Standard & High accuracy modes:** Run fast Standard mode for crisp digital PDFs and bulk exports, or switch to High accuracy vision models for dense scans, handwriting, skewed photos, and complex forms.
- **Live-pipeline sample testing:** Drop a real sample scan or PDF inside the editor to auto-discover fields or form slots and inspect exact parsed text, split pages, or filled PDFs on the live pipeline before saving.
- **Explicit flags & metadata-only logs:** Unreadable pages, missing fields, or unsigned signature blocks surface clear status codes. Run records store timing and counts — keeping sensitive tax, HR, and legal contents out of logs.

## From physical paper stacks and portal exports to closed records.

Pull digital files or scanned physical documents from emails, Google Drive, non-API portals, and on-prem scanner shares — parse, edit, split, classify, and summarize — then deliver anywhere.

Scheduled Exports & Data Pipelines:
- **Nightly non-API portal → Snowflake & S3 (Scheduled export → Warehouse & Lake; Parse & extract):** On a schedule, sign into a bank or supplier portal with no API, trigger the daily PDF/CSV/XLSX export, parse multi-page tables, and load straight into Snowflake, BigQuery, or an S3 data lake.
- **On-prem ERP export → Google Drive & Postgres (On-prem → Drive & Database; Parse & read):** Pull weekly inventory or GL reports from a VPN-only desktop system, validate totals with a Script card, archive to Google Drive, and upsert clean rows into Postgres.
- **Legacy portal file → internal API (Non-API portal → API; Extract fields):** Download PDFs, CSVs, or XML statements from a portal with no API and pass the fetched file or cited JSON straight to internal endpoints via an API card.

Finance, AP & Mailroom:
- **Physical mailroom stack → per-invoice loop (Physical scan → Drive & ERP; Split & separate):** Pull a 30-page copier scan of mixed paper invoices, checks, and W-9s from a local scanner share, separate each document by invoice #, archive to Drive, and enter every bill automatically.
- **Handwritten receipts & scans → Slack Approval → ERP (Email / Photo → ERP; Extract & verify):** Extract vendor, line items, and totals from crumpled receipt photos or scanned PDFs with confidence citations, verify totals, route for Slack Approval, and enter in NetSuite or QuickBooks.
- **Month-end statements → data warehouse (Scheduled export → Warehouse; Extract fields):** Schedule automatic month-end statement downloads from bank and card portals, parse multi-page transaction tables, and load reconciliation tables into Snowflake.

Operations, Logistics & Supply Chain:
- **Stamped physical BOLs → split & archive (Physical scan / Portal → Drive & ERP; Split & separate):** Download or scan physical freight packets with handwritten delivery notes and stamps, split into individual bills of lading, match shipment IDs against ERP POs, and archive each BOL in Drive.
- **Carrier claim forms → edit, flatten & upload (ERP → Non-API portal; Edit & fill PDF):** Auto-fill and flatten carrier PDF claim forms with order IDs, item counts, checkboxes, and dates from your ERP, then upload the finished PDF straight back into the carrier portal.
- **On-prem WMS manifests → partner API (On-prem → API; Extract fields):** Fetch nightly shipping manifests from an on-prem warehouse system, parse tables, and deliver structured JSON to 3PL or customer APIs.

Legal, Security & Compliance:
- **Scanned 30-page MSA → page-cited Slack summary (Physical scan / Email → Slack & CRM; Summarize & verify):** Parse wet-ink signed contracts arriving by email or scan, verify signature integrity, summarize renewal windows and liability caps with page citations in Slack, and update Salesforce.
- **Physical closing binder → separated archive (Drive → Searchable Drive archive; Split & OCR):** Split 40-page scanned legal binders from Google Drive into separate named agreements, embed searchable OCR, and organize each file cleanly into Drive or SharePoint folders.
- **Scheduled SOC 2 & audit evidence (Scheduled export → Vanta; Extract fields):** Run scheduled procedures to export access reports and compliance PDFs from internal tools, extract attestation dates, and upload artifacts to Vanta or Drata.

HR, Healthcare & People Ops:
- **HRIS records → edited & flattened onboarding PDFs (HRIS → Drive & Email; Edit & fill PDF):** Edit and populate tax, direct deposit, and policy PDF forms (including SSN/EIN boxes and checkboxes) from Workday or Rippling, flag signature lines for sign-off, and archive in Drive.
- **Handwritten intake forms → EHR / database (Physical scan → Database; Classify & extract):** Classify and extract handwritten paper patient or employee intake scans from a shared inbox or copier folder, route low-confidence items for review, and write clean rows to your database.
- **Benefits & policy packets → AI summary in Slack (Drive → Slack & Email; Summarize):** Parse updated benefits PDFs and rate tables stored in Drive or SharePoint and deliver a clear employee-ready summary to Slack and email.

Sales, RevOps & Customer Intake:
- **Signed order forms → CRM, summary & billing API (Email → CRM, Slack & API; Extract & summarize):** Extract SKUs, seats, billing terms, and start dates from scanned or digital order PDFs, post a deal summary in Slack, update Salesforce, and trigger provisioning via API.
- **Partner portal exports → BigQuery (Scheduled export → Warehouse; Parse & extract):** Schedule automatic weekly exports from channel or partner portals without APIs, parse messy tables and spreadsheets, and load reporting rows into BigQuery or Snowflake.
- **Customer KYC, COI & W-9 packet intake (Portal / Email → Drive & API; Classify & verify):** Classify incoming W-9s, COIs, and KYB scans from email or portals, verify document authenticity, archive originals in Google Drive, and POST verified JSON via API.

## Questions about file processing

**Q:** Can Stepwork process literal physical documents — paper scans, handwriting, faxes, and phone photos?

Yes. Businesses routinely scan paper mailroom stacks, crumpled receipts, handwritten W-9s, faxed contracts, and stamped bills of lading into email, Google Drive, or an on-prem copier folder. Stepwork's vision-language document engine reads printed text, handwriting, checkboxes, rubber stamps, tables, charts, and signatures across rotated scans and phone photos — and can separate a combined paper scan into individual named files or embed searchable OCR back into the PDF.

**Q:** How can Stepwork edit and modify existing PDFs and business forms?

Stepwork detects fillable and static PDF form fields — text boxes, checkboxes, radio buttons, dropdowns, multi-line fields, and character-per-box inputs like EINs and SSNs (up to 300 fields per PDF) — and populates them from upstream Procedure variables or plain-language instructions. Completed PDFs can be flattened into locked final files, existing digital signatures can be preserved where supported, and unsigned signature blocks are automatically flagged for human sign-off rather than guessed.

**Q:** Can Stepwork summarize long multi-page documents, contracts, and tables?

Yes. Layout-aware parsing turns dense multi-page PDFs, scanned contracts, financial tables, and embedded charts into clean Markdown and text preserving exact reading order. Passing that output into Stepwork's AI and Summary cards generates executive briefs, renewal-term digests, and risk callouts grounded in page numbers — ready to post to Slack, email, CRM notes, or your data warehouse.

**Q:** Where can Stepwork fetch files from — including non-API and on-prem systems?

Because File processing runs inside a Procedure with its own local container filesystem, an upstream Execution, Webhook, or Schedule step can fetch files from virtually anywhere: Google Drive, SharePoint, Dropbox, and Box; Gmail, Outlook, and shared inboxes; non-API web portals (banks, carriers, healthcare, suppliers, government sites); VPN-only on-prem desktop apps and physical scanner shares; or scheduled automatic exports triggered daily, weekly, or at month-end.

**Q:** Where can Stepwork send processed, split, or edited files and extracted data?

Downstream Procedure cards can pass raw, split, or edited/flattened files and structured outputs to other flows and Procedures; archive files into Google Drive, SharePoint, Dropbox, or web portals; load structured rows and JSON into data warehouses (Snowflake, BigQuery, Redshift), data lakes (S3, Databricks), and databases (Postgres, MySQL, SQL Server); POST files or payloads via an API card; enter records into ERPs and CRMs; or deliver summaries and packets over email and Slack.

**Q:** How does Split into documents separate physical batch scans and loop downstream steps?

Vision and semantic boundary detection splits combined multi-document PDFs (like a 30-page copier scan or 50 invoices in one file) by detecting new headers, layout shifts, mid-page breaks, or unique identifiers such as invoice numbers. Stepwork saves each separated file into a dedicated folder inside Downloads and emits per-document ports (file_path, filename, category, start_page, end_page, identifier, document_count) — linking any port automatically loops downstream cards once per document.

**Q:** What file formats and languages are supported?

File processing handles 35+ file formats across 100+ languages, including PDFs, scanned documents, phone photos (PNG, JPG, TIFF, HEIC, WebP, SVG, BMP, GIF, PSD), Office documents (DOCX, DOC, XLSX, XLS, PPTX, PPT, ODT, ODS), CSV, plain text, HTML, XML, RTF, Markdown, and .eml emails.

**Q:** How does Stepwork verify accuracy, confidence, and document integrity?

Extractions and classifications expose numerical confidence scores and page bounding-box citations so you can branch low-confidence files to Slack Approval or human review via Rule logic. You can also test any card on a real sample file inside the editor on the live pipeline, toggle Standard vs. High accuracy, and flag missing fields, unsigned signature blocks, or tampered/altered documents before downstream systems update.

**Q:** How is File processing different from Extractions?

Extractions read live tables, lists, grids, and values directly from application screens (including multi-page pagination up to 100 pages). File processing operates on files — digital exports and scanned physical documents, photos, spreadsheets, and emails — to parse, extract fields, edit and flatten PDFs, split batch scans, classify, and summarize. Many Procedures use both together.

---

This is the Markdown version of https://stepwork.com/procedures/file-processing, built from the same copy as the page. Everything about Stepwork for AI tools: https://stepwork.com/llms.txt. Book a demo: https://calendly.com/shaun-maclellan/1-1-w-shaun-stepwork
