Query JSON

Note: We have made improvements to the Query JSON action. Query JSON actions must be replaced with the newer version. Read the FAQ.

Use the Query JSON action A tool for building the processes, logic, and direction within workflows. to extract information from a JSON text string and store it in a variable A placeholder that stores changes each time the workflow runs, such as the information entered in a form, or the name of a file. You can also create variables to store information you use in the workflow, such as an email address..

Some third-party services send or return information in a JSON data structure. Before you can use the information in a workflow, you need to extract it into variables. You can use the Query JSON action to extract pieces of information into variables using JSON queries (also known as JSONPath expressions).

Before you begin:

Jump to:

JSON query examples

Test your JSON expression

There is no standard implementation of JSON paths. To avoid having to re-run your workflow multiple times to test your JSON expression, you can use the expression checking tool provided by the Nintex Platform tools.

To check your expression:

  1. Navigate to https://jsontostring.com/.
  2. Paste your sample JSON in the converter and click Convert.
  3. In another tab, navigate to Nintex Platform tools
  4. In the query body template on the right-hand side of the page:
    1. Replace the "string" value next to "JSON" with the JSON string you converted in step 2.
    2. Replace the "string" value next to "JSONpath" with the JSON expression you want to test.
  5. Click Send API Request.
  6. Check the returned response.

Configure the Query JSON action

  1. Add the action to the workflow and open the action configuration panel. For more information, see Add an action to the workflow.

    The Query JSON action should occur after the logic that stores the JSON data in a variable.

  2. For JSON source, select the variable containing the JSON data.

  3. For JSONPath expression, type or paste the JSON query.

    Note: Click Check Expression to quickly validate your JSONPath expressions in Nintex Platform API. This reduces the need to execute the workflow to validate expressions.

Query JSON fields and buttons

Field Description

Variable types

Check Expression

Opens the Nintex Platform API where you can directly check and validate your JSONPath expressions.

The authorization token is automatically generated for you when Nintex API developer platform is launched.

n/a
JSON Source The JSON data lookup you want to extract elements from.

Text, Decimal, Integer, Boolean, DateTime, Collection

JSONPath expression The JSON query to use.

Text, Decimal, Integer, Boolean, DateTime

Store first result The variable in which to store the first piece of data extracted.

Text, Decimal, Integer, Boolean, DateTime

Store all results The collection variable in which to store all extracted pieces of data.

Collection