---
id: overview
title: Overview
---
ToolJet Workflows is a visual, node-based platform tailored for data-centric automation tasks. With its intuitive design, users can create detailed queries across diverse data sources, manage conditional flows, and execute custom JavaScript code while making the processes presentable and easy to manage.
- Click on the input field next to the PostgreSQL logo and rename the node to fetchSalesData.
- There are two dropdowns right below the name field. The first dropdown lets you pick from a list of available nodes. The second dropdown lets you pick between SQL mode and GUI mode to frame your query.
- We will stick to SQL mode for our example.
- Below the two dropdowns we have an input field to write our SQL query, we'll enter the below query in the input field to fetch the required data:
SELECT ProductID, Month, UnitsSold, TotalRevenue FROM MonthlySales;
- If you click on the Run button in the top bar, the results field at the bottom will be populated with the result of the query.
- In the JavaScript node, the data retrieved from the fetchSalesData node can be accessed using the property - fetchSalesData.data.
- Additionally, to determine the execution status (success or failure) of the node, refer to the fetchSalesData.status property.
- It is important to use a return statement in the JavaScript node to ensure that the node returns some data after the code executes.
- Enter the below logical expression in the input area:
sendSMS.data.errorMessage == null
- The If condition node will return true if errorMessage is null. In case an error message is present, it'll return false.
- We can now configure two outgoing flows, one of which will be executed based on the provided logical expression.