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

# Run a workflow on Citrix

> Automate apps your team opens through Citrix Workspace.

A Citrix environment is a Linux desktop with Chrome and Citrix Workspace. Use it for apps your team opens through Citrix. The workflow uses **computer use**, as on [Linux](https://docs.asteroid.ai/concepts/environments.md#linux).

> [!NOTE]
>
> Citrix needs the Startup plan or above.

## Before you start

| You need | For |
| - | - |
| Your Citrix sign-in URL | Signing in |
| A login made for the workflow | Signing in |
| The authenticator setup key, if Citrix asks for a code | [Two-factor codes](https://docs.asteroid.ai/concepts/credentials.md#two-factor-codes) |
| The app's name in your Citrix store | Opening the app |

## Set it up

**1. Create the workflow**

Pick **Citrix** when you create a workflow. To reuse one setup across workflows, open **Environments**, click **New environment** and pick **Citrix**. See [Custom environments](https://docs.asteroid.ai/concepts/environments.md#custom-environments).

**2. Add the login**

On the **Secrets** tab of the **Logins** page, add a username and password secret. Add a TOTP seed field if Citrix asks for a code. Attach the secret to a [login profile](https://docs.asteroid.ai/concepts/profiles.md).

**3. Write the instructions**

The workflow signs in to Citrix in Chrome. Opening an app downloads an `.ica` file, which starts the app in Citrix Workspace.

```
Find the patient's next appointment in Epic.

1. Open https://citrix.example.org
2. Sign in with the credentials available to you. Enter the two-factor code when asked.
3. Open the "Epic Hyperspace" app, then open the .ica file it downloads.
4. Search for {{.MRN}} and open the chart.
5. Return the date and time of the next appointment.
```

**4. Run it**

Run it from the builder. The execution page shows the desktop live and keeps a recording.

## Scripts

Citrix apps expose no controls to scripts. Scripted nodes run JavaScript (`.js`). A script runs for up to 5 minutes. Generate a two-factor code with `asteroid.generateTotp`. See [Desktop script runtime](https://docs.asteroid.ai/concepts/desktop-scripting-runtime.md).

## Networking

A Citrix environment can use a managed proxy, a custom proxy or a gateway. A gateway covers every app on the desktop, Citrix Workspace included. Use one when your Citrix sign-in page is only reachable inside your network. See [Networking](https://docs.asteroid.ai/networking/overview.md).

> [!TIP]
>
> Computer use is slower and costs more than browser use. If the app has a web version, use a Browser environment.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.