Ligantic
Knowledge Base
Tutorials
Updates
Search Articles
Login
Free Sign Up
Home
Get Started
Tutorials
How-to guides
Reference
Explanation
Spaces
Schemas
Flows
Experiences
Endpoints
SDK and CLI
Browse documentation
Home
Get Started
Spaces
Schemas
Flows
Experiences
Endpoints
SDK and CLI
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

Required

Description

text

string

Yes

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

In v2, extraction failures publish null on listItems and trigger the connected error route. Without a connected error route, the run fails and no listItems value is published. Data consumers can receive null while the error route runs; control connections determine which branch executes.

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

Text - Parse Markdown to Content
Parses Markdown text into rich content. Converts Markdown elements into structured content nodes. Handles code blocks, including automatic stripping of Markdown code fences if wrapping the entire content.
Page not found. It may have moved or may not be published.
Browse documentation