# Using Workflow Actions

The Aisera AI Workflow Studio allows you to create workflows that trigger actions when you add drag an **Action Node** onto the AI Studio Canvas, and it is automatically added to the workflow that you're creating.

Go back and read general information about [building workflows](https://docs.aisera.com/aisera-platform/ai-automation-optimize-flow/ai-workflow-studio/building-workflows), in the previous topic, if you have never created an Aisera Workflow. If you are familiar with Action Nodes, see also [Frequently Used Actions](https://docs.aisera.com/aisera-platform/ai-automation-optimize-flow/ai-workflow-studio/building-workflows/using-workflow-actions/frequently-used-actions) and [Ticket Management Actions](https://docs.aisera.com/aisera-platform/ai-automation-optimize-flow/ai-workflow-studio/building-workflows/using-workflow-actions/ticket-management-actions).

The Action Node is a powerful feature that allows you to build applications/bots for many use cases. Therefore, we have dedicated a separate chapter to Workflow Actions.

### What are Workflow Actions?

Actions are the operational blocks of workflows in the Aisera Gen AI Plarform. Each action performs a specific operation, such as creating a ticket, sending a notification, updating a database record, or retrieving information from a system. Actions are designed to be reusable components that you can chain together to build automated workflows that solve business problems.

### Using Action Nodes

After you add an action to your workflow (drag an **Action Node** onto the **AI Workflow Studio Canvas**), you configure it by providing input parameters (the data the action needs to operate), and the action produces output parameters (the results can be used by subsequent actions in your workflow).

**To add an Action to a Workflow:**

1. Drag an Action Node onto the AI Workflow Studio canvas, where there is an existing workflow.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2F2t72w7IQDDpjEHhFEavO%2Fdrag.gif?alt=media&#x26;token=1c336a36-d9cf-474f-ba5a-0b5706054c0f" alt=""><figcaption></figcaption></figure></div>

2. Once placed, a window will open where you can browse available actions.&#x20;

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FnvWwBhWFQLHhlb2z20OB%2Faction2.gif?alt=media&#x26;token=b2c15274-bb72-4865-858d-aaa60487acf0" alt="" width="375"><figcaption></figcaption></figure></div>

3. Use the **Categories**, **Integrations**, or the **Search** bar to quickly find the action you need by name.&#x20;

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FYVXtfskp4BXynK7rUlRr%2Faction3.gif?alt=media&#x26;token=0aa6e43b-93f3-47f7-8d9a-8c2848b9ad5b" alt="" width="375"><figcaption></figcaption></figure></div>

4. After selecting an action, click **Next** to configure the input and output parameters before adding it to your workflow. For required parameters (fields with a red asterisk), you will see **...** in the corner of the field.&#x20;
5. Choose ... to see the variables that are available for that parameter.

<div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2Fmu5spxz6yRIHBcBRMu4O%2Fvariables.gif?alt=media&#x26;token=c42c86ef-ec38-497a-95bb-a5230e81071c" alt=""><figcaption></figcaption></figure></div>

4. Add an entry or choose variables to represent the parameters in required fields.
5. When you're done entering parameter information select the **OK** button.

   <div align="left"><figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2F6oylHuJ9XPzEynu36Zvt%2Faction5.gif?alt=media&#x26;token=9ae6d341-f0e0-4875-8265-0e10700f3bba" alt="" width="375"><figcaption></figcaption></figure></div>
6. Your new Action Node appears on the AI Workflow Studio Canvas. You can keep it where it is connected or move it to another place on your workflow.

<figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FdOyn2jZDBQ6fqVFDXujS%2Factions6.gif?alt=media&#x26;token=0224ff13-6b28-40b4-97f8-3692f50d3ce1" alt=""><figcaption></figcaption></figure>

### Action Node Fields

Each Action Node has the following components.

* **Action Name:** The identifier for the action
* **Description:** What the action does and when to use it
* **Input:** All input parameters you need to provide, including their data types, whether they're required or optional, and examples
* **Configuration Parameters:** Additional configuration settings specific to the action
* **Output:** Variables produced by the action that you can reference in subsequent workflow steps

### Key Action Node Concepts

* **Required vs. Optional Parameters:** Required parameters must be provided for the action to execute. Optional parameters have default values or are only needed for specific scenarios.
* **Data Types:** Each parameter has a specific data type (String, Number, Boolean, Object, etc.). Ensure you provide data in the correct format.
* **Output Variables:** Outputs from one action can be mapped as inputs to subsequent actions, creating a chain of operations in your workflow.
* **Error Handling:** If an action fails (due to missing required parameters, invalid credentials, or system errors), the workflow may halt or follow error handling paths you've defined.

### Types of Actions

The AI Workflow Studio supports two types of actions, based on how they operate:

#### 1. Internal Service Actions

These actions connect to Aisera's internal services and capabilities. They do not require any external system configuration or credentials. Internal service actions include operations like:

* Sending notifications through Aisera channels
* Processing data
* Accessing user profile information from Aisera's user directory

Configuration: Internal service actions work out-of-the-box and only require you to specify the input parameters defined in the action contract.

#### 2. External System Actions

These actions connect to external third-party systems or services outside of Aisera, such as ServiceNow, Salesforce, Jira, databases, or other enterprise applications. External system actions require authentication and connection information to communicate with the target system.

Configuration: External system actions require you to configure either:

* Integration: A pre-configured connection to an external system (e.g., ServiceNow integration, Salesforce integration) that contains authentication credentials, API endpoints, and system-specific settings. You'll see an "Integration" field where you select from available configured integrations.
* Data Source: A configured data connection (typically for database operations) that contains connection strings, credentials, and database-specific information.

**Important:** Before using an external system action in your workflow, ensure that the appropriate integration or datasource has been configured in your tenant.

All actions by default contain a field called : Node Description which can be leveraged by flow developers to add practical guidance including use cases, behavioral details, important notes, or best practices.

***

### Input and Output Parameters

As identified in the previous section, Internal Service Parameters only have input parameters, while  External System Actions can have both types of parameters.

#### Working with Input Parameters

Providing Input Values: You can supply values to action inputs in two ways:

* Use existing variables: Reference variables created by previous workflow nodes (recommended for dynamic data)
* Enter static values: Type values directly into the input fields for fixed/constant data

Best Practice - Variable Management: We recommend using Set Variable or JavaScript nodes before the action node to prepare your input data. This approach ensures:

* Proper data type handling (Boolean, String, Number, Map, List, etc.)
* Data validation and transformation before passing to the action
* Clear workflow logic and easier debugging
* Reusability of prepared data across multiple nodes

Example: Instead of typing a complex JSON string directly into an action input, create a JavaScript node that constructs the object and assigns it to a variable, then reference that variable in the action.

#### Working with Output Parameters

Naming Output Variables: Each output parameter requires a unique variable name. These variables store the results returned by the action and can be referenced in subsequent workflow nodes.

Important Considerations:

* Use descriptive names: Choose names that clearly indicate what the variable contains (such as, llmResponse, ticketId, userEmail)
* Ensure uniqueness: Variables with identical names will overwrite each other. If you use the same action multiple times in a workflow, give distinct names to each instance's outputs

#### Using Node Descriptions

The Node Description field allows you to document your workflow directly within the flow builder.

Use this field to:

* Explain why this action is included in the workflow
* Note any specific configuration choices or parameter values
* Document expected behavior or edge cases
* Add reminders for future workflow maintainers
* Reference related documentation or requirements

Example Node Descriptions:

* "Sends notification to the manager when a high-priority ticket is created. Uses emailOnly=true to avoid duplicate channel notifications."
* "Generates AI summary of customer feedback. Temperature set to 0.3 for consistent, factual responses."
* "This action creates the ServiceNow incident. Integration uses 'Production SNOW Instance' connection."

Benefits: Well-documented workflows are easier to maintain, debug, and hand off to other team members. Node descriptions serve as inline documentation that travels with your workflow.

***

<br>
