---
title: YAML_PARSE
url: https://www.tines.com/docs/formulas/functions/yaml-parse/
kind: formula-function
---

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

# YAML_PARSE

*[View on tines.com](https://www.tines.com/docs/formulas/functions/yaml-parse/)*

Takes text containing YAML and parses to an object

**Categories:** Data Parsing/Conversion

## Syntax

```
YAML_PARSE(text, [parse_date_or_time: FALSE], [version: 1])
```

## Examples

### Example 1

Input:

```json
{
  "my_action": "---\ntimeout: 10\nqueues:\n- one\n- two\n- three\nscheduler:\n  max_workers: 10\n"
}
```

Formula:

```
YAML_PARSE(my_action)
```

Output:

```json
{
  "queues": [
    "one",
    "two",
    "three"
  ],
  "scheduler": {
    "max_workers": 10
  },
  "timeout": 10
}
```

### Example 2

Input:

```json
{
  "my_action": "\nLinkedDate: 2007-04-01 12:00:00\n"
}
```

Formula:

```
YAML_PARSE(my_action, parse_date_or_time: TRUE)
```

Output:

```json
{
  "LinkedDate": "2007-04-01 12:00:00 UTC"
}
```

### Example 3

Input:

```json
{
  "my_action": "---\nNestedObject:\n  LinkedDate: 2007-04-01 12:00:00\n  List:\n  - :foo\n  - bar\n"
}
```

Formula:

```
YAML_PARSE(my_action, version: 2)
```

Output:

```json
{
  "NestedObject": {
    "LinkedDate": "2007-04-01 12:00:00 UTC",
    "List": [
      "foo",
      "bar"
    ]
  }
}
```

## Sample actions

```json
{
  "standardLibVersion": "15",
  "actionRuntimeVersion": "4",
  "agents": [
    {
      "disabled": false,
      "name": "My Action",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": "---\ntimeout: 10\nqueues:\n- one\n- two\n- three\nscheduler:\n  max_workers: 10\n"
      },
      "position": {
        "x": -1410,
        "y": 150
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    },
    {
      "disabled": false,
      "name": "YAML_PARSE",
      "description": "",
      "options": {
        "mode": "message_only",
        "loop": false,
        "payload": {
          "yaml_parse": "=YAML_PARSE(my_action)"
        }
      },
      "position": {
        "x": -1410,
        "y": 255
      },
      "type": "eventTransformation",
      "timeSavedUnit": "minutes",
      "timeSavedValue": 0,
      "monitorAllEvents": false,
      "monitorFailures": false,
      "monitorNoEventsEmitted": null,
      "form": null
    }
  ],
  "links": [
    {
      "sourceIdentifier": 0,
      "receiverIdentifier": 1
    }
  ],
  "diagramNotes": []
}
```
