"Operations" are atomic API calls, attached to a module, which encapsulate the execution of a previously configured function. In other words, operations are the actions that can be carried out by your module when they are subsequently added to a flow.
Example: imagine we have a module called "SalesY" and it can perform the following operations:
List all sales for the day
List the 10 best-selling products
Add a product and its price
All these examples can be configured via operations.
Without an operation, there is no way to use a module in your flows.
How to add an operation
Click on "New operation".
You need to fill in the information in the "Settings" section to enable the creation of operations.
You will then be shown the screen for filling in the data for the new operation, which is divided into 4 stages:
Mandatory field: makes the parameter mandatory when checked, so that it is always passed in the input JSON.
Sensitive data: when selected, this field denotes that the parameter value will not be published if the module is shared.
Example: add an example according to the data type specified in the Type field.
To finish, click "Save changes".
You can click on "New parameter" to add a new item, or choose the "Next step" button to continue with the settings (Request).
There is no limit to the number of parameters that can be created, but we recommend that you name and describe them in a structured way to make them easier to identify and use.
Request
In this tab, you can write a request using the parameters created earlier. To make it easier, we’ve organized the instructions by connectivity type. Click on the appropriate option:
Database
In Database-type modules, the request area contains the "Query" field and the available parameters, which can be dragged into the "Query" field. If you prefer, you can add other parameters directly to the Query.
In REST-type modules, the request area contains the following fields:
Available parameters: list of previously created parameters;
Method: select the HTTP method to be used in the request. The available options are:
GET: Used to retrieve data.
POST: Send data or create new resources.
PUT: Fully update resources.
DELETE: Delete resources.
PATCH: Partially update resources.
URL (optional): choose the format of the URL that will be used in the request:
PATH: Relative path, used when the base URL is already defined elsewhere.
FULL URL: Full address, useful for requests outside the domain.
Endpoint: Type or paste the path that will be called to make the request.
Body: If the selected method accepts a body (such as POST, PUT, or PATCH), enter the data to be sent. The request body can be in formats such as JSON, XML, or others depending on the API.
Header: Define the HTTP headers to be included in the request, such as Content-Type, Authorization, or others as required by the service being integrated.
Query: Insert query parameters that will be appended to the URL. These parameters are typically used to filter, sort, or paginate data in the request.
In SOAP-type modules, the request area contains the following fields:
Available Parameters: list of previously created parameters;
Body: the SOAP request body must follow the XML standard. In the body, it is necessary to include the parameters that correspond to the operation requested from the SOAP service.
Header: headers may include authentication information, such as tokens, or transaction control data.
In File-type modules, the request area contains the following fields:
Available Parameters: list of previously created parameters;
Operation type: the available options are:
Move a File: When this option is selected, the screen shows the following fields:
Path: specify the directory path where the file is currently located.
Name: enter the name of the file to be moved.
New Path: provide the new path where the file will be moved.
Delete a File: When this option is selected, the screen shows the following fields:
Path: specify the directory path where the file to be deleted is located.
Name: enter the name of the file to be deleted.
Save a File: When this option is selected, the screen shows the following fields:
Path: specify the directory path where the file will be saved.
Name: enter the name of the file to be saved.
Content: specify the content to be saved in the file.
Append content if a file with the same name exists: check this option if you want to append the new content to the existing file instead of overwriting it.
Read a File: When this option is selected, the screen shows the following fields:
Path: specify the directory path where the file is located.
Name: enter the name of the file to be read.
File Content Format: select the content format of the file (binary or text).
List Files: When this option is selected, the screen shows the following field:
Path: specify the directory path whose files will be listed.
Create directory: When this option is selected, the screen shows the following field:
Path: specify the path where the directory will be created.
Directory: enter the name of the directory.
Important: To ensure the operation works correctly, make sure your Agent is up to date.
In this step, take into account the type of connectivity chosen earlier ("Settings"):
Database
To complete the configuration of the Database-type module, the "Output structure" screen is divided into two sections: Input and Output.
Input: Contains the parameters configured in the Parameters tab. You can make adjustments here, but these changes will only be used for testing and will not be saved.
Output: No information is displayed before the test. After the test, the result will be shown here.
To test the operation, click "Test". If the result is correct, click "Finish" to complete the creation of the operation.
Email
To complete the configuration of the Email-type module, the "Output structure" screen is divided into two sections: Input and Output.
Input: Contains the parameters configured in the Parameters tab. You can make adjustments here, but these changes will only be used for testing and will not be saved.
Output: No information is displayed before the test. After the test, the result will be shown here.
To test the operation, click "Test". If the result is correct, click "Finish" to complete the creation of the operation.
REST
To complete the configuration of the REST-type module, the "Output structure" screen is divided into two sections: Input and Output.
Input: Contains the parameters configured in the Parameters tab. You can make adjustments here, but these changes will only be used for testing and will not be saved.
Output: No information is displayed before the test. After the test, the result will be shown here.
To test the operation, click "Test". If the result is correct, click "Finish" to complete the creation of the operation.
SOAP
To complete the configuration of the SOAP-type module, the "Output structure" screen is divided into two sections: Input and Output.
Input: Contains the parameters configured in the Parameters tab. You can make adjustments here, but these changes will only be used for testing and will not be saved.
Output: No information is displayed before the test. After the test, the result will be shown here.
To test the operation, click "Test". If the result is correct, click "Finish" to complete the creation of the operation.
File
To complete the configuration of the File-type module, the "Output structure" screen is divided into two sections: Input and Output.
Input: Contains the parameters configured in the Parameters tab. You can make adjustments here, but these changes will only be used for testing and will not be saved.
Output: No information is displayed before the test. After the test, the result will be shown here.
To test the operation, click "Test". If the result is correct, click "Finish" to complete the creation of the operation.
RFC
To complete the configuration of the RFC-type module, the "Output structure" screen is divided into two sections: Input and Output.
Input: Contains the parameters configured in the Parameters tab. You can make adjustments here, but these changes will only be used for testing and will not be saved.
Output: No information is displayed before the test. After the test, the result will be shown here.
To test the operation, click "Test". If the result is correct, click "Finish" to complete the creation of the operation.