Skip to main content

01.1.1 Basic concepts and principles of platform operation

Principles of API operation

Most services offer APIs that allow you to retrieve data or perform specific functions. The concept of using APIs involves two services or applications communicating by sending requests and receiving responses.

The Latenode platform can send requests to multiple third-party services or applications. For example, you can configure Gmail to send emails to users with just a few clicks. The email parameters can be customized, and the content can be generated directly within Latenode.

Scenario as a Method of Automation

The mechanism or algorithm that automates a function is called a scenario. It consists of sequentially arranged nodes and routes connecting these nodes. Each node performs a specific action, such as running the scenario, processing or saving data, or sending a request with specified parameters to a third-party service. A node performs its action only after the previous node has completed its task. Additionally, nodes can use data generated or received by the previous nodes.

Nodes are categorized into two groups:

  • Trigger nodes initiate the scenario. Depending on the type of node, it can be triggered by a button, when data is passed to the scenario, or on a schedule.
  • Action nodes directly perform specific functions, such as storing or processing data or sending API requests to selected services.

Trigger Nodes and Data Transfer to the Scenario

Trigger nodes can be divided into two groups, but all are used to start a scenario in some way.

The first group includes non-specific trigger nodes:

  • The Trigger on Webhook node allows you to run the scenario by sending requests to this node. The request may contain data for other nodes in the scenario to use. In the example below, the scenario is triggered by sending JSON with the Value parameter to the Trigger on Webhook node. The values of the Value parameter are written to the global variable GlVar using the SetGlobalVariables node. The value of this variable is then returned by the Webhook Response node as the outcome of the scenario execution. Once the scenario is set to active (by toggling the Active switch at the bottom of the interface), it is possible to send requests without first clicking the Run Once button.
  • The Trigger on Run Once node is useful for testing a scenario and allows you to run it by clicking the Run once button. Data transfer to the scenario using this node is not available, and it is not necessary to set the scenario to active status.
  • The Trigger on Schedule node allows you to run the scenario on a schedule at the desired time. Data transfer to the scenario using this node is not available. The node settings allow you to define the schedule and timezone. To ensure the scenario runs according to the set schedule, expand the scenario in Prod using the expand button and ensure it is in active status.

The second group consists of application and service trigger nodes. For example, the New or Modified Files node triggers a scenario when a file is modified or a new file is added to Google Drive. The New Message In Channel node triggers a scenario when a message is sent to a specified Discord channel. These nodes also require authorization settings.

Action Nodes for Performing Functions

Action nodes are further divided into two groups. The first group includes system nodes that perform standard actions. Examples of such nodes include:

  • The JavaScript node for processing data or performing other functions using JavaScript code. An AI assistant is built into this node to help generate the required code. You can ask the assistant to write or tweak the code and correct it as many times as necessary to achieve the desired result.
  • The Wait node allows you to pause scenario execution for a specified period.
  • The Headless Browser node is used for parsing websites and will be discussed further below.

The second group of nodes consists of specific nodes tailored to particular applications or services, each providing a distinct function. Typically, configuring these nodes requires filling in a few simple
parameters. For example, the Send Mail node sends an email with the specified content to a given address, while the Create Single Record or Update node writes or updates a row in the desired AirTable. These nodes often require authorization setup.

Using Code in Nodes

The Latenode platform supports executing functions using JavaScript code. Several nodes allow you to input or generate the code you need. The first is the JavaScript node, which includes an AI assistant. You can write code in this node yourself or with the assistant's help. By asking the assistant a question, you can get the code that performs a specific function and store it in the node.

The second is the Headless Browser node, which allows you to analyze website data according to the node's code.