1 Context:
In this step we enhance our Workflow so that it returns a Resultset, in order to make it usable as a Datasource, including the ability to filter
2 Step by step guide:
Adjust the Automation-Flow
- Navigate back to the Home Screen. On the right panel click on the button âLaunch Automation Hubâ to go to the workflow area of Build.One
- Open your Workflow
- Insert the following nodes (Edit Fields (Set), Code). You can do that by clicking the plus icon in the top right corner or in the middle:
- 1. Edit Fields:
- click on âAdd Fieldâ and add fields like in this screenshot:
- Then select âBack to canvasâ in the top left corner
b. Code
- change the settings like this:
Use this Code:
return { data: $input.all().map(item => item.json) };
- Your workflow should look like this. Important: Set it from â ď¸âInactiveâ to â âActiveâ & click on save in the top right corner:
Check the Result
- Launch your screen and click on the button
- Navigate to your Automation-Flow and switch from âDesignâ to âExecuteâ You see all executions of your workflow. click on an execution, to see the Resultset of your Automation-Flow
Trouble shooting
Use the Network Tab of the Browser to check if your Automation-Flow is called correctly or if there are errors. Possible problems to check:
- Did you set your Automation-Flow to âactiveâ ?
- Did you set the Webhook Node to âPOSTâ ?
- Is the Path in your webhook node correct and matches with your button-code (it is case-sensitive!) ?
3 Explanation:
Returning the correct format allows to use the Workflow in your B1 UI