> ## 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.

> [!NOTE]
>
> Tool ID: `slack_upload_file`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
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={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute slack_upload_file --input '{
  "channel_id": "channel_123",
  "channels": "example",
  "filename": "example"
}' --json
```

## Example response

The static output schema lacks the details for a reliable example. Use `deepline describe 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 into bounded CSV attachments with row-safe truncation 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 a bounded CSV. In a Play, pass the handle directly. Deepline pages rows, retains complete rows within 50,000 rows, 500 columns, and 25 MiB, and reports omissions in meta.file\_transport. 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. |

> [!NOTE]
>
> This input schema is too large for an inline display. Read the complete live contract with `deepline describe slack_upload_file --json`.

## 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={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "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](https://deepline.com/docs/providers/slack/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


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