---
title: TO_MARKDOWN_HEADING
url: https://www.tines.com/stories/docs/formulas/functions/to-markdown-heading/
kind: formula-function
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/stories/docs/llms.txt) › [Formulas](https://www.tines.com/llm/stories/docs/formulas.md) › [Functions](https://www.tines.com/llm/stories/docs/formulas/functions.md)*

# TO_MARKDOWN_HEADING

*[View on tines.com](https://www.tines.com/stories/docs/formulas/functions/to-markdown-heading/)*

Format text as a markdown heading. The level defaults to 1 and must be a whole number between 1 and 6. Whitespace is collapsed, because a heading is a single-line construct and an embedded newline would start a separate paragraph.

**Categories:** Text

## Syntax

```
TO_MARKDOWN_HEADING(text, [level])
```

## Examples

### Example 1

Input:

```json
{
  "my_action": {
    "title": "Incident summary"
  }
}
```

Formula:

```
TO_MARKDOWN_HEADING(my_action.title)
```

Output:

```json
"# Incident summary"
```

### Example 2

Input:

```json
{
  "my_action": {
    "title": "Incident summary"
  }
}
```

Formula:

```
TO_MARKDOWN_HEADING(my_action.title, 2)
```

Output:

```json
"## Incident summary"
```
