> For the complete documentation index, see [llms.txt](https://developers.make.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.make.com/custom-apps-documentation/block-elements/parameters/collection.md).

# Collection

An object with key: value pairs

## Specification

### spec

* Type: `Array`
* Description of the collection.
* Array of parameters. Standard parameters syntax is used.

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

```json
{
    "name": "myCollection",
    "type": "collection",
    "label": "My Collection",
    "spec": [
        {
            "name": "email",
            "type": "email"
        },
        {
            "name": "phone",
            "type": "text"
        }
    ]
}
```

{% endtab %}
{% endtabs %}

### sequence

* Type: `Boolean`
* If set to `true` , all properties of the object will be in the same order as they are defined in the `spec`.

## Examples

### Simple collection

Create a collection by specifying its parameters in the `spec`.

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

<div align="left"><figure><img src="https://1562974717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNS0mCBwODiYtOVXjc6qf%2Fuploads%2Fgit-blob-d6fb96b243ff5dc342c392c86944aa1f252c08e5%2Fcollection1a.png?alt=media" alt="" width="543"><figcaption></figcaption></figure></div>
{% endtab %}

{% tab title="Source" %}

```json
[
	{
		"name": "contact",
		"spec": [
			{
				"name": "firstname",
				"type": "text",
				"label": "First name"
			},
			{
				"name": "lastname",
				"type": "text",
				"label": "Last name"
			}
		],
		"type": "collection",
		"label": "Contact"
	}
]
```

{% endtab %}

{% tab title="Output" %}

```json
{
    "contact": {
        "lastname": "Doe",
        "firstname": "Jane"
    }
}
```

{% endtab %}
{% endtabs %}

### Collection in a collection

Collections can be also nested in another collection.

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

<div align="left"><figure><img src="https://1562974717-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNS0mCBwODiYtOVXjc6qf%2Fuploads%2Fgit-blob-fb61f078fe10ff7b6c99c0ee03ece6daca2c9d87%2Fcollection2a.png?alt=media" alt="" width="543"><figcaption></figcaption></figure></div>
{% endtab %}

{% tab title="Source" %}

```json
[
	{
		"name": "contact",
		"spec": [
			{
				"name": "firstname",
				"type": "text",
				"label": "First name"
			},
			{
				"name": "lastname",
				"type": "text",
				"label": "Last name"
			},
			{
				"name": "address",
				"label": "Address",
				"type": "collection",
				"spec": [
					{
						"label": "Street",
						"name": "street",
						"type": "text"
					},
					{
						"label": "City",
						"name": "city",
						"type": "text"
					}
				]
			}
		],
		"type": "collection",
		"label": "Contact"
	}
]
```

{% endtab %}

{% tab title="Output" %}

```json
{
    "contact": {
        "address": {
               "city": "Prague",
               "street": "Novakovych"
         },
        "lastname": "Doe",
        "firstname": "Jane"
    }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.make.com/custom-apps-documentation/block-elements/parameters/collection.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
