How to write effective IT workflows in Serval
Published
To write an effective IT workflow in Serval, describe one outcome to Catalyst, Serval's automation agent, in plain English. Say what starts it, which apps it touches, what information it needs, and who has to approve. Catalyst drafts the workflow as TypeScript and saves it as a draft. You test it, check the summary or the code, and publish it. If it's a help desk workflow, employees can then request it from Serval's help desk agent in Slack or Teams.
AI writes the workflow, and the published code does the work. A published Serval workflow runs as the TypeScript you published, and a model only takes part in a run if the workflow has a step that calls one.
This guide is for IT admins and engineers who build workflows in Serval and want them to run the same way on the hundredth request as on the first. For how plain-English automation works in general, see Natural language workflow automation for enterprise IT teams.
What should you include when you describe a workflow to Catalyst?
A good prompt reads like a short spec. Include:
- The outcome, in one sentence
- What starts it: an employee request, a schedule, a webhook, or a Serval event
- The apps involved, by name (Okta, Google Workspace, Slack, GitHub)
- The information the workflow needs from the requester
- Who approves, and at which step
- Who gets told when it's done, and where
Serval's own prompting tips add two habits worth keeping. Reference an existing workflow with @ when you want to change it ("Update the @password-reset workflow to also notify the security channel"). And ask Catalyst to search installable workflows before it writes one from scratch.
Example prompts:
- "Reset a user's password in Okta and send them a Slack DM with next steps. Log what happened on the ticket."
- "Every Monday at 9am Pacific, list open tickets older than 7 days and post a summary to #it-ops."
- "When a contractor joins Payments, create their Google Workspace account, add them to the payments Slack group, and get manager approval before granting database access."
Start small. Get the core path working first. Then add to it in the same chat: "Add an approval step before the Okta group assignment" or "Also post to #it-ops when the workflow finishes."
Which workflow type should you pick?
Each Serval workflow has one type, and the type decides what starts it. Pick it before you write any logic.
| Type | What starts it | Use it for |
|---|---|---|
| Help desk | An employee's request to the help desk agent | Password resets, software requests |
| Workspace-only | A member of your Serval workspace | Offboarding, admin tasks |
| Scheduled | A cron schedule in a time zone you set | Reports, audits, cleanup |
| Webhook | An HTTP POST from another system | Alerts, external form submissions |
| Event | A Serval event, such as a new ticket | Tagging, routing, follow-ups |
| Access provisioning or deprovisioning | An approved or revoked access request | Granting and removing app access |
| Custom approval | An approval step that needs logic | Auto-approve or route by request details |
| Ingestion or knowledge ingestion | A sync from a connected app | Filling asset tables or the knowledge base |
Keep each workflow narrow. A password reset and a software install should be two workflows. Each is then easier to test and update when a policy changes. When two workflows share steps, put the shared part in a child workflow and call it from both, so the same logic can run from different triggers.
Should you start from an installable workflow?
Start from one whenever it covers most of what you need. Installable workflows are pre-built automations for apps you've connected. For Okta they include creating, suspending, and deactivating users, managing group membership, and assigning apps. For Google Workspace they include creating users, managing groups, and adding Gmail delegates. When you install one, you choose who can request it and which approval its runs need, and you can keep customizing it in plain English.
That gives you Okta and Google Workspace workflows you can keep changing in plain English. Okta Workflows, Okta's own automation product, is a no-code builder with templates, pre-built connectors, and a Connector Builder. Unlike its click-based flows, an installed Serval workflow is TypeScript you can open and edit, and it runs against Okta through Serval's integration. Google's Workspace Studio builds flows from a plain-language Gemini prompt, across Workspace apps and, in beta, third-party apps like Salesforce.
Serval has 140+ pre-built integrations, and workflows can call other apps through their APIs.
What inputs should a workflow ask for?
Inputs are the details a workflow needs before it runs, like an email address, a start date, or an app role. Catalyst sets them up from your description, and you can adjust them afterward:
- Use dropdowns for any fixed set of values, such as department or environment, so the downstream app gets consistent data.
- Use a record picker when the options live in a Serval assets table, so requesters choose a real cost center or location.
- Mark each field required or optional, and give it a one-line description.
- Show a field only when an earlier answer makes it relevant.
- When the workflow acts on a person, use a Target User input, so the requester picks a colleague from a list.
The help desk agent can collect inputs in conversation. For sensitive workflows, turn on the setting that collects them in a form the requester reviews and confirms before the run starts. You can also list a workflow in the Service Catalog so employees can find it on their own.
How do you route approvals to the right people?
Serval approvals are built from steps, and in each step you can add:
- Specific users
- A group, with an optional quorum such as "2 of 5 must approve"
- The requester's manager
- A custom approval workflow that approves, denies, or routes based on your own rules
You decide per step whether all approvers must approve or any one can. You can add backup approvers, who aren't notified but can still approve, and require approvers to write a justification. If one person is the only approver on a step, Serval requires self-approval on for that step, so a request they submit doesn't get stuck. A workflow can also pause partway through for approval and continue once it's approved.
To send access requests to different approvers depending on the app, use access policies. You apply a policy to app roles, and its approvers can include the owners of the requested app, resource, or role. One policy can then cover many apps while each request goes to the owners of the app being requested.
Prefer groups and shared approval procedures over named people. When your team changes, you update the group or the procedure once, and new requests on every workflow that uses it pick up the change.
How do admins and engineers share one workflow?
Admins write in plain English and engineers edit the code, on the same workflow. Admins describe it to Catalyst and refine it in chat. Engineers open the generated TypeScript in the workflow tab and edit it directly, or use the Serval CLI to pull workflows into local files, keep them in Git, and push changes back.
That split is how Mercor works: its Head of IT builds in natural language while the exact code sits in a sidebar to check, and Mercor has onboarded 4,000+ contractors with a Slack-started Serval workflow.
Other platforms pair the two as well. Microsoft Power Automate's Copilot creates cloud flows from a natural-language description, and its designer has a Code View for each step. ServiceNow's Flow Designer generates flows from text inputs, and its App Engine has admins build in ServiceNow Studio with built-in AI, while pro developers work in the ServiceNow IDE and tools like Cursor and Claude Code connect through the Build Agent SDK. In Serval, the workflow is the TypeScript itself, so engineers review it, keep it in Git through the CLI, and edit it directly.
How do you test and debug a workflow before you publish it?
After Catalyst builds a workflow, it offers to test it, and the test only runs when you agree. Use realistic inputs. Include a case that should be denied.
Every run is logged in run history with who or what triggered it and, for each step, its status, input, output, and any error. When a run fails, select Investigate in Catalyst on the run, or ask Catalyst "Why did this workflow fail?" Catalyst reads the run's steps, finds the failed step, and can suggest a fix. Serval's debugging guide lists the usual causes: expired credentials, missing resources, permission gaps, and rate limits.
Test event-triggered workflows with extra care. A workflow that reacts to ticket activity and also changes tickets can set off a loop.
What happens when you publish a workflow?
A draft isn't available to the help desk agent until someone publishes it. If you want a second pair of eyes on Catalyst's changes, workspace managers can turn on Require approval before publishing, an opt-in setting that sends Catalyst's changes through a review your chosen approvers sign off on.
Version history shows each published version, when it was published, and who published it. Restoring an older version makes it your working draft. The live workflow doesn't change until you publish that draft.
When should you review a published workflow?
Workflows encode your process at a point in time. Policies drift. Review them when your org chart, access policies, or connected apps change. Check approval assignments first, then the rules behind each branch, and remove branches nobody uses. The workflow list shows each workflow's recent run health, so the ones that have started failing stand out.
When should you choose Serval?
Choose Serval when you want IT admins to build workflows in plain English, engineers to review and version the TypeScript, and every request to run the same published code with the approvals your policy needs.
FAQ
How do I write a good workflow prompt in Serval?
Describe one outcome to Catalyst and include what starts the workflow, the apps it uses, the inputs it needs, who approves, and who gets notified. Start with the core path, test it, then add steps in the same chat.
Which tools can build Okta and Google Workspace workflows from a plain-English description?
In Serval, you describe the workflow to Catalyst, or install one of Serval's Okta and Google Workspace workflows and change it in plain English. Google Workspace Studio builds flows from a Gemini prompt across Workspace apps and, in beta, third-party apps like Salesforce. Okta Workflows, Okta's own automation product, builds Okta flows in a no-code editor with templates.
How do I find out why a Serval workflow failed?
Open the run in run history to see each step's status, input, output, and error, or select Investigate in Catalyst on the run. Catalyst reads the run's steps, finds the one that failed, and can suggest a fix.
How do I route access requests to different approvers depending on the app?
In Serval, apply an access policy to the app's roles and add the app, resource, or role owner as an approver. Each request then goes to the owners of the app being requested, and you can add the requester's manager or a group as another step.
Can I require a review before a Serval workflow is published?
Yes. Workspace managers can turn on Require approval before publishing, an opt-in setting that sends Catalyst's changes through a review by approvers you choose before they go live.


