> ## Documentation Index
> Fetch the complete documentation index at: https://docs.odella.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Extract Markdown Tables from Text

> Use the Extract Markdown Table Blocks block to find markdown tables in text and convert them into structured Table values for workflows.

<Frame>
  <img src="https://mintcdn.com/odella/I7v1Fbrp2kx7rLoj/block-reference/assets/extract_markdown_table_blocks_light.png?fit=max&auto=format&n=I7v1Fbrp2kx7rLoj&q=85&s=42622487435517cbb69112aa6a848890" alt="Extract Markdown Table Blocks Screenshot" className="block dark:hidden" width="860" height="332" data-path="block-reference/assets/extract_markdown_table_blocks_light.png" />

  <img src="https://mintcdn.com/odella/I7v1Fbrp2kx7rLoj/block-reference/assets/extract_markdown_table_blocks_dark.png?fit=max&auto=format&n=I7v1Fbrp2kx7rLoj&q=85&s=3bf62fee71a70dddf3be3af28cf14aa1" alt="Extract Markdown Table Blocks Screenshot" className="hidden dark:block" width="886" height="360" data-path="block-reference/assets/extract_markdown_table_blocks_dark.png" />
</Frame>

## Overview

Use the Extract Markdown Table Blocks block when a workflow needs to pull tables out of markdown text, README files, AI-generated responses, or documentation. The block detects standard pipe-delimited markdown tables and returns them as structured Table values that you can pass into downstream blocks such as [Analyze Table](/block-reference/ai/analyze-table), [Table to File](/block-reference/draft/table-to-file), or [Flow Output](/block-reference/io/graph-output).

## Inputs

<ParamField path="input" type="string" required>
  The markdown-formatted text from which to extract table blocks.
</ParamField>

## Outputs

<ResponseField name="firstBlock" type="table">
  The first table block found in the input markdown, converted to a Table value. If no table blocks are found, this output will be control-flow-excluded.
</ResponseField>

<ResponseField name="allBlocks" type="table[]">
  An array of Table values, where each Table represents a table block extracted from the input markdown.
</ResponseField>

## Editor Settings

<ParamField path="coerceToTable" type="boolean" default={false}>
  When enabled, attempts to coerce the extracted content into table format. This can help handle some malformed markdown tables.
</ParamField>

## Example: Extracting Tables from Documentation

1. Create a new flow and add an Extract Markdown Table Blocks block.
2. Add a Text block with markdown content containing table blocks and connect it to the `input` of the Extract Markdown Table Blocks block.
3. Connect any of the outputs to view the extracted tables or header information.
4. Run the flow to see the results.

## Error Handling

* If no table blocks are found in the input markdown, the `firstBlock` output will be control-flow-excluded and `allBlocks` will be an empty array.
* The block will not throw an error for invalid markdown; it will attempt to extract any table blocks it can identify.

## FAQ

<AccordionGroup>
  <Accordion title="What format are the tables expected to be in?">
    The block expects tables to be formatted using standard markdown table syntax with pipe characters (|) separating columns and hyphens (-) in the separator row.
  </Accordion>

  <Accordion title="How are table headers handled?">
    Table headers are identified by the separator row (containing hyphens) that follows the header row. The headers are preserved in the output Table values.
  </Accordion>

  <Accordion title="Does this block handle complex table formatting?">
    Yes, the block handles standard markdown table formatting including text alignment indicators (:---:) and varying column widths. However, nested tables or HTML tables are not supported.
  </Accordion>
</AccordionGroup>

## See Also

* [Extract Markdown Code Blocks](/block-reference/modifiers/extract-markdown-code-blocks)
* [Extract JSON Block](/block-reference/modifiers/extract-json)
* [Analyze Table Block](/block-reference/ai/analyze-table)
* [Table to File Block](/block-reference/draft/table-to-file)
* [Flow Output Block](/block-reference/io/graph-output)
* [Text Block](/block-reference/data/text)
