# Frequently Used Actions

The Actions used most frequently when building workflows with the Aisera AI Workflow Studio are:

* [ExecuteRestCallAction](https://docs.aisera.com/aisera-platform/ai-automation-optimize-flow/ai-workflow-studio/building-workflows/using-workflow-actions/frequently-used-actions#execute-rest-call-action)
* [GenerateRagAnswer](https://docs.aisera.com/aisera-platform/ai-automation-optimize-flow/ai-workflow-studio/building-workflows/using-workflow-actions/frequently-used-actions#generate-rag-answer)
* [SendNotification](https://docs.aisera.com/aisera-platform/ai-automation-optimize-flow/ai-workflow-studio/building-workflows/using-workflow-actions/frequently-used-actions#send-notification)
* [FetchLLMChatAnswer ](https://docs.aisera.com/aisera-platform/ai-automation-optimize-flow/ai-workflow-studio/building-workflows/using-workflow-actions/frequently-used-actions#fetch-llm-chat-answer-v2)

This topic will discuss each of these actions and their parameters.

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 a previous topic, if you have never created an Aisera Workflow. Go back and read [Using Workflow Actions](https://docs.aisera.com/aisera-platform/ai-automation-optimize-flow/ai-workflow-studio/building-workflows/using-workflow-actions), if you have never created a workflow that uses Action Nodes.

### Execute Rest Call Action

**Description:** The Execute Rest Call Action executes an outbound REST API call either in the cloud or on-premises through a configured integration. It constructs and dispatches an HTTP request using the provided URL, method, payload, headers, and query parameters, and returns the response body, headers, and HTTP status code.

**Supported External Systems include, but are not limited to:** ServiceNow, Salesforce, Jira, Zendesk, BMC Helix, Jira Software, Active Directory, Confluence, SharePoint, PagerDuty, Freshservice, Cherwell, Microsoft Dynamics, TeamDynamix, FootPrints, SolarWinds ITSM, Managed Engines, Generic, Datadog, Slack Connector, LumApps, TeamSupport, Microfocus, Kace, Intercom, Ivanti, SAP C4C, Request Tracker, Workday, ConnectWise, Autotask, Igloo, EasyVista, 6sense, Interact, and many more.

**Input:**

* **Integration (Dropdown, Required):** The external system integration through which the REST call will be executed. Select one of the available configured integrations — such as, ServiceNow, Salesforce, Jira, Zendesk, BMC Helix, SharePoint, PagerDuty, Freshservice, Datadog, Workday, Ivanti, or ConnectWise.
* url (String, Optional): The full URL that will be invoked during the request. – e.g., <https://myinstance.service-now.com/api/now/table/incident>
* **method (String, Optional):** The HTTP method for the request. Allowed values: GET, POST, PUT, PATCH, DELETE – e.g., GET
* **payload (String, Optional):** The request body payload, typically a JSON string used for POST, PUT, or PATCH requests. Construct this payload according to the documentation of the external system. – such as, {"short\_description": "New incident"}
* **requestHeaders (Map, Optional):** A map of HTTP request headers to inject into the request.  – such as, {"Content-Type": "application/json", "Accept": "application/json"}
* **queryParams (Map, Optional):** A map of query parameters to append to the URL. – such as, {"sysparm\_limit": "10", "sysparm\_query": "active=true"}
* **responseType (String, Optional):** Specifies how the response should be retrieved and interpreted (e.g., as Bytes or String) – such as, String
* **customCertificate (String, Optional):** A custom server certificate (PEM-encoded) to be injected into the request for SSL/TLS verification – such as, -----BEGIN CERTIFICATE-----\nMIID...

**Configuration Parameters:**

* **useClientSSLCert (Checkbox, Optional, Default: false):** Flag to enable two-way (mutual) SSL authentication. When set to true, the client SSL certificate is included in the request for environments that require mutual TLS – such as, true

**Output:**

* **response (String):** The response body of the executed request, encoded as a String.&#x20;
* **success (Boolean):** A boolean indicating whether the REST call was executed successfully.
* **responseHeaders (Map):** The HTTP response headers returned by the target service, useful for pagination tokens or follow-up requests.
* **responseStatusCode (Integer):** The HTTP status code of the response (such as, 200, 201, 403, 500).<br>

***

### Generate RAG Answer

**Description:** The Generate RAG Answer action sends a user query to Aisera's RAG (Retrieval-Augmented Generation) service to generate an AI-powered contextual answer. The service searches through your organization's knowledge base and returns a relevant, accurate response. Also, response is post-processed to ensure all URLs (images and hyperlinks) are correctly formatted for your tenant, and any disclaimers are automatically appended.

This action connects to an internal Aisera service and does not require an external system integration.

**Input:**

* **payload (String, Required):** A JSON payload containing the user's query and configuration parameters.&#x20;

#### **Payload Structure**

| Field             | Type    | Required | Description                                                  |
| ----------------- | ------- | -------- | ------------------------------------------------------------ |
| query             | String  | Yes      | The user's question to be answered by RAG                    |
| parameters        | Object  | Yes      | Configuration parameters for the request                     |
| parameters.tenant | String  | Yes      | The tenant identifier where the query is executed            |
| parameters.bot    | Integer | Yes      | The bot ID containing the knowledge base documents to search |

Example payload:

```
{
  "query": "I have VPN issues",
  "parameters": {
    "tenant": "aisera",
    "bot": 50
  }
}
```

\
Tip: Use a JavaScript node before this action to dynamically construct the payload from existing variables.

* **botId (Long, Optional):** The bot identifier. Only used in tenant-level flows when the bot ID is not already available in the execution context – e.g., 50

**Configuration Parameters:** This action has no configuration parameters.

**Output:**&#x20;

* **success (Boolean):** Indicates whether the RAG answer generation request was successful.
* **response (String):** The generated AI answer, including any appended disclaimers
* **mapResponse (Map):** The full response from the RAG service represented as a map, useful for extracting individual response fields programmatically.<br>

***

### Send Notification

**Description:** The Send Notification action sends notifications to users through multiple channels including email, Aisera platform channels (push notifications), and SMS. This action supports sending messages to one or multiple recipients via comma-separated email addresses. It provides flexible notification delivery options allowing you to send through specific channels only (email-only, channel-only, or SMS) or through multiple channels simultaneously. For SMS notifications, the action integrates with Twilio and can automatically retrieve the recipient's phone number from their user profile or use a manually specified phone number.

**Input:**

* **receiver (String, Required):** A comma-separated list of recipient email addresses – example: "<user1@company.com>, <user2@company.com>" or "<admin@example.com>"
* **message (String, Required):** The message content to be sent to the receiver(s). This message will be delivered through the selected notification channels – example: "Your service request has been approved" or "Reminder: Your password will expire in 3 days"
* **subject (String, Optional):** The subject line for email notifications. This parameter only affects email notifications and does not apply to channel or SMS notifications – example: "Service Request Update" or "Important System Notification"
* **channelOnly (Boolean, Optional):** When set to true, notifications are sent only through Aisera platform channels (push notifications) and not via email. Note: If both channelOnly and emailOnly are set to true, no notification will be sent – example: true false
* **emailOnly (Boolean, Optional):** When set to true, notifications are sent only via email and not through Aisera platform channels. Note: If both channelOnly and emailOnly are set to true, no notification will be sent – example: true or false
* **sendSms (Boolean, Optional):** When set to true, an SMS notification is sent to the logged-in user. The phone number is retrieved from the user's profile if available, otherwise the cellNumber parameter is used. Requires a Twilio external system integration to be configured – example: true or false
* **cellNumber (String, Optional):** The phone number to send SMS notifications to. This is used as a fallback if the user's profile does not contain a cell phone number, or can be used to override the profile phone number. Required format depends on Twilio requirements (typically includes country code) – example: "+14155551234" or "+442071234567"
* **botId (Number, Optional):** Specifies the bot ID to use for sending channel notifications. If not provided, the action uses the universal bot ID from the execution context, or falls back to the standard bot ID from the context – example: 12345 or 67890
* **smsIntegrationId (Number, Optional):** The external system ID of the specific Twilio integration to use for sending SMS. If not provided, the action uses the first available Twilio integration configured for the tenant – example: 100 or 250

**Configuration Parameters:** No configuration parameters are required. However, for SMS functionality to work, a Twilio External System integration must be configured in the Aisera platform

**Output:** No outputs are returned by this action.

***

### Fetch LLM Chat Answer V2

**Description:** Sends requests to Aisera's LLM (Large Language Model) Gateway to generate AI-powered responses. This enhanced action supports text-based prompts, conversation history, and image inputs, making it suitable for building advanced conversational AI workflows, chatbots, and intelligent automation scenarios. Use this action when you need to leverage generative AI capabilities within your workflow to answer questions, analyze content, process images, or continue multi-turn conversations.

**Recommended action:** This is the enhanced version of Fetch LLM Answer Action. Use Fetch LLM Chat Answer V2 for new workflows as it provides advanced capabilities including image processing, conversation history, and granular message control.

**Input:**&#x20;

* **systemPrompt (String, Optional):** The system-level instruction that sets the behavior, tone, and context for the LLM. This prompt guides how the AI should respond to user requests - example : "You are a helpful IT support assistant" or "You are an expert in analyzing financial data".
* **userRequest (String, Optional):** The current user's question or request as plain text. This is the primary input that the LLM will respond to - example : "What is the status of my service request?" or "Explain how to reset my password".
* **imageContent (String, Optional):** A single image to be analyzed by the LLM. Can be either a publicly accessible image URL or base64-encoded image data. The LLM will process this image along with text prompts - example : "<https://media.istockphoto.com/id/814423752/de/foto/auge-des-modells-mit-bunten-kunst-make-up-close-up.jpg?s=2048x2048\\&w=is\\&k=20\\&c=qPTgbu\\_LtrwAf6Ee7FjGfGrCxkdVgmQIvaoJNY-lMcI=>"
* **imageAttachments (List, Optional):** Image attachment metadata from a file upload variable. Provide this when users have uploaded images through a file upload action. The action will extract the file URIs and send them to the LLM for analysis. Select the desired attachments to be added from the available variables in the dropdown. - example :  attachmentVar1
* **conversationHistory (JSONArray, Optional):** A stringified JSON array representing previous conversation turns. Can be found in existing variables under conversationContext. Use this to maintain context across multiple LLM calls - example : '\[{"role":"user","content":"Hello"},{"role":"assistant","content":"Hi, how can I help?"}]'
* **extraMessages (JSONArray, Optional):** Additional messages to append to the conversation as a stringified JSON array. Each message should include "role" and "content" fields. Use this to inject additional context or instructions that should appear after the main user request - example : '\[{"role":"user","content":"Please format as JSON"}]'
* **configParams (Map\<String, Object>, Optional):** Advanced configuration parameters for the LLM request provided as a Map. Use this to control LLM behavior such as temperature, max tokens, top\_p, or other model-specific settings. Lower temperature values (0.2-0.5) in configParams produce more focused, deterministic responses. Higher values (0.7-1.0) produce more creative, varied responses. - example : {"temperature": 0.7, "max\_tokens": 500}.
* **botId (Long, Optional):** The bot ID to associate with this LLM request. If not provided, use the bot ID from the execution context. Use this to override the default bot configuration for multi-bot scenarios. - example : 5

**Configuration Parameters:** No configuration parameters are required.

**Output:**&#x20;

* **success (Boolean):** Indicates whether the LLM request was successful. Returns true if the LLM Gateway returned a valid response (HTTP 200), false otherwise. Use this to branch your workflow based on success or failure.
* **responseMessage (String):** The generated response text from the LLM. This contains the AI-generated answer, analysis, or completion based on the provided prompts and context. Use this variable in subsequent actions to display the response to users or process it further. - example : For systemPrompt -> “You are a helpful IT support assistant” and userRequest -> “What is vpn?” , an example response is : “A VPN (Virtual Private Network) is a technology that creates a secure and encrypted connection between your device and a remote server over the internet. It allows you to browse the web privately and securely by masking your IP address and encrypting your internet traffic.&#x20;

**VPNs are commonly used for:**&#x20;

1\. \*\*Privacy and Security\*\*: Protecting your online activities from hackers, ISPs, or other third parties, especially when using public Wi-Fi networks.

2\. \*\*Accessing Restricted Content\*\*: Bypassing geo-restrictions to access websites, streaming services, or content that may be blocked in your region.

3\. \*\*Remote Work\*\*: Allowing employees to securely access company resources and networks from anywhere.

4\. \*\*Anonymity\*\*: Hiding your online identity and location to prevent tracking.

VPNs work by routing your internet traffic through a server in a location of your choice, making it appear as though you're browsing from that location. Popular VPN providers include NordVPN, ExpressVPN, and CyberGhost, among others.”

<br>
