# Upload CSV To Ticket

This reusable workflow lets MSPs automatically attach CSV files to tickets in ConnectWise PSA, Datto Autotask, or HaloPSA using a standardized method. It takes a CSV file and ticket ID, identifies the correct PSA, and runs the right API calls to upload the attachment. MSPs can use it to add reports like compliance scans, inventories, or license data—removing the need for manual uploads and keeping ticket documentation consistent across platforms.

This workflow contains 7 tasks.

### Inputs

* **psa** - string
  * Defaults to organization varilable `default_psa` if not provided.
* **file** - string
* **title** - string
* **ticket\_id** - string (Required)
* **attachment\_name** - string (Required)

### Outputs

* **automation\_log**: Standardized Rewst automation log

### Key tasks

* **cw\_psa\_upload\_csv\_to\_ticket**: Workflows integration: \[REWST - TASK] PSA-CWM: Upload Document to Ticket
* **FAILED**: Core integration: noop
* **datto\_upload\_csv\_to\_ticket**: Datto Autotask PSA integration: Datto PSA API Request
* **halo\_psa\_add\_or\_update\_attachments**: Data modification
* **select\_psa**: Core integration: noop

### Jinja examples

#### Example 1

```jinja
{{- CTX.ticket_id -}}
```

Used in input parameter 'record\_id' on the ConnectWise PSA task.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.rewst.help/documentation/automations/subworkflows/upload-csv-to-ticket.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
