Leena AI Connector
Overview
The Leena AI connector enables your Leena AI Agents to integrate with various internal Leena AI products and services, facilitating automated workflows for notifications, case management, employee directory access, master table operations, file conversions, and more.
Leena AI is an enterprise AI platform that provides intelligent automation for HR, IT, and employee services. The Leena AI connector allows workflows to access and interact with core Leena AI services including notifications, ticketing, employee data, master tables, document management, and various utility functions.
API Details
Leena AI integrates with its internal services via REST APIs with secure inter-service authentication using shared application secrets (X-App-Secret header).
Documentation link: https://docs.leena.ai
Setup
The Leena AI connector uses internal authentication with shared application secrets for secure server-to-server communication.
Prerequisites
Before setting up the Leena AI connector, ensure you have:
- Administrator access to your Leena AI workspace
- Access to your Leena AI workspace with connector management permissions
- Appropriate permissions to configure workflow automations
Add connection
Here is how to add a connection on Leena AI:
- Log in to your Leena AI workspace
- Navigate to Settings > Integrations
- Search for "Leena AI" and select it from the list to add its new connector
- The connector is pre-configured with internal authentication and does not require additional credential setup
- Save the connection configuration
Actions
The following actions are supported for the Leena AI connector:
Send Bot Notification
Sends a notification to employees or audiences through the Leena AI bot. The Agent can leverage this action to send in-app notifications with customizable content, buttons, and scheduling options.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| To: | Select the audience type: Employees or Audience |
| Priority | Notification priority level: Low, Medium, Normal, High, or Critical |
Optional
| Name | Description |
|---|---|
| Employees Email ID | Email ID of the employee to notify (visible when To: is set to Employees) |
| Audience | Select a pre-defined audience group (visible when To: is set to Audience) |
| Subject | Subject line of the notification |
| Message | Main message content of the notification |
| Attachment URL | URL of an attachment to include with the notification |
| Long description | Enable to add extended content with title and text |
| Buttons | Add interactive buttons with types: Webview, Web URL, Quick Reply, or Callback |
| Scheduled At | Date and time to schedule the notification for later delivery |
Here is a sample JSON input:
{
"audienceType": "employees",
"emailId": "[email protected]",
"priority": "normal",
"content": {
"subject": "Policy Update Notification",
"message": "Please review the updated HR policy document.",
"attachmentUrl": "https://example.com/policy.pdf"
},
"scheduledAt": "2025-08-27T10:00:00Z"
}Response
Upon successful execution, the action returns:
- HTTP status code
- Notification delivery status
- Notification ID
Send Email Notification
Sends an email notification to employees or audiences through the Leena AI platform. This action enables automated email communications with customizable templates, attachments, and scheduling.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| To: | Select the audience type: Employees or Audience |
| Priority | Notification priority level: Low, Medium, Normal, High, or Critical |
| From email | Sender's email address |
| From name | Sender's display name |
Optional
| Name | Description |
|---|---|
| Employees Email ID | Email ID of the employee to notify (visible when To: is set to Employees) |
| Audience | Select a pre-defined audience group (visible when To: is set to Audience) |
| Body | HTML email body content using the email template editor |
| Attachments | List of attachments with filename, Base-64 content, or File URL |
| Subject | Email subject line |
| Scheduled At | Date and time to schedule the email for later delivery |
Here is a sample JSON input:
{
"audienceType": "employees",
"emailId": "[email protected]",
"priority": "normal",
"mailBody": {
"from": {
"email": "[email protected]",
"name": "HR Department"
},
"subject": "Welcome to the Team!",
"html": "<h1>Welcome!</h1><p>We're excited to have you join us.</p>",
"attachments": [
{
"filename": "onboarding-guide.pdf",
"path": "https://example.com/onboarding.pdf"
}
]
}
}Response
Upon successful execution, the action returns:
- HTTP status code
- Email delivery status
- Notification ID
Raise Ticket
Creates a new ticket in the Leena AI Case Management system. The Agent can leverage this action to raise support tickets with proper categorization, priority, and assignment.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Description | Detailed description of the issue or request |
Optional
| Name | Description |
|---|---|
| Instance | Select the ticket instance (e.g., IT Support, HR Services) |
| Category | Select the ticket category based on the chosen instance |
| Sub Category | Select the sub-category based on the chosen category |
| Raised by | Employee ID of the person raising the ticket |
| On behalf | Employee ID of the person on whose behalf the ticket is raised |
| Priority | Ticket priority: Low, Normal, or High |
| Extra fields | Additional custom fields in JSON format |
Here is a sample JSON input:
{
"instance": "60a1b2c3d4e5f6g7h8i9j0k1",
"category": {
"name": "Hardware Issues",
"subCategory": {
"name": "Laptop Problems"
}
},
"user": {
"employeeId": "EMP001"
},
"onBehalf": {
"employeeId": "EMP002"
},
"description": "Laptop screen flickering intermittently when connected to external monitor.",
"priority": "high"
}Response
Upon successful execution, the action returns:
- HTTP status code
- Created ticket details including ticket ID
- Ticket URL
Fetch details of an employee
Retrieves detailed information about a specific employee using a unique identifier such as email, employee ID, or user ID.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Type of unique attribute | Select the identifier type: Email ID, Employee ID, or User ID |
| Value of unique attribute | The value of the selected identifier |
Here is a sample JSON input:
{
"filterCriteria": "email",
"filterValue": "[email protected]"
}Response
Upon successful execution, the action returns:
- HTTP status code
- Complete employee profile including:
- Employee ID
- User ID
- Display name
- Department
- Designation
- Location
- Profile information
- Termination status
Get Employees (supports filters)
Retrieves a list of employees based on specified filter criteria. This action supports advanced filtering with multiple conditions and operators.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Filters | Array of filter conditions with key, operator, and value |
| Employee attributes to return | Comma-separated list of employee fields to include in the response |
Filter Configuration
Each filter consists of:
| Field | Description |
|---|---|
| Employee master attribute | The employee field to filter on (e.g., profile.department, designation) |
| Condition | Comparison operator: Match Any of, Equal to, Greater Than or Equal to, Less Than or Equal to, Not Equal to, Not in List, Regular Expression |
| Value | The value to compare against |
Here is a sample JSON input:
{
"filters": [
{
"key": "profile.department",
"operator": "eq",
"value": "Engineering"
},
{
"key": "profile.location",
"operator": "in",
"value": "New York,San Francisco"
}
],
"params": "displayName,email,employeeId,userId,department,designation"
}Response
Upon successful execution, the action returns:
- HTTP status code
- Array of matching employees with requested attributes
- Pagination information (count, page)
Fetch Master Table
Retrieves records from a specified Master Table in Leena AI. Master Tables are centralized data stores for business information like office locations, asset lists, or product catalogs.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Table ID | Select or enter the Master Table identifier |
Optional
| Name | Description |
|---|---|
| Filters | Array of filter conditions to narrow down results |
Filter Configuration
Each filter consists of:
| Field | Description |
|---|---|
| Column name | The column to filter on |
| Condition | Comparison operator: Equal to, Not Equal to, Contains, Less than, Less than or Equal to, Greater than, Greater than or Equal to |
| Value | The value to compare against |
Here is a sample JSON input:
{
"tableId": "master_table_12345",
"filters": [
{
"key": "Department",
"operator": "eq",
"value": "Sales"
},
{
"key": "Status",
"operator": "eq",
"value": "Active"
}
]
}Response
Upon successful execution, the action returns:
- HTTP status code
- Array of matching Master Table records
Up-sert Master Table record/s
Creates or updates records in a specified Master Table. This action performs an upsert operation—creating new records if they don't exist or updating existing ones based on the primary key.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Table Id Dynamic ? | Toggle to choose between dropdown selection or dynamic input |
| Table ID | Select or enter the Master Table identifier |
| Data | JSON object or array of objects containing the record(s) to upsert |
Here is a sample JSON input:
{
"tableId": "master_table_12345",
"body": [
{
"EmployeeID": "EMP001",
"Name": "John Doe",
"Department": "Engineering",
"Status": "Active"
},
{
"EmployeeID": "EMP002",
"Name": "Jane Smith",
"Department": "Marketing",
"Status": "Active"
}
]
}Response
Upon successful execution, the action returns:
- HTTP status code
- Array of created or updated records
Get Base 64 content
Converts a file from a URL to Base64 encoded content. This action supports both single file and multiple file conversions.
Input Parameters
Here are the input parameters required to set up this action:
Optional
| Name | Description |
|---|---|
| Multiple | Toggle to enable multiple file conversion |
| URL | File URL to convert (when Multiple is disabled) |
| URLs | Array of file URLs to convert (when Multiple is enabled) |
Here is a sample JSON input:
// Single file
{
"multi": false,
"url": "https://example.com/document.pdf"
}
// Multiple files
{
"multi": true,
"urls": [
{"url": "https://example.com/file1.pdf"},
{"url": "https://example.com/file2.png"}
]
}Response
Upon successful execution, the action returns:
- HTTP status code
- Base64 encoded content of the file(s)
Get URL from Base 64
Converts Base64 encoded content to a publicly accessible URL by uploading the file to Leena AI's storage. Supports both single and bulk file operations.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| File Mode | Select Single File or Bulk Files mode |
For Single File Mode
| Name | Description |
|---|---|
| File name | Name of the file with extension |
| Base 64 Content | Base64 encoded content of the file |
For Bulk Files Mode
| Name | Description |
|---|---|
| Bulk Files (JSON) | JSON array of files with fileName and content properties |
Here is a sample JSON input:
// Single file
{
"fileMode": "single",
"fileName": "report.pdf",
"content": "JVBERi0xLjQKJeLjz9MKMyAwIG9..."
}
// Bulk files
{
"fileMode": "bulk",
"files": [
{"fileName": "file1.pdf", "content": "JVBERi0xLjQK..."},
{"fileName": "file2.png", "content": "iVBORw0KGgo..."}
]
}Response
Upon successful execution, the action returns:
- HTTP status code
- File URL(s) for the uploaded content
- Attachment details
Sign JWT Token
Generates a signed JWT (JSON Web Token) using the specified payload, secret key, and algorithm.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Payload | JSON payload to encode in the token |
| Secret/Private Key | Secret key or private key for signing the token |
Optional
| Name | Description |
|---|---|
| Algorithm | Signing algorithm (e.g., HS256, HS384, HS512, RS256, RS384, RS512, ES256, ES384, ES512, PS256, PS384, PS512) |
Here is a sample JSON input:
{
"payload": "{\"userId\": \"12345\", \"role\": \"admin\", \"exp\": 1735689600}",
"secretOrPrivateKey": "your-secret-key-here",
"options": {
"algorithm": "HS256"
}
}Response
Upon successful execution, the action returns:
- HTTP status code
- Signed JWT token string
Generate OTP
Generates a one-time password (OTP) with configurable length, expiry, and retry limits. Creates a new OTP session for validation.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| otpLength | Length of the OTP to generate (numeric value) |
| otpExpiry | Expiry time in seconds for the OTP |
| maxOTPs | Maximum number of OTPs allowed per session |
| maxRetries | Maximum number of validation retry attempts allowed |
Here is a sample JSON input:
{
"otpLength": 6,
"otpExpiry": 300,
"maxOTPs": 3,
"maxRetries": 5
}Response
Upon successful execution, the action returns:
- HTTP status code
- Generated OTP
- Session ID for validation
Validate OTP
Validates an OTP against an active session. Checks if the provided OTP matches and is not expired.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| sessionId | The session ID returned from Generate OTP action |
| otp | The OTP value to validate |
Optional
| Name | Description |
|---|---|
| matchCriteria | OTP matching criteria: MATCH_RECENT (only validates the most recent OTP) or MATCH_ANY (validates any OTP in the session) |
Here is a sample JSON input:
{
"sessionId": "sess_abc123xyz789",
"otp": "456789",
"matchCriteria": "MATCH_RECENT"
}Response
Upon successful execution, the action returns:
- HTTP status code indicating success or failure
- Validation result message
Regenerate OTP
Generates a new OTP within an existing session. Useful when the user requests a new code without starting a fresh session.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| sessionId | The session ID from an existing OTP session |
Here is a sample JSON input:
{
"sessionId": "sess_abc123xyz789"
}Response
Upon successful execution, the action returns:
- HTTP status code
- New OTP value
JSON to Excel converter
Converts structured JSON data into an Excel (XLSX) or CSV file. Supports multiple sheets and sections with customizable layouts.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| JSON Payload | Structured JSON data containing sheets, sections, headings, and data |
| File Format | Output format: XLSX or CSV |
Here is a sample JSON input:
{
"json": {
"sheets": [
{
"name": "Employee Report",
"sections": [
{
"heading": "Active Employees",
"dataLabel": ["Name", "Department", "Email"],
"data": [
{"Name": "John Doe", "Department": "Engineering", "Email": "[email protected]"},
{"Name": "Jane Smith", "Department": "Marketing", "Email": "[email protected]"}
]
}
]
}
]
},
"fileFormat": "xlsx"
}Response
Upon successful execution, the action returns:
- HTTP status code
- Base64 encoded file content
Convert form attachment (Excel, CSV) into JSON
Converts an Excel or CSV file into structured JSON data. Supports reading files from URL or Base64 input.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| File Data (Url/Base64) | URL or Base64 encoded content of the Excel/CSV file |
| Sheet Name | Name of the sheet to read (case-sensitive) |
Optional
| Name | Description |
|---|---|
| Select Row No. to read columns | Row number to use as column headers (default: 1) |
Here is a sample JSON input:
{
"fileData": "https://example.com/spreadsheet.xlsx",
"sheetName": "Sheet1",
"headerRowNumber": 1
}Response
Upon successful execution, the action returns:
- HTTP status code
- Column labels array
- Row data as array of objects with column names as keys
Generate letter
Generates a letter/document using Leena AI's letter generation service with customizable templates and output formats.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Output type of the generated letter | Output format: Public URL or Base64 |
| Tag | Letter template tag identifier |
| Letter Body | JSON data to populate the letter template |
| Filename | Output filename with .pdf or .docx extension |
Optional
| Name | Description |
|---|---|
| Output file format as .docx | Toggle to output as .docx instead of PDF (when template is .docx) |
Here is a sample JSON input:
{
"outputType": "PUBLIC_URL",
"returnDocx": false,
"tag": "offer_letter_template",
"letterBody": {
"employeeName": "John Doe",
"position": "Software Engineer",
"startDate": "2025-09-01",
"salary": "$120,000"
},
"filename": "offer_letter_john_doe.pdf"
}Response
Upon successful execution, the action returns:
- HTTP status code
- Generated letter URL or Base64 content
Fetch Device Mappings
Retrieves device mappings for a specific employee based on their email address. Useful for IT asset management and device tracking.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Employee's email address to look up device mappings |
Here is a sample JSON input:
{
"email": "[email protected]"
}Response
Upon successful execution, the action returns:
- HTTP status code
- Array of device mappings including:
- Serial number
- Device source
- Username
- Last online timestamp
- Pagination information
Combine files (PDF, PNG, JPG) into a single PDF
Combines multiple files (PDF, PNG, JPG, and other supported formats) into a single PDF document. Supports both Field Array and JSON Array input modes.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Input Type | Choose input method: Field Array or JSON Array |
| Files | File data as URL or Base64 (format depends on Input Type selected) |
| Output File Name | Name for the combined PDF output file |
Optional
| Name | Description |
|---|---|
| Output Format | Output format: Base64 or URL |
Here is a sample JSON input:
{
"inputType": "FIELD_ARRAY",
"files": [
{"fileData": "https://example.com/page1.pdf"},
{"fileData": "https://example.com/image.png"},
{"fileData": "JVBERi0xLjQK..."}
],
"outputFileName": "combined_document.pdf",
"outputFormat": "url"
}Response
Upon successful execution, the action returns:
- HTTP status code
- File name
- Combined PDF as Base64 or URL (based on output format selection)
Convert File to PDF
Converts a file (from URL or Base64) to PDF format using Leena AI's document conversion service.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| File URL Or Base64 String | URL or Base64 encoded content of the file to convert |
Here is a sample JSON input:
{
"templateInput": "https://example.com/document.docx"
}Response
Upon successful execution, the action returns:
- HTTP status code
- Conversion success status
- Converted PDF details including:
- File type
- URL
- File name
Get QR Code For a given string
Generates a QR code image for a given input string. Supports customizable error correction levels, dimensions, and output formats.
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Input String | The text or data to encode in the QR code |
| QR Code Format | Output format: Base64 or URL |
Optional
| Name | Description |
|---|---|
| QR Code Error Correction Level | Error correction level: Low, Medium, Quartile (default), or High |
| QR Code Width | Width of the QR code in pixels (default: 200) |
| QR Code Margin | Margin around the QR code in modules (default: 4) |
Here is a sample JSON input:
{
"inputString": "https://example.com/verify?id=12345",
"errorCorrectionLevel": "Q",
"width": 300,
"margin": 4,
"qrCodeFormat": "URL"
}Response
Upon successful execution, the action returns:
- HTTP status code
- QR code image as Base64 data URL or public URL (based on format selection)
Updated 2 days ago
