Logo

    Home

    Documentation

    Use Cases

    Training

    Applications

    Release Notes

    Use Workflow as a Datasource

    Use Workflow as a Datasource

    1 Context:

    🧠
    In this step we create a 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

    1. 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
    2. Open your Workflow
    3. 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. 1. Edit Fields:
        1. click on “Add Field” and add fields like in this screenshot:
        2. image
        3. Then select “Back to canvas” in the top left corner

    b. Code

    1. change the settings like this:
    image

    Use this Code:

    return { data: $input.all().map(item => item.json) };
    
    1. Your workflow should look like this. Important: Set it from ⚠️”Inactive” to ✅“Active” & click on save in the top right corner:
    image

    Check the Result

    1. Launch your screen and click on the button
    2. 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:
    1. Did you set your Automation-Flow to “active” ?
    2. Did you set the Webhook Node to “POST” ?
    3. 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
    Logo