Generate Workflows with AI
This feature is currently in beta. The interface and capabilities may evolve based on feedback.
Workflows Studio now features a redesigned homepage powered by AI. Instead of manually configuring every node, form, and connection from scratch, you can describe the workflow you want in plain English — and AI builds it for you.
The AI-generated Workflows homepage replaces the traditional app listing as the default landing page in Workflows Studio. When you open Workflows Studio, you're greeted with a prompt-driven interface where you can:
- Describe your workflow requirements in natural language
- Attach reference documents for additional context
- Let AI generate a complete workflow app — with forms, nodes, and logic — in seconds
You can still create apps manually using the app listing page within Workflows Studio.
Examples
Action workflow
Workflow with a cURL
Approval workflow
How It Works
Step 1: Describe Your Workflow
On the Workflows Studio homepage, you'll see a text input with the prompt: "Describe the workflow you want to create."
Type a natural-language description of the process you want to automate. Be as specific as possible — include details about:
- What data needs to be collected (form fields)
- Who should approve or review
- What actions should happen after submission
- Any conditions or branching logic
Example prompts:
You can be as detailed or as brief as you like. The AI adapts — detailed prompts give you a more precise first draft, while simple prompts let the AI infer the structure from action configurations and best practices.
Detailed prompts:
-
"Create a leave request workflow where employees fill in leave type, start date, end date, and reason. The request should go to their manager for approval. If approved, update the leave balance. If rejected, notify the employee."
-
"Build an expense reimbursement form that collects expense category, amount, receipt upload, and description. Route to finance for approval if amount exceeds 5000, otherwise auto-approve."
Simple prompts — naming the application lets the AI identify required fields from the integration's configuration:
-
"Create a leave request workflow using Workday with manager approval"
-
"Expense reimbursement via SAP SuccessFactors with finance approval"
-
"Raise an IT ticket in ServiceNow for new joiners"
-
"Employee onboarding checklist with tasks in BambooHR"
Step 2: Attach Context (Optional)
You can attach up to 10 files to provide additional context — such as existing process documents, policy PDFs, or reference screenshots. The AI uses these to better understand your requirements and generate a more accurate workflow.
Step 3: AI Generates the App
Once you submit your description:
- A new workflow app is created automatically with a name, identifier, and base configuration derived from your prompt.
- AI generates the workflow structure — including trigger nodes, input forms, approval steps, action nodes, decision logic, and end states.
- You're taken to a chat interface where you can continue refining the workflow through conversation. The AI shows a "thinking" status while processing and responds with the generated result.
Step 4: Review and Refine
After the initial generation, you can:
- Continue chatting with the AI to modify the workflow — add nodes, change form fields, adjust approval logic, or update conditions.
- Switch to the Flow Builder to visually inspect and fine-tune the generated nodes and edges on the canvas.
- Edit forms in the Form Builder to customize field types, validations, and layout.
Once satisfied, publish the app to make it available to employees.
What AI Generates
When you describe a workflow, the AI creates a fully functional draft app that includes:
Forms
Structured input forms with relevant field types — text inputs, dropdowns, date pickers, file uploads, checkboxes, and more — based on the data you described.
You don't always need to specify every form field explicitly. When your prompt names a specific application (e.g., "raise a ticket in ServiceNow" or "submit leave in Workday"), the AI reads that integration's action configuration and documentation to identify the required fields. It then suggests and adds the relevant form fields automatically — so even a simple prompt with just the application name and intent can produce a complete, well-structured form.
Workflow Nodes
The AI assembles the appropriate nodes on the Flow Builder canvas, including Trigger, Input, Approval, Action, Decision, Branch/Merge, Delay, End, and the following:
- Mapper — Maps and transforms data between nodes or external systems. Commonly used to restructure data from one format to another before passing it to an integration.
- Function — Runs custom JavaScript logic for data transformation, computation, or conditional evaluation that goes beyond what Decision nodes offer.
- Update — Modifies form data or workflow variables mid-execution without requiring a new Input node.
Edges & Logic
Connections between nodes with appropriate conditions and routing rules are generated automatically based on the logic described in your prompt.
AI-Assisted Action Node Configuration
When the AI generates an Action node that connects to an external integration (e.g., HRIS, ITSM, CRM), it doesn't just place a placeholder — it walks through the full configuration setup:
-
Application & Connection Selection The AI identifies the relevant integration application based on your prompt (e.g., Workday, ServiceNow, SAP SuccessFactors). It then asks you to select or confirm an active connection — the authenticated credential linking Leena AI to that external system.
-
Action Discovery Once the application and connection are set, the AI fetches the available actions for that integration (e.g., "Create Employee," "Submit Time Off Request," "Fetch Leave Balance") and selects the most relevant one based on your workflow description.
-
Dynamic Field Identification The AI reads the selected action's configuration and documentation to determine the exact fields required — field names, data types, required vs. optional, dropdown options, and contextual help text. It uses this information to set up the correct input fields for the Action node.
-
Auto-Fill from Workflow Context After identifying the required fields, the AI can automatically populate them using data already available in the workflow — such as form submissions from earlier nodes, global constants, or system variables. This auto-fill step maps existing workflow data to integration fields, reducing manual configuration.
-
Auto-Test Once the Action node is configured and fields are mapped, the AI automatically tests the action to verify that the connection is working and data flows correctly. You can review the test results and adjust field mappings if needed before publishing the workflow.
This means that for supported integrations, the AI handles the end-to-end setup — from picking the right app and action to mapping fields — so you spend less time on repetitive configuration.
Chat History
Every AI workflow generation session is preserved as a chat history that you can revisit and continue.
Accessing Chat History
When you navigate to an AI-generated workflow app, the chat interface loads the full conversation history from that session — including your original prompt, any follow-up refinements, and the AI's responses. Messages are loaded in reverse chronological order and paginated automatically as you scroll up to view older messages.
Resuming a Session
If you leave the chat mid-conversation, you can return to the same session later. The system automatically reconnects to the existing session associated with the app. You can pick up where you left off — send new messages to continue refining the workflow, and the AI retains the full context of the previous conversation.
Session Scope
Each AI chat session is tied to a specific workflow app. Starting a new workflow from the homepage creates a new session. You cannot merge sessions across different apps.
Switching to Manual Editing
You can switch from AI-assisted editing to the manual Flow Builder at any point by clicking "Edit manually" in the app header.
Important: Once you choose to edit a workflow manually, it is permanently detached from AI. You will not be able to regenerate or modify the workflow using the AI chat after this point. A confirmation dialog warns you before this action is taken.
Similarly, once a workflow is published, subsequent edits to the new draft follow the same rule — if you edit the draft manually, AI editing is no longer available for that version.
This restriction ensures that manually introduced changes (which the AI may not be aware of) are not accidentally overwritten by AI-driven modifications.
Tips for Better Results
-
Be specific about data fields. Instead of "collect employee details," say "collect employee name, employee ID, department, and designation."
-
Mention approvers explicitly. For example, "send to the reporting manager for approval" gives the AI clear routing instructions.
-
Describe conditions clearly. "If the amount is greater than ₹10,000, route to the finance head; otherwise, auto-approve" is much more effective than "add some approval logic."
-
Attach reference documents. If you have an existing SOP, policy document, or process flowchart, upload it. The AI uses the content to generate a more accurate workflow.
-
Iterate through chat. The first generation is a starting point. Use follow-up messages to refine — "add a notification step after approval," "make the department field a dropdown," or "add a delay of 2 days before escalation."
Limitations (Beta)
- AI-generated workflows currently support form-based (custom) apps only. Utility apps and List View apps must be created manually.
- Some advanced node types — including For Loop, While Loop, and Async Callback — are not yet supported by AI generation. To use these nodes, switch to the Flow Builder and add them manually.
- Once a workflow is published or manually edited, it can no longer be modified using the AI chat. You must use the Flow Builder and Form Builder for further changes.
- The AI generates a draft — review the workflow carefully before publishing, especially approval routing, conditions, and form validations.
- File attachments provided as context are processed for content understanding but are not embedded into the workflow itself.
FAQs
Can I edit the AI-generated workflow manually? Yes. You can switch to the Flow Builder at any time. However, once you edit manually, the workflow is detached from AI and can no longer be modified through the chat interface.
Does AI generation consume any credits or tokens? During the beta period, AI generation is included at no additional cost. This may change based on the pricing model in the general availability release.
Can I go back to the old app listing homepage? All existing apps remain accessible from the Apps listing page within Workflows Studio. You can continue to create and manage apps manually from there.
What happens if the AI doesn't understand my prompt? The AI will respond through the chat interface with clarifying questions or a best-effort attempt. You can refine your description and continue the conversation to get closer to the desired result.
Can I resume an AI chat session later? Yes. Your chat history is saved and tied to the workflow app. Navigate back to the app to reload the conversation and continue refining.
Is my data used to train the AI model? No. Your workflow descriptions and attached documents are processed in real-time to generate the workflow and are not used for model training.
Updated 28 days ago
