Login
Free Sign Up
Docs
/

Text - Extract List Items

Type identifier: text:extractListItems Category: Text Operations

Description

The Text - Extract List Items node parses Markdown-formatted text and extracts items from the first list found in the document. It supports both ordered and unordered lists, including GitHub Flavored Markdown (GFM) syntax. Each list item is returned as a trimmed string in an array.

Input Handles

Handle

Type

Description

text

string

The Markdown text containing a list to extract items from.

Output Handles

Handle

Type

Description

listItems

string[]

Array of extracted list items as trimmed strings.

error

control

Triggered when extraction fails (no content or no list found).

Configuration Options

This node has no additional configuration options.

Behaviour

  1. Parses the input text as Markdown, with GFM syntax support
  2. Extracts the first list found in the document
  3. Converts each list item back to Markdown text
  4. Returns trimmed, non-empty items as an array
  5. Triggers the error handle if no content is provided or no list is found

Error Conditions

  • No content to process — Input text is empty or not a string
  • No list items found — The document does not contain any lists

Examples

Basic List Extraction

Input text:

Here are some items:

- First item
- Second item
- Third item

Output (listItems):

["First item", "Second item", "Third item"]

Nested Content Preservation

Input text:

1. Item with **bold** text
2. Item with `code`
3. Item with [link](http://example.com)

Output (listItems):

["Item with **bold** text", "Item with `code`", "Item with [link](http://example.com)"]

Mixed Content Document

Input text:

# Title

Some paragraph text.

- List item one
- List item two

More text here.

Output (listItems):

["List item one", "List item two"]

Related pages