Get started with the query action
By using the query action, you can work with batches and arrays to accomplish workflows to:
- Create a task for all high-priority records from a database.
- Save all PDF attachments for emails into an Azure blob.
To get started using the query action in a logic app, see Create a logic app.
Use the query action
An action is an operation that is carried out by the workflow that is defined in a logic app. Learn more about actions.
The query action currently has one operation, called the filter array, that is exposed in the designer. This allows you to query an array and return a set of filtered results.
Here's how you can add it in a logic app:
Select the New Step button.
Choose Add an action.
In the action search box, type filter to list the Filter array action.
Select an array to filter. (The following screenshot shows the array of results from a Twitter search.)
Create a condition to evaluate on each item. (The following screenshot filters tweets from users who have more than 100 followers.)
The action will output a new array that contains only results that met the filter requirements.
Click the upper-left corner of the toolbar to save, and your logic app will both save and publish (activate).
* If you're calling an HTTP endpoint, and receiving a JSON response, use the Parse JSON action to parse the JSON response. Without taking this step, Filter Array will see only Body and not understand the structure of the JSON payload.
Here are the details for the action that this connector supports. The connector has one possible action.
|Filter array||Evaluates a condition for each item in an array and returns the results|
The query action comes with one possible action. The following tables describe the required and optional input fields for the action and the corresponding output details that are associated with using the action.
The following are input fields for the action, which makes an HTTP outbound request. A * means that it is a required field.
|Display name||Property name||Description|
|From*||from||The array to filter|
|Condition*||where||The condition to evaluate for each item|
The following are output details for the HTTP response.
|Property name||Data type||Description|
|Filtered array||array||An array that contains an object for each filtered result|
Send feedback about: