TableFlow Templates: Define Once, Extract Thousands
Learn how TableFlow templates transform document extraction from tedious manual work into scalable, intelligent workflows that adapt automatically to any document variation.
Imagine this: You've perfected a document extraction process for your supplier invoices, capturing every field, validating data, and formatting it for your ERP system. Then, your company adds 50 new vendors with slightly different invoice layouts.
With traditional systems, you'd rebuild extraction rules 50 times. With TableFlow's templates, you define it once, and it adapts automatically across all variations.
Templates turn document processing from a tedious task into a scalable, intelligent system that grows with your business.
Why Templates Are a Game-Changer
TableFlow transforms document extraction into adaptive workflows. Instead of hardcoding rules for each format, you define the data structure you need, and AI figures out how to extract it from any layout.
Think of templates as smart blueprints. They define what data matters to your business, while the AI finds it no matter where it appears on the page.
The Old Problem
Before templates, document extraction involved rigid processes:
- • Parse Document A with Rule Set A
- • Parse Document B with Rule Set B
Each new format required custom development. Layout changes broke rules, and scaling increased complexity.
The Template Solution
Templates flip this model:
- • Define the data you need once
- • Apply the template to any document variation
- • AI adapts extraction automatically
One template handles hundreds of layouts, and changes enhance future extractions.
Key Template Components
Template Structure
Each template consists of:
- • Basic Information: Name, description, and workspace association
- • File Types: Supported formats (document, image, spreadsheet)
- • Template Settings: AI extraction behavior and processing options
- • Fields: Individual data points to extract
- • Tables: Complex tabular data structures
Field Definitions: Your Data Blueprint
Fields represent specific data points to extract. Each field includes:
1{ 2 "name": "Invoice Number", 3 "key": "invoice_number", 4 "data_type": "string", 5 "description": "The unique identifier for this invoice", 6 "default_value": "", 7 "extraction_guide": { 8 "rules": [ 9 "Look for text containing 'Invoice #', 'INV-', or 'Invoice Number'", 10 "Usually found in the top portion of the document" 11 ], 12 "examples": ["INV-2024-001", "Invoice #12345"] 13 }, 14 "validations": [ 15 { 16 "validate": "not_blank", 17 "message": "Invoice number is required", 18 "severity": "error" 19 }, 20 { 21 "validate": "regex", 22 "options": {"pattern": "^(INV-)?[0-9]{4,}"}, 23 "message": "Invalid invoice number format", 24 "severity": "warn" 25 } 26 ], 27 "transformers": ["trim", "uppercase"] 28}
Supported data types:
- • string: Text data
- • number: Numeric values (integers or decimals)
- • boolean: True/false values
- • date: Date values with various formats
Table Structures: Organizing Complex Data
Templates handle tabular data like line items or transactions:
1{ 2 "name": "Line Items", 3 "key": "line_items", 4 "description": "Individual items or services on the invoice", 5 "columns": [ 6 { 7 "name": "Description", 8 "key": "description", 9 "data_type": "string", 10 "validations": [ 11 { 12 "validate": "not_blank", 13 "message": "Item description required", 14 "severity": "error" 15 } 16 ] 17 }, 18 { 19 "name": "Quantity", 20 "key": "quantity", 21 "data_type": "number", 22 "validations": [ 23 { 24 "validate": "min", 25 "options": {"value": 0.01}, 26 "message": "Quantity must be positive", 27 "severity": "error" 28 } 29 ] 30 }, 31 { 32 "name": "Unit Price", 33 "key": "unit_price", 34 "data_type": "number", 35 "transformers": ["currency"] 36 }, 37 { 38 "name": "Total", 39 "key": "line_total", 40 "data_type": "number", 41 "transformers": ["currency"] 42 } 43 ] 44}
Extraction Guides: Teaching AI Your Business Logic
Extraction guides provide natural language instructions to guide AI:
1{ 2 "extraction_guide": { 3 "rules": [ 4 "This is a purchase order document", 5 "Vendor information appears in the header section", 6 "Look for 'Bill To' or 'Vendor' labels", 7 "Line items are in the main table with quantity and price columns" 8 ], 9 "examples": [ 10 "Vendor: Acme Corporation", 11 "Bill To: John's Hardware Store" 12 ] 13 } 14}
Available Validations
TableFlow supports powerful validation rules:
- • not_blank: Ensures field has a value
- • email: Validates email format
- • phone: Validates phone number format
- • number: Ensures numeric value
- • decimal: Validates decimal precision
- • min/max: Range validation for numbers
- • length: String length validation
- • regex: Pattern matching
- • list: Value must be from predefined list
- • boolean: True/false validation
Transformers: Data Cleanup Made Easy
Transformers automatically clean and format extracted data:
- • trim: Remove leading/trailing whitespace
- • uppercase/lowercase: Case conversion
- • currency: Format as currency
- • date: Parse and format dates
- • phone: Normalize phone numbers
- • remove_special: Remove special characters
Best Practices
- 1. Start Simple: Begin with essential fields and add complexity gradually
- 2. Use Extraction Guides: Provide clear rules and examples for better accuracy
- 3. Choose the Right AI Model: Different providers excel at different document types
- 4. Validate Critical Data: Use error-level validations for must-have fields
- 5. Test with Real Documents: Upload sample documents to refine your template
- 6. Enable Extraction Editing: For critical workflows, allow manual corrections
Key Takeaways
- • Templates define data structure once, extract from any layout
- • AI adapts automatically to document variations
- • Natural language guides teach AI your business logic
- • Comprehensive validation ensures data quality
- • One template handles hundreds of document formats
In Summary: TableFlow templates make document processing faster, smarter, and scalable, transforming how businesses handle document extraction at scale.
Frequently Asked Questions
About Eric Ciminelli
CTO & Co-Founder at TableFlow. Expert in AI/ML systems, distributed computing, and building enterprise-grade document processing solutions.
Connect on LinkedIn →Related Articles
Experience the future of document processing with TableFlow's GPT-5 integration. Advanced context understanding, multi-language support, and superior accuracy transform your workflows.
Learn how TableFlow's extraction object transforms document chaos into structured data harmony, providing a universal format for PDFs, Excel files, images, and more.
Transform document photos into structured data instantly. No scanners needed - just snap, send, and watch clean data flow into your systems within seconds.