# Extract Markdown Headings

## Overview

This operation identifies and extracts headings from markdown text. Markdown headings are identified by the # symbol followed by a space and then the heading text.

## Syntax

```
the markdown text is "{input}"
extract headings from the markdown text
```

## Data

The table below lists the names of the data elements in this operation and indicates which can be renamed in the syntax.

| Data Name         | Can Be Renamed |
| ----------------- | -------------- |
| the markdown text | No             |
| headings          | No             |

## Parameters

**Parameters** are placeholders for data. Refer to the table below for details on each parameter in this operation. In the syntax, replace parameters with your own values.

| Parameters | Description                                           | Examples                                  | Required |
| ---------- | ----------------------------------------------------- | ----------------------------------------- | -------- |
| `input`    | The markdown text containing headers to be extracted. | <h3>Title</h3><p>This is a subheader.</p> | Yes      |

## Examples

{% tabs %}
{% tab title="Automation" %}

```
the markdown text is "# Title \n This is a sample subtitle."
extract headings from the markdown text
```

{% endtab %}

{% tab title="Results" %}

```
# Title
```

{% endtab %}
{% endtabs %}

{% hint style="success" %}
**Tip: Use the Markdown Widget**

To add multi-line markdown content, type "/" and select **markdown**. This opens a markdown editor where you can easily type and format your text.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kognitos.com/legacy/legacy-experience/automation-areas/text/extract-markdown-headings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
