How to use Wiresk’s Query Builder

Estimated reading time: 2 min
Prerequisites:
A valid connection to an app, in this case we will use Odoo Trigger “Retrieve Records using Wiresk’s Query Builder

Create a new Flow or open an existing one by going to Group > select Group > Flows tab > Select or create a Flow.

Animated image GIF, shows where to click to create a Flow in Wiresk. first select a group then click on create Flow.

Refer to “how to create a Flow in Wiresk

Add Odoo Trigger “Retrieve Records using Wiresk’s Query Builder” to the Flow.

Animated GIF of Wiresk Builder screen. It shows how to Select Odoo Trigger called "retrieve records using Wiresk's Query Builder.

1 – Select a valid connection to Odoo app.

2 – Configure the recurrence rule to schedule the Trigger.

Screenshot of Wiresk Trigger setting of Odoo app, Called "Retrieve records using Wiresk's Query builder". Numbered Red arrows point to different field for the settings.

3 – In the parameters section, select the Entity (set of data that contain records) in Odoo.
For example, “Calendar event”, “Email Thread”, or “Companies”. In this case we will select “contact”.

4 – New tabs appear to configure the Query Builder.

You can optionally select and configure :

  • the related entities to link related entities in your data source (e.g., Odoo) to the primary entity you’re querying.
  • Configure filter to narrow down the records being retrieved by specifying conditions.
  • Configure grouping to group the retrieved records based on certain fields or attributes.

Select the fields or columns of data to include in your query results.

  • Minimum Columns: At least 1 column must be selected to preview data.
  • Maximum Columns: Up to 50 columns can be included in the query results.
  • Error Handling: If no records are found or columns are not configured, you might see the error: “Cannot convert undefined or null to object.”

Click on the “Edit Columns” button, on the prompted screen select the column: Complete Name, Job position and Email.

Keep in mind that, the columns that are available will vary depending on the selected entity.

Screenshot of Wiresk Query builder, edit columns screen. Red arrows show where to select and configure the columns.

Now, click on save. You can notice that the selected columns appear in the parameters.

Screenshot of Wiresk Query builder, configure columns tab screen. Red arrows show news columns header name after editing the columns.

To get the contacts information from Odoo Database, Click on the “Preview Data” button to view a sample of the records your query retrieves before finalizing it.

Note: At least 1 column must be selected to enable data preview.

Screenshot of Wiresk Query builder, configure columns tab screen. Red arrows show retrieve data after using the button "preview data".

By default Wiresk Query Builder shows up to 10 records at a time, starting at record 0.

You can adjust the starting record and the number of records displayed as needed by entering the number in the field “Number of records” and “Begin at record”.

You also have the option to sort the columns in ascending or descending order.

Click on “Configure Sorting” button, on the prompted screen, click on “Add Rule” button.

Screenshot of Wiresk Query builder, configure sorting screen. Red arrows show how to set up a sorting rule. Sorting by ascending or descending order.

In the field “Entity”, choose the column that you previously selected for display, for example “Job Position”, and then select your sorting method. Click on save.

Refresh the Query result by clicking in the “Preview Data” button.

By using Wiresk’s Query Builder, you can visualize the result in second and use that retrieve data for Mapping fields in your Flows.

To get more details on how to use the retrieve data, refer to “Field Mapping” documentation.
Explore our User Guide here.
For a complete tutorial on how to create a Flow, see “How to create a Flow in Wiresk