# Daytona

> Run code safely in Daytona sandboxes from a workflow: spin up an isolated computer in seconds, run Python, JavaScript, TypeScript or any command in it, move files in and out, clone a repository, share a preview link to an app running inside, and stop, archive or delete it when the job is done.

App · Cloud Computing · 15 actions. Web page: https://docs.lodol.com/docs/integrations/daytona

## Actions

### Archive a sandbox

Move a sandbox's files to cheaper storage, stopping it first if it is running. Starting it later brings everything back. A large sandbox may still say 'archiving' when the step ends; Daytona finishes on its own.

**Inputs**

- Sandbox (`sandbox`, text, required): Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A sandbox's name or ID also works.

**Outputs**

- `auto_stop_minutes` (number)
- `cpu` (number)
- `created_at` (text)
- `delete_at` (text)
- `delete_when_stopped` (true/false)
- `disk_gb` (number)
- `error_reason` (text)
- `id` (text)
- `labels` (object)
- `last_activity_at` (text)
- `memory_gb` (number)
- `name` (text)
- `region` (text)
- `snapshot` (text)
- `state` (text)

**Example output**

```json
{
  "auto_stop_minutes": 15,
  "cpu": 1,
  "created_at": "2026-09-23T09:00:00.000Z",
  "delete_at": null,
  "delete_when_stopped": false,
  "disk_gb": 3,
  "error_reason": null,
  "id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "labels": {
    "project": "reports"
  },
  "last_activity_at": "2026-09-23T09:00:04.000Z",
  "memory_gb": 1,
  "name": "report-builder",
  "region": "us",
  "snapshot": "daytona-small",
  "state": "archived"
}
```

### Clone a Git repository

Copy a Git repository into a sandbox, from GitHub, GitLab or any Git host, so later steps can build, test or read it.

**Inputs**

- Sandbox (`sandbox`, text, required): Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
- Repository URL (`url`, text, required): The repository's https address.
- Clone into folder (`folder`, text): Where to put it in the sandbox. Leave blank to use the repository's name.
- Branch (`branch`, text): Leave blank for the repository's default branch.
- Access token (`access_token`, text): Only for a private repository: a token that can read it, such as a GitHub personal access token.
- Username (`username`, text): Only if your Git host needs one with the token, as Bitbucket does. GitHub and GitLab don't.

**Outputs**

- `branch` (text)
- `folder` (text)
- `sandbox_id` (text)
- `url` (text)

**Example output**

```json
{
  "branch": null,
  "folder": "Hello-World",
  "sandbox_id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "url": "https://github.com/octocat/Hello-World.git"
}
```

### Create a sandbox

Create a sandbox and wait until it is running, ready for code, commands and files. By default it stops after 15 idle minutes and keeps its files until you delete it.

**Inputs**

- Name (`name`, text): A name to find it by, unique in your organization. Leave blank and Daytona names it after its ID.
- Snapshot (`snapshot`, text): What the sandbox starts from. Leave blank for Daytona's default, with Python and Node.js, 1 CPU, 1 GB of memory and 3 GB of disk.
- Stop when idle for (minutes) (`auto_stop_minutes`, number): Stop the sandbox after this many minutes with nothing happening in it, so it stops using compute. Its files are kept. 0 keeps it running. 15 if left blank. At least 0.
- Delete when it stops (`delete_when_stopped`, true/false): Delete the sandbox, files and all, as soon as it stops. Good for one-off jobs. Default: `false`.
- Delete after (minutes) (`delete_after_minutes`, number): Delete the sandbox this many minutes after it is created, whatever it is doing. A safety net for jobs that might not clean up. Leave blank for no limit. At least 1.
- Environment variables (`env_vars`, object): Names and values every program in the sandbox can read. Names use letters, digits and underscores.
- Labels (`labels`, object): Tags to find the sandbox by later: 'List sandboxes' can filter by them.

**Outputs**

- `auto_stop_minutes` (number)
- `cpu` (number)
- `created_at` (text)
- `delete_at` (text)
- `delete_when_stopped` (true/false)
- `disk_gb` (number)
- `error_reason` (text)
- `id` (text)
- `labels` (object)
- `last_activity_at` (text)
- `memory_gb` (number)
- `name` (text)
- `region` (text)
- `snapshot` (text)
- `state` (text)

**Example output**

```json
{
  "auto_stop_minutes": 15,
  "cpu": 1,
  "created_at": "2026-09-23T09:00:00.000Z",
  "delete_at": null,
  "delete_when_stopped": false,
  "disk_gb": 3,
  "error_reason": null,
  "id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "labels": {
    "project": "reports"
  },
  "last_activity_at": "2026-09-23T09:00:04.000Z",
  "memory_gb": 1,
  "name": "report-builder",
  "region": "us",
  "snapshot": "daytona-small",
  "state": "started"
}
```

### Delete a sandbox

Delete a sandbox and everything in it. This can't be undone. If it is starting or stopping, the step waits for that to finish.

**Inputs**

- Sandbox (`sandbox`, text, required): Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A sandbox's name or ID also works.

**Outputs**

- `deleted` (true/false)
- `id` (text)
- `name` (text)

**Example output**

```json
{
  "deleted": true,
  "id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "name": "report-builder"
}
```

### Download a file

Get a file out of a sandbox, such as a report or chart your code made, as a file later steps can send or store. A text file up to 1 MB also comes back as 'text'.

**Inputs**

- Sandbox (`sandbox`, text, required): Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
- File path (`path`, text, required): The file's path in the sandbox, such as report.md. A path that doesn't start with / is inside the working folder.

**Outputs**

- `content_type` (text)
- `document_ref` (text)
- `documents` (list)
- `download_url` (text)
- `filename` (text)
- `path` (text)
- `sandbox_id` (text)
- `size_bytes` (number)
- `text` (text)

**Example output**

```json
{
  "content_type": "text/markdown",
  "document_ref": "doc_7f0c2b9e4a1d",
  "documents": [],
  "download_url": "/actions/core/serve-document/doc_7f0c2b9e4a1d",
  "filename": "report.md",
  "path": "report.md",
  "sandbox_id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "size_bytes": 31,
  "text": "# Weekly report\n\nAll green.\n"
}
```

### Get a preview link

A link anyone can open to see an app or site running in a sandbox, such as a web server started with 'Run a command'. The sandbox must be running for the page to load.

**Inputs**

- Sandbox (`sandbox`, text, required): Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A sandbox's name or ID also works.
- Port (`port`, number, required): The port the app listens on inside the sandbox. From 1 to 65535.
- Link lasts (minutes) (`expires_in_minutes`, number): How long the link works, up to 1440 (a day). 60 if left blank. From 1 to 1440.

**Outputs**

- `expires_at` (text)
- `port` (number)
- `sandbox_id` (text)
- `url` (text)

**Example output**

```json
{
  "expires_at": "2026-09-23T10:00:00Z",
  "port": 3000,
  "sandbox_id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "url": "https://3000-k2m9x7q4w8r1t5yb.proxy.daytona.works"
}
```

### Get a sandbox

One sandbox: whether it is running, its resources, labels and when it stops or deletes itself.

**Inputs**

- Sandbox (`sandbox`, text, required): Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A sandbox's name or ID also works.

**Outputs**

- `auto_stop_minutes` (number)
- `cpu` (number)
- `created_at` (text)
- `delete_at` (text)
- `delete_when_stopped` (true/false)
- `disk_gb` (number)
- `error_reason` (text)
- `id` (text)
- `labels` (object)
- `last_activity_at` (text)
- `memory_gb` (number)
- `name` (text)
- `region` (text)
- `snapshot` (text)
- `state` (text)

**Example output**

```json
{
  "auto_stop_minutes": 15,
  "cpu": 1,
  "created_at": "2026-09-23T09:00:00.000Z",
  "delete_at": null,
  "delete_when_stopped": false,
  "disk_gb": 3,
  "error_reason": null,
  "id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "labels": {
    "project": "reports"
  },
  "last_activity_at": "2026-09-23T09:00:04.000Z",
  "memory_gb": 1,
  "name": "report-builder",
  "region": "us",
  "snapshot": "daytona-small",
  "state": "started"
}
```

### List files

The files and folders in one folder of a sandbox, folders first.

**Inputs**

- Sandbox (`sandbox`, text, required): Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
- Folder (`folder`, text): The folder to list, such as data. Leave blank for the sandbox's working folder.

**Outputs**

- `count` (number)
- `files` (list)
- `folder` (text)
- `sandbox_id` (text)

**Example output**

```json
{
  "count": 2,
  "files": [
    {
      "is_folder": true,
      "modified_at": "2026-09-23T09:01:00Z",
      "name": "data",
      "path": "/home/daytona/data",
      "size_bytes": 4096
    },
    {
      "is_folder": false,
      "modified_at": "2026-09-23T09:02:00Z",
      "name": "report.md",
      "path": "/home/daytona/report.md",
      "size_bytes": 31
    }
  ],
  "folder": "",
  "sandbox_id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65"
}
```

### List sandboxes

The sandboxes in your organization, newest first, optionally only those in some states, with some labels or whose name starts a certain way. Deleted sandboxes are not listed.

**Inputs**

- State (`states`, list): Only sandboxes in these states. Leave empty for all. One or more of: `started` (Running), `stopped`, `paused`, `archived`, `error`.
- Labels (`labels`, object): Only sandboxes that have all of these labels.
- Name starts with (`name`, text): Only sandboxes whose name starts with this text.
- How many (`limit`, number): At most this many, up to 200. 100 if left blank. From 1 to 200.
- Next page (`cursor`, text): To get the next page, use the 'next_cursor' an earlier 'List sandboxes' step returned.

**Outputs**

- `count` (number)
- `next_cursor` (text)
- `sandboxes` (list)

**Example output**

```json
{
  "count": 1,
  "next_cursor": null,
  "sandboxes": [
    {
      "auto_stop_minutes": 15,
      "cpu": 1,
      "created_at": "2026-09-23T09:00:00.000Z",
      "delete_at": null,
      "delete_when_stopped": false,
      "disk_gb": 3,
      "error_reason": null,
      "id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
      "labels": {
        "project": "reports"
      },
      "last_activity_at": "2026-09-23T09:00:04.000Z",
      "memory_gb": 1,
      "name": "report-builder",
      "region": "us",
      "snapshot": "daytona-small",
      "state": "started"
    }
  ]
}
```

### Run a command

Run a shell command in a sandbox, such as installing a package or running tests, and get its output. A command that fails still returns its output, with 'succeeded' false.

**Inputs**

- Sandbox (`sandbox`, text, required): Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
- Command (`command`, text, required): The command, as you would type it in a terminal. Chain several with &&.
- Run in folder (`folder`, text): The folder to run it in, such as a cloned repository's. Leave blank for the sandbox's working folder.
- Environment variables (`env_vars`, object): Names and values it can read, such as an API key it needs. Names use letters, digits and underscores.
- Time limit (seconds) (`timeout_seconds`, number): Stop it if it is still running after this long, up to 600 (10 minutes). 60 if left blank. From 1 to 600.

**Outputs**

- `exit_code` (number)
- `output` (text)
- `sandbox_id` (text)
- `succeeded` (true/false)

**Example output**

```json
{
  "exit_code": 0,
  "output": "12 passed in 1.84s\n",
  "sandbox_id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "succeeded": true
}
```

### Run code

Run Python, JavaScript or TypeScript in a sandbox and get what it printed. Code that fails still returns its output, with 'succeeded' false, so a later step can act on it.

**Inputs**

- Sandbox (`sandbox`, text, required): Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
- Language (`language`, text): The language the code is written in. One of: `python`, `javascript`, `typescript`. Default: `python`.
- Code (`code`, text, required): The code to run. Whatever it prints comes back as 'output'.
- Environment variables (`env_vars`, object): Names and values it can read, such as an API key it needs. Names use letters, digits and underscores.
- Time limit (seconds) (`timeout_seconds`, number): Stop it if it is still running after this long, up to 600 (10 minutes). 60 if left blank. From 1 to 600.

**Outputs**

- `charts` (list)
- `exit_code` (number)
- `output` (text)
- `sandbox_id` (text)
- `succeeded` (true/false)

**Example output**

```json
{
  "charts": [],
  "exit_code": 0,
  "output": "Total revenue: 48210\n",
  "sandbox_id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "succeeded": true
}
```

### Start a sandbox

Start a stopped or archived sandbox and wait until it is running. A running sandbox is left as it is.

**Inputs**

- Sandbox (`sandbox`, text, required): Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A sandbox's name or ID also works.

**Outputs**

- `auto_stop_minutes` (number)
- `cpu` (number)
- `created_at` (text)
- `delete_at` (text)
- `delete_when_stopped` (true/false)
- `disk_gb` (number)
- `error_reason` (text)
- `id` (text)
- `labels` (object)
- `last_activity_at` (text)
- `memory_gb` (number)
- `name` (text)
- `region` (text)
- `snapshot` (text)
- `state` (text)

**Example output**

```json
{
  "auto_stop_minutes": 15,
  "cpu": 1,
  "created_at": "2026-09-23T09:00:00.000Z",
  "delete_at": null,
  "delete_when_stopped": false,
  "disk_gb": 3,
  "error_reason": null,
  "id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "labels": {
    "project": "reports"
  },
  "last_activity_at": "2026-09-23T09:00:04.000Z",
  "memory_gb": 1,
  "name": "report-builder",
  "region": "us",
  "snapshot": "daytona-small",
  "state": "started"
}
```

### Stop a sandbox

Stop a sandbox and wait until it has stopped. Its files are kept, unless it is set to delete when it stops. A stopped sandbox is left as it is.

**Inputs**

- Sandbox (`sandbox`, text, required): Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A sandbox's name or ID also works.

**Outputs**

- `auto_stop_minutes` (number)
- `cpu` (number)
- `created_at` (text)
- `delete_at` (text)
- `delete_when_stopped` (true/false)
- `disk_gb` (number)
- `error_reason` (text)
- `id` (text)
- `labels` (object)
- `last_activity_at` (text)
- `memory_gb` (number)
- `name` (text)
- `region` (text)
- `snapshot` (text)
- `state` (text)

**Example output**

```json
{
  "auto_stop_minutes": 15,
  "cpu": 1,
  "created_at": "2026-09-23T09:00:00.000Z",
  "delete_at": null,
  "delete_when_stopped": false,
  "disk_gb": 3,
  "error_reason": null,
  "id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "labels": {
    "project": "reports"
  },
  "last_activity_at": "2026-09-23T09:00:04.000Z",
  "memory_gb": 1,
  "name": "report-builder",
  "region": "us",
  "snapshot": "daytona-small",
  "state": "stopped"
}
```

### Update a sandbox

Change when a sandbox stops or deletes itself, or its labels. Only the settings you fill in change.

**Inputs**

- Sandbox (`sandbox`, text, required): Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A sandbox's name or ID also works.
- Stop when idle for (minutes) (`auto_stop_minutes`, number): Stop the sandbox after this many minutes with nothing happening in it, so it stops using compute. Its files are kept. 0 keeps it running. Leave blank to keep as is. At least 0.
- Delete when it stops (`delete_when_stopped`, text): Delete the sandbox, files and all, as soon as it stops. Good for one-off jobs. Leave blank to keep as is. One of: `true` (On), `false` (Off).
- Delete after (minutes) (`delete_after_minutes`, number): Delete the sandbox this many minutes from now, whatever it is doing. 0 removes the limit. Leave blank to keep as is. At least 0.
- Labels (`labels`, object): New labels. They replace all of the sandbox's labels. Leave empty to keep them.

**Outputs**

- `auto_stop_minutes` (number)
- `cpu` (number)
- `created_at` (text)
- `delete_at` (text)
- `delete_when_stopped` (true/false)
- `disk_gb` (number)
- `error_reason` (text)
- `id` (text)
- `labels` (object)
- `last_activity_at` (text)
- `memory_gb` (number)
- `name` (text)
- `region` (text)
- `snapshot` (text)
- `state` (text)

**Example output**

```json
{
  "auto_stop_minutes": 15,
  "cpu": 1,
  "created_at": "2026-09-23T09:00:00.000Z",
  "delete_at": null,
  "delete_when_stopped": false,
  "disk_gb": 3,
  "error_reason": null,
  "id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "labels": {
    "project": "reports"
  },
  "last_activity_at": "2026-09-23T09:00:04.000Z",
  "memory_gb": 1,
  "name": "report-builder",
  "region": "us",
  "snapshot": "daytona-small",
  "state": "started"
}
```

### Upload a file

Put a file in a sandbox: upload one, use a file from an earlier step, or type its text. Folders are created as needed and a file already there is replaced.

**Inputs**

- Sandbox (`sandbox`, text, required): Pick a sandbox, or use the one an earlier 'Create a sandbox' step made. A stopped or archived sandbox is started first.
- File (`file`, text, required): Upload a file, pick one from an earlier step, or type the text to save.
- Save as (`path`, text, required): Where to save it in the sandbox, such as data/sales.csv. A path that doesn't start with / is inside the sandbox's working folder.

**Outputs**

- `path` (text)
- `sandbox_id` (text)
- `size_bytes` (number)

**Example output**

```json
{
  "path": "data/sales.csv",
  "sandbox_id": "8f3c2a1e-5b7d-4e9f-a2c6-1d0b9e8f7a65",
  "size_bytes": 2048
}
```
