Data Reference formatting options

When referencing data in Next Matter, you have three formatting options to choose from depending on your use case:

  • JSON: Preserves the original data structure with proper escaping for system integration
  • Plain: Provides human-readable format for display purposes
  • JSON first result: Extracts the first item from arrays or first character from strings (available for variables and webhook variables)

When to use each format

JSON format: Use when the data is used in other Next Matter steps or to complete integration, as most systems parse and understand this format.

Plain format: Use when you want the data to be provided in a human-readable format to display it to users.

JSON first result: Use when you need to remove unwanted array wrapping from API responses or extract the first element from lists. This is particularly useful for:

  • API responses that return single values wrapped in brackets: ["value"]"value"
  • Extracting the first item from arrays: [1, 2, 3]1
  • Building clean JSON request bodies without brackets

When you send data from Next Matter to third-party tools, it’s a good idea to check the tool’s documentation to see which format is preferable.

Differences in formats

In the case of the input types that are not listed here, both options look the same.

Text and String Input

This is an example text with linebreaks\n\nand \"double quotes\"

Multi-value dropdowns and checklists

The examples are based on the itemsSelected and itemsChecked references. All other references for these inputs look the same.

["Option A", "Option B"]

File and image uploads

The examples are based on the “files” and “images” reference. In the case of the firstFile reference, there is no difference between this reference and JSON first result.

["https://file1.com", "https://file2.com"]

User variables and Webhook variables

JSON first result is specifically designed for user variables and webhook variables that often contain API response data.

[{"user_id": 123, "name": "John"}]

Example with compatible data types:

["user123", "user456"]

Tables

If you want to use table values as a data reference, you have the following options:

  • Plain and JSON formats can be selected in the Body of Integration steps
  • JSON format can be selected in other fields (for example, form fields, or email messages)

There is no difference between JSON (other fields) and plain. The JSON that can be selected in the Body field contains escaped values. The code example contains example values.

[[\"ONE\",\"Blue\"],[\"TWO\",\"Yellow\"],[\"ONE\",\"Blue\"],[\"TWO\",\"Yellow\"]]

To send JSON table output to a Google Sheet using a custom integration, you must first parse the JSON to convert it from a string into a structured format. Currently, you cannot use the output in the Google Sheets no-code step.

JSON first result - Important notes

Only works with arrays and strings, AND the extracted element must also be a list or string:

  • Arrays containing strings/numbers: Returns the first item
  • Arrays containing other arrays: Returns the first array
  • Strings: Returns the first character
  • Arrays containing objects, booleans, or other non-list/non-string types: Returns null
  • Input that is not an array or string: Returns null

Examples

InputJSON first result outputExplanation
[1, 2, 3]1First item is a number
["Apple", "Orange"]"Apple"First item is a string
[["ONE","Blue"], ["TWO","Yellow"]]["ONE","Blue"]First item is an array
"Hello""H"First character of string
[{"name": "John"}]nullFirst item is an object
[true, false]nullFirst item is a boolean
{"name": "John"}nullInput is not array or string
123nullInput is not array or string

How it works in practice