- 1. Summary
- 2. Result
- 3. Step by Step Guide
- 3.1 Create a new Automation Flow from Template
- 3.2 Switch for CRUD Operations on DataSource
- 3.3 Read operation
- 3.4 Create, update and delete operations
- 3.5 Create DataSource Object
- 3.6 Add an object to use the DataSource
- 4. Documentation
1. Summary
Automation flows in the Automation Hub are a very powerful tool to get data from prebuilt nodes or other APIs without needing to code. These flows can be connected to DataSource Objects that then can be used in a
Screen
2. Result
This guide provides a detailed step-by-step process to configure a DataSource object for data retrieval from an external API. By following this guide, users will achieve a DataSource than can be connected to any build one widget to display the data in the UI.
3. Step by Step Guide
3.1 Create a new Automation Flow from Template
For this Use Case we will use an available template that will have some of the notes already set for us. Start by creating a new workflow from the existing Build.One templates, the name is Automation Flow DataSource
3.2 Switch for CRUD Operations on DataSource
In order to support CRUD(create, read, update and delete) operations through a DataSource of type Automation Flow, your Automation Flow will need to contain the WebHook node connected with a Switch Node that will support the following cases: read
, update
, delete
, create
. See in screenshot below an example of how the switch node needs to be configured:
The switch is processing a value that is sent in the payload of the Webhook that will indicate the operation that has been performed in the UI by the User
3.3 Read operation
Process the filters
For the Read operation, the UI can have requested some filters in the data (Filters on the columns of the grids for example) The developer needs to define how these filters are going to be processed.
The Filter Parser node will be used to parse the filters in a more friendly format, to be later consumed by the external API during a read
operation.
You can see that in the template used we have this node already configured for the filters of this example. In every case the developer needs to change this code to adapt to their specific use case.
Add the Node for the integrated service
In this case we added a SalesForce node connected to the Filter Parser, that reads the filter input and sends it to the HTTP endpoint through the body payload or query params.
Process the response for read operations
Add a third and final workflow node of type code, connected to the HTTP Request node. The Output Parser node will be used to parse the results and return the response in the required format.
3.4 Create, update and delete operations
Additionally for create
, update
and delete
create and connect your API Nodes as seen in sample below. This operations are easier as the data coming from the UI can directly be used on the APIs of the integrated services, but if for your specific use case you need additional logic, you can add more nodes in between.
3.5 Create DataSource Object
Next step, you will need to create your Build.One DataSource to be used in the screen.
You will need to configure the attributes of DataSource:
Name of attribute | Value |
SUBTYPE | “AutomationFlow” |
Resource | (The Path of your flow) |
How to check or change the Path of your flow
To see the change the Path of your flow you can check it in the Webhook node Parameters.
The Path field contains the name that needs to be spcified in the DataSource object. This value can be changed but it needs to be unique.
3.6 Add an object to use the DataSource
Lastly, you will need add a Build.One Object, for eg. a Grid, and connect it to the DataSource to display it’s data. To see the sample in action launch the screen “SampleAutomationFlowScreen”
4. Documentation
To find more information, you can check the following documentation.
Back to Use Cases
Back to Build.One Help-Center Home