Skip to content

Workflows

Create Workflow

  1. Click on the three dots next to the project name where you want to add a workflow.
  2. Choose New Workflow from the dropdown menu.
  3. Provide a label for your workflow. Optionally, add a description to explain its purpose.
  4. Click Save to create the workflow.

Add Component

  1. Click on the + icon to add a new component to the workflow.
  2. Find and select Math Helper component.
  3. Select the Addition action from the list.
  4. In the Properties tab, enter the numbers you want to add.
  5. For First Number, input the first value (e.g., 2).
  6. For Second Number, input the second value (e.g., 3).
  7. Click Run.
  8. In the lower panel, examine the input and output for the addition action to verify the results.

Use Data Pill

  1. Click on the + icon to add a new component to the workflow.
  2. Find and select OpenAI component.
  3. Select the Ask action from the list.
  4. Click on the OpenAI component to open its configuration panel.
  5. In the Connection tab, click Create Connection.
  6. Enter a connection name and paste the API Token from OpenAI.
  7. Click Save.
  8. Click on Choose Connection.
  9. Select the connection you just created.
  10. Go to the Properties tab.
  11. For Model, choose the desired model (e.g., gpt-4).
  12. For Role, select the appropriate role (e.g., user).
  13. For Content, enter the prompt text, such as Tell me something about this number:.
  14. After clicking on the content field, the Data Pill Panel will open on the left. Use the data pill to insert output from a previous component.
  15. Click on Math Helper component in Data Pill Panel.
  16. Click on mathHelper_1, which is the output of the addition action for the Math Helper component.
  17. Output of Math Helper component is now inserted into the content field. Click Run.
  18. In the lower panel, review the input and output for each action in the workflow. Click on OpenAI.
  19. Verify that the result of the addition action is correctly inserted in the content field.

Output

Each component in a workflow can be tested individually to verify its output. In the Configuration Panel, you can explore the output structure of an action through the Output tab.

  1. Click on the component you want to test within your workflow.
  2. Go to the Output tab to view the output of the component.
  3. The output schema is displayed here, illustrating the structure of the output data. For example, the output of the Addition action is represented as a number, indicated by hashtag icons.
  4. Note that the value 23.34 shown in the output schema is a placeholder and not the actual result of the action.
  5. Click on the Define button. You have three options: Use Predefined Output Schema, Test Component, and Upload Sample Output Data.
  6. If you click on Use Predefined Output Schema, the structure of the output data will be shown with sample values.
  7. If you click on Test Action, the action will be executed, and you will see the real output of the action. In this case, it is 5.
  8. If you click on Upload Sample Output Data, you can upload your own sample output data.

To summarize:

  • Use Predefined Output Schema: Displays the structure of the output data with sample values.
  • Test Component: Executes the action and displays the real output.
  • Upload Sample Output Data: Allows you to upload your own sample output data.

Note: Some components does not have predefined output schema because their output is dynamic. In that case you have to test the component to see the output.

Edit Component

  1. Click on the component you want to edit.
  2. Change title and add some notes.

Edit Workflow

  1. Click on the settings icon in the top right corner.
  2. Choose Edit from the dropdown menu.
  3. Change the workflow name or description as needed.
  4. Click Save to apply your changes.

Duplicate Workflow

  1. Click on the settings icon in the top right corner.
  2. Choose Duplicate from the dropdown menu.

Export Workflow

  1. Click on the settings icon in the top right corner.
  2. Choose Export from the dropdown menu to download the workflow JSON file.

Delete Workflow

  1. Click on the settings icon in the top right corner.
  2. Choose Delete from the dropdown menu.
  3. Click Delete.

Code Editor

Every workflow is represented as a JSON file, allowing you to edit it using the code editor. Changes made in the code editor are reflected in the UI and vice versa. This feature is particularly useful for resolving UI issues or making bulk changes to the workflow.

Access the Code Editor

  1. Click on the code icon in the right panel.
  2. The code editor will open, displaying the JSON representation of the workflow. Review this structure to understand how the workflow is organized.

Add Component

Adding components to your workflow allows you to extend its functionality and tailor it to your specific needs. Each component comes with detailed documentation that guides you through its features and actions. By following these steps, you can seamlessly integrate new components into your workflow.

  1. Go to the Component Reference page.
  2. Search for the component you want to add. For this example, we’ll add the Random Helper component.
  3. Click on the Random Helper component to view its documentation.
  4. In the Actions section, find the list of available actions. We’ll choose the Random Integer action.
  5. Let’s write code to add the Random Integer action to the workflow.
  6. Under the tasks key, add a new object for the Random Integer action.
  7. Enter the label for the UI display, e.g., Generate Integer.
  8. Set the name as the action key, e.g., generatedInt.
  9. Under parameters, specify the required properties. Here, we need startInclusive and endInclusive to generate a random integer between two numbers. Set startInclusive to 1 and endInclusive to 100.
  10. Add the type for this task: randomHelper/v1/randomInt. The randomHelper/v1 is the component type, and randomInt is the action name.

This part of code will look like this:

{
"label": "Generate Integer",
"name": "generatedInt",
"parameters": {
"startInclusive": 1,
"endInclusive": 100
},
"type": "randomHelper/v1/randomInt"
}
  1. Click on save icon to add the component to your workflow.