> ## Documentation Index
> Fetch the complete documentation index at: https://docs.serval.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tutorial: Build automations from ticket history

> Using Catalyst to analyze ServiceNow tickets and build automations

In this tutorial, you'll use Catalyst to mine your ServiceNow ticket history for patterns and turn the top automation candidates into working Serval workflows and skills. If you don't use ServiceNow, you can replicate this tutorial with Serval ticket history or a different ITSM such as Jira Service Management or FreshService.

<Note>
  Due to the probabilistic nature of LLMs, you may see different responses from what's listed below. Follow up with refined requests as needed while following these steps.
</Note>

**Time required:** \~30 minutes\
**You'll need:** A Serval team with ServiceNow connected, and Manager or Builder permissions on that team.

***

## What you'll build

* A read-only investigation that pulls recent ServiceNow tickets and groups them by category.
* A Serval workflow that automates the most common request type Catalyst surfaces.

***

## Step 1: Connect ServiceNow (if you haven't already)

Open Catalyst from the side panel in Serval and ask:

*"Is ServiceNow connected to this team?"*

If it isn't, Catalyst will surface a Connect card. Click through the integration flow and return to the chat. Catalyst will pick up where you left off.

***

## Step 2: Ask Catalyst to analyze your ticket history

In the chat, describe what you want to accomplish:

*"Pull the last 90 days of ServiceNow incidents for our team. Group them by category and show me the top 10 most common request types, with counts and example tickets."*

Catalyst will:

* Draft a temporary read-only investigation that queries ServiceNow's incident table.
* Run it immediately (read-only investigations auto-approve).
* Return a summarized table directly in chat.

You'll see something like this:

|      Category      | Count |   Example  |
| :----------------: | :---: | :--------: |
|   Password reset   |  187  | INC0012345 |
| New laptop request |   94  | INC0012402 |
|     VPN access     |   71  | INC0012498 |
|          …         |   …   |      …     |

***

## Step 3: Pick an automation candidate

Look at the results and pick the highest-volume request that's also the most mechanical. In this example, **password reset** at 187 tickets in 90 days is the obvious starting point.

Ask Catalyst:

*"Can you build a workflow that resets a user's password in Okta and notifies them in Slack?"*

Catalyst will:

* Check whether a password reset workflow already exists in the team
* Confirm which integrations to use (Okta for the reset, Slack for the DM)
* Draft the workflow and stage it in the resource side panel

You'll see the draft appear alongside the chat with the full TypeScript visible for review.

***

## Step 4: Test the workflow before publishing

You can run draft workflows immediately inside Catalyst before publishing. Catalyst may prompt you to do so, or you can click **Run** in the resource panel. We recommend testing the workflow against a dummy user account.

To make adjustments to the workflow, describe the update in chat and Catalyst will edit the draft.

*"Update the Slack message to include a link to our password manager at passwords.example.com."*

***

## Step 5: Publish

When the draft workflow looks right, click **Publish** in the resource panel. Publishing exposes it to:

* The help desk agent (so it can run on incoming requests from Slack, Teams, email, or web)
* External triggers (scheduled runs, events, webhooks, API calls)

Until you publish, the changes only exist inside your Catalyst session, without affecting live tickets.

***

## Tips

* **Start narrow.** "Reset password in Okta" is a better first workflow than "handle all account problems." Small, focused workflows are easier to test and reuse.
* **Let Catalyst search first.** Before building, Catalyst checks for existing workflows and the installable gallery.
* **Access provisioning isn't a workflow.** If your analysis surfaces "grant access to X" requests, configure those in **Settings → Access Management**, not as a standalone workflow. Catalyst will guide you there.

***

## What's next

* Connect more sources (Jira, Zendesk, your existing knowledge base) so Catalyst can analyze across systems.
* Use Catalyst to build an analytics dashboard tracking how often each new workflow runs and how many tickets it deflects.
* Set up a background agent to re-run the analysis monthly and surface new automation candidates as your ticket mix shifts.

***

## Related links

<CardGroup cols={2}>
  <Card title="Catalyst overview" icon="bolt" href="/sections/documentation/catalyst/overview">
    What Catalyst can do
  </Card>

  <Card title="Catalyst workspace" icon="window-maximize" href="/sections/documentation/catalyst/catalyst-workspace">
    Get familiar with the Catalyst interface
  </Card>

  <Card title="Getting started" icon="rocket" href="/sections/documentation/catalyst/getting-started">
    Enable Catalyst, open your first session, and publish a change
  </Card>

  <Card title="Changes and reviews" icon="clipboard-check" href="/sections/documentation/catalyst/changes-and-reviews">
    Stage changes, propose reviews, and configure approvers
  </Card>

  <Card title="Building workflows" icon="pen" href="/sections/documentation/catalyst/building-workflows">
    Natural language prompting, manual edits, versioning
  </Card>

  <Card title="Dashboards" icon="chart-line" href="/sections/documentation/catalyst/dashboards">
    Building analytics dashboards with Catalyst
  </Card>
</CardGroup>
