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

# Send File

Upload or create a file.

**Note**: If the channel/group is private, the Blink application must be added to the channel to send files to it.

**Note**: Even if the action is `Completed`, it still might not return the correct output but the file will still be uploaded to slack.

<Note>
  External Documentation

  To learn more, visit the [Slack documentation](https://api.slack.com/methods/files.getUploadURLExternal).
</Note>

## Basic Parameters

<div className="integrations-table">
  | Parameter           | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
  | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Alt Text            | The file's image description for screen-reader.                                                                                                                                                                                                                                                                                                                                                                                                                                    |
  | Channel IDs         | A comma-separated list of channel IDs where the file will be shared. Can be obtained using the `Get Channels` action.                                                                                                                                                                                                                                                                                                                                                              |
  | Channel Names       | A comma-separated list of channel names where the file will be shared. Can be obtained using the `Get Channels` action.                                                                                                                                                                                                                                                                                                                                                            |
  | File Content        | The raw content of the file to upload.                                                                                                                                                                                                                                                                                                                                                                                                                                             |
  | File Content Source | The source of the file's content.                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
  | File Identifier     | The identifier of the file. Can be obtained by using the `Set File Variable` action.                                                                                                                                                                                                                                                                                                                                                                                               |
  | File Name           | The name of the file to upload.                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
  | File Title          | The title of the uploaded file in slack.                                                                                                                                                                                                                                                                                                                                                                                                                                           |
  | File Type           | The syntax type of the displayed file's snippet.                                                                                                                                                                                                                                                                                                                                                                                                                                   |
  | Message             | The message text attached to the file in the specified `channels`.                                                                                                                                                                                                                                                                                                                                                                                                                 |
  | Send To             | Choose the message destination from the following options:<br /><br />\* `Channel By IDs` - Target specific channels using their unique IDs.<br />\* `Channel By Names` - Target specific channels using their display names.<br />\* `Direct Message` -  Send to a specific user's direct message<br />\* `Group Chat` -  Send to multiple users in a group chat.<br /><br />*Note:* Using channel IDs is significantly **faster** than channel names and less likely to timeout. |
  | User Email          | The email address of the recipient to send the file to.                                                                                                                                                                                                                                                                                                                                                                                                                            |
  | User Emails         | A comma separated list of email addresses of users to send the file to in a group chat.                                                                                                                                                                                                                                                                                                                                                                                            |
</div>

## Advanced Parameters

<div className="integrations-table">
  | Parameter | Description                                                                                                                                                                                                                                                                                  |
  | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
  | Thread TS | Provide a message's timestamp (ts) value to upload this file as a threaded reply.<br /><br />**Restrictions**:<br />  \* This parameter cannot be used when sending the file to multiple channels.<br />  \* Using a reply's timestamp is forbidden, only the parent's timestamp is allowed. |
</div>

## Example Output

```json theme={"dark"}
{
	"ok": true,
	"file": {
		"id": "F04AUC29XRC",
		"created": 1668527744,
		"timestamp": 1668527744,
		"name": "Example file.txt",
		"title": "Example file",
		"mimetype": "text/plain",
		"filetype": "text",
		"pretty_type": "Plain Text",
		"user": "U02P2RBCW6R",
		"user_team": "T01NVABR4UW",
		"editable": true,
		"size": 8,
		"mode": "snippet",
		"is_external": false,
		"external_type": "",
		"is_public": true,
		"public_url_shared": false,
		"display_as_bot": false,
		"username": "",
		"url_private": "https://files.slack.com/files-pri/T01NVABR4UW-F04AUC29XRC/example_file.txt",
		"url_private_download": "https://files.slack.com/files-pri/T01NVABR4UW-F04AUC29XRC/download/example_file.txt",
		"permalink": "https://blinkopsworkspace.slack.com/files/U02P2RBCW6R/F04AUC29XRC/example_file.txt",
		"permalink_public": "https://slack-files.com/T01NVABR4UW-F04AUC29XRC-6f39723b19",
		"edit_link": "https://blinkopsworkspace.slack.com/files/U02P2RBCW6R/F04AUC29XRC/example_file.txt/edit",
		"preview": "ddsbdgnf",
		"preview_highlight": "<div class=\"CodeMirror cm-s-default CodeMirrorServer\" oncopy=\"if(event.clipboardData){event.clipboardData.setData('text/plain',window.getSelection().toString().replace(/\\u200b/g,''));event.preventDefault();event.stopPropagation();}\">\n<div class=\"CodeMirror-code\">\n<div><pre>ddsbdgnf</pre></div>\n</div>\n</div>\n",
		"lines": 1,
		"lines_more": 0,
		"preview_is_truncated": false,
		"comments_count": 0,
		"is_starred": false,
		"shares": {
			"public": {
				"C03L2S98MM4": [
					{
						"reply_users": [],
						"reply_users_count": 0,
						"reply_count": 0,
						"ts": "1668527744.922359",
						"channel_name": "dummy-channel3",
						"team_id": "T01NVABR4UW",
						"share_user_id": "U02P2RBCW6R"
					}
				]
			}
		},
		"channels": [
			"C03L2S98MM4"
		],
		"groups": [],
		"ims": [],
		"has_rich_preview": false,
		"file_access": "visible"
	}
}
```

## Workflow Library Example

[Send File with Slack and Send Results Via Email](https://library.blinkops.com/workflows/send-file-with-slack-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/send-file-with-slack-and-send-results-via-email/canvas" />
</div>
