> For the complete documentation index, see [llms.txt](https://docs.rewst.help/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rewst.help/documentation/automations/subworkflows/upload-csv-to-ticket.md).

# 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
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
