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

# Slack: Actions/upload File

> Attach a CSV, HTML document, JSON, Markdown, text, or completed Dataset Handle CSV to Slack using Slack-style file/content fields.

Attach a CSV, HTML document, JSON, Markdown, text, or completed Dataset Handle CSV to Slack using Slack-style file/content fields.

<Info>
  Tool ID: `slack_upload_file`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'slack_upload_file',
  {
    "channel_id": "channel_123",
    "channels": "example",
    "filename": "example"
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute slack_upload_file --input '{
  "channel_id": "channel_123",
  "channels": "example",
  "filename": "example"
}' --json
```

## Example response

The static output schema is not detailed enough to generate a reliable example. Use `deepline tools get slack_upload_file --json` for the complete live contract.

## Input reference

Slack filesUploadV2-compatible external upload. Use Slack file/content fields; Deepline materializes Dataset Handles and JSON values internally, with bounded memory and no server filesystem access. Requires files:write.

| Name                      | Type      | Required | Default | Details                                                                                                                                                                                                                                     |
| ------------------------- | --------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.channel_id`      | `string`  | No       | —       | Minimum length: 1.                                                                                                                                                                                                                          |
| `payload.channels`        | `string`  | No       | —       | Comma-separated Slack channel or user IDs. This maps to files.completeUploadExternal; do not combine with thread\_ts. Minimum length: 1.                                                                                                    |
| `payload.filename`        | `string`  | No       | —       | Slack filename, including its extension. Minimum length: 1. Maximum length: 255.                                                                                                                                                            |
| `payload.file`            | `unknown` | No       | —       | Slack file value. Provide a Dataset Handle or a \{ run\_id, path?, dataset\_id? } selector to materialize a completed Deepline dataset as CSV; any other JSON value is serialized as a file. Deepline never reads a server filesystem path. |
| `payload.content`         | `string`  | No       | —       | Slack text file contents. Use this for CSV, HTML, JSON, Markdown, or plain text. Exactly one of content or file is required. Maximum length: 37748736.                                                                                      |
| `payload.title`           | `string`  | No       | —       | Minimum length: 1. Maximum length: 255.                                                                                                                                                                                                     |
| `payload.alt_text`        | `string`  | No       | —       | Slack screen-reader description for an image file. Minimum length: 1. Maximum length: 1000.                                                                                                                                                 |
| `payload.filetype`        | `string`  | No       | —       | Slack file type identifier. Minimum length: 1. Maximum length: 255.                                                                                                                                                                         |
| `payload.highlight_type`  | `string`  | No       | —       | Slack highlight hint used when finalizing an external upload. Minimum length: 1. Maximum length: 255.                                                                                                                                       |
| `payload.snippet_type`    | `string`  | No       | —       | Slack snippet syntax identifier, such as python. Minimum length: 1. Maximum length: 255.                                                                                                                                                    |
| `payload.file_uploads`    | `array`   | No       | —       | Slack filesUploadV2 batch entries. May be combined with a top-level file or content, as in Slack's Web API client. Minimum items: 1. Maximum items: 10.                                                                                     |
| `payload.initial_comment` | `string`  | No       | —       | Optional text introducing the shared files. Minimum length: 1.                                                                                                                                                                              |
| `payload.blocks`          | `array`   | No       | —       | Maximum items: 50.                                                                                                                                                                                                                          |
| `payload.thread_ts`       | `string`  | No       | —       | Parent message timestamp. Shares the files as a thread reply; use only with the parent message timestamp. Minimum length: 1.                                                                                                                |
| `payload.username`        | `string`  | No       | —       | Optional bot display name for the file share. Requires chat:write.customize. Minimum length: 1.                                                                                                                                             |
| `payload.icon_url`        | `string`  | No       | —       | Optional bot icon URL for the file share. Requires chat:write.customize. Format: `uri`. Minimum length: 1.                                                                                                                                  |
| `payload.icon_emoji`      | `string`  | No       | —       | Optional bot emoji for the file share. Takes precedence over icon\_url and requires chat:write.customize. Minimum length: 1.                                                                                                                |

<Info>
  This input schema is too large to embed without slowing the page. Get the complete live contract with `deepline tools get slack_upload_file --json`.
</Info>

## Output reference

Standard tool result payload.

| Name          | Type     | Required | Default | Details                       |
| ------------- | -------- | -------- | ------- | ----------------------------- |
| `result.data` | `record` | Yes      | —       | Provider response payload.    |
| `result.meta` | `record` | No       | —       | Additional response metadata. |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Provider response payload.",
        "additionalProperties": {}
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata.",
        "additionalProperties": {}
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Slack provider guide](/docs/providers/slack/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
