Skip to main content

How to Add Functions to a Workflow

This guide provides a step-by-step process for adding and configuring functions within a Global AI platform workflow, focusing on the "Function" node and its capabilities.

Add a Function Node to Your Workflow

To add a function to your workflow, follow these steps:

  1. Navigate to Automation > Workflows > click on your workflow to open it.
  2. Hover over the location where you want to add the node. Click the + icon. A menu opens showing all available node types.
  3. Select Executions and Functions > Function from the list of node types.
This image displays a hierarchical workflow menu showing a user selection. The primary menu focuses on Executions & Functions, which then asserts the option to add a Function component to the workflow logic.

This opens a form called Node Type: Function. In this form, you can define the conditions for branching your workflow as follows:

  1. Name: Provide a name for your Function node.
  2. On Error: Select how the workflow should proceed if an error occurs during the execution of this node:
    • None: The workflow continues execution even if an error occurs.
    • Retry: The workflow retries executing the node if an error occurs.
    • Skip: The workflow skips this node if an error occurs.
  3. Function: Click the search box to open the Choose Function modal.
    • In the Choose Function modal, select the function you want to add to your workflow. You can use the search bar to find a specific function.
    • Click on the desired function to select it. The modal closes, and the selected function appears in the Function field.
  4. Click Update to save the node configuration.
Function Node

Use the Function node to integrate pre-defined functions into your workflow. One common use case is a "For Loop" function, which lets you iterate over a set of items or perform repetitive tasks within your workflow.

This workflow diagram shows the addition of a new processing step. It begins with a Start node. Directly following is a newly added, elongated, rounded block labeled with a large 1. This block is identified as a function and is currently named A, featuring a sine wave icon, indicating a custom operation. It connects to the next empty, dashed-outline block below, suggesting the function is a key step in the process flow.
Understanding function node
  • The Function node lets you integrate pre-defined functions into your workflow, enabling you to perform specific tasks or operations as part of the workflow execution.
  • You can manage and create functions in the Functions section of the Global AI platform, available via Infrastructure > Functions.

Add a Parallel Execution function node

To add a Parallel Execution function to your workflow, follow these steps:

  1. Navigate to Automation > Workflows > click on your workflow to open it.
  2. Hover over the location where you want to add the node. Click the + icon. A menu opens showing all available node types.
  3. Select Executions and Functions > Parallel Execution from the list of node types.
This interface explicitly displays the selection of Execution and Functions (1) under Workflow Logic, opening the submenu where Parallel Execution is available for selection

This opens a form called Node Type: Parallel Execution. In this form, you can define the conditions for branching your workflow as follows:

  1. Name: Provide a name for your Parallel Execution node.
  2. On Error: Select how the workflow should proceed if an error occurs during the execution of this node:
    • None: The workflow continues execution even if an error occurs.
    • Retry: The workflow retries executing the node if an error occurs.
    • Skip: The workflow skips this node if an error occurs.
  3. Click Update to save the node configuration.
Understanding parallel execution node

The Parallel Execution node lets you run several branches of your workflow simultaneously, improving efficiency and reducing execution time.

This visual workflow diagram confirms the addition of a Parallel execution block, labeled A, directly into the flow. The block is identifiable by its double-box icon, signifying simultaneous process execution, and is prominently marked with the number 1
Parallel Execution Node
  • The Parallel Execution node lets you run several branches of your workflow simultaneously, improving efficiency and reducing execution time.
  • Each branch within the Parallel Execution node can contain its own set of nodes and logic, enabling complex workflows to execute in parallel.

Add a Sleep function node

To add a Sleep function to your workflow, follow these steps:

  1. Navigate to Automation > Workflows > click on your workflow to open it.
  2. Hover over the location where you want to add the node. Click the + icon. A menu opens showing all available node types.
  3. Select Executions and Functions > Sleep from the list of node types.
The workflow editor menu confirms the user's intent: they have successfully navigated to Execution and Functions (1) and are selecting the Sleep component (2) to introduce a deliberate time delay into the current process flow.

This opens a form called Node Type: Sleep. In this form, you can define the conditions for branching your workflow as follows:

  1. Name: Provide a name for your Sleep node.
  2. On Error: Select how the workflow should proceed if an error occurs during the execution of this node:
    • None: The workflow continues execution even if an error occurs.
    • Retry: The workflow retries executing the node if an error occurs.
    • Skip: The workflow skips this node if an error occurs.
  3. Duration: Specify the duration for which the workflow should pause execution. You can enter the duration in seconds (for example, 10 for 10 seconds, 300 for 5 minutes, 3600 for 1 hour).
  4. Click Update to save the node configuration.
Understanding sleep node

The Sleep node lets you pause the execution of your workflow for a specified duration. This is useful for introducing delays between actions or waiting for external processes to complete.

The image shows a visual workflow diagram with a single process block added. This block is an elongated, rounded rectangle labeled sleep and named A. It features a crescent moon icon on the left, which universally represents a sleep or delay function. The block is highlighted with a dark blue border. A large number 1 is positioned just below the block, pointing to it as the focus of the current action.
Sleep Node
  • The Sleep node lets you pause the execution of your workflow for a specified duration. This is useful for introducing delays between actions or waiting for external processes to complete.
  • The duration specified in the Sleep node is in seconds.

Now that you know how to add functions to a workflow, you can explore more about workflow construction and management in the Global AI platform.