Files
Query and delete team files.
Select
The connector will use the Slack API to filter by search criteria that refer to the Id, Created, UserId, Types, SpecificChannel, or SearchTerm columns. All columns support server-side processing for the = operator, and the Created column also supports server-side processing for the >, >=, <, <= operators.
The connector processes other search criteria client-side within the connector.
For example, the following queries are processed server side:
SELECT * FROM Files WHERE Created > '2017-01-01' AND UserId = 'U2345NDS' AND SpecificChannel = 'D71R6CSR1'
You can also filter files by querying the files' contents: Set the SearchTerm pseudocolumn in the criteria. All files containing the queried word will be retrieved. For example:
SELECT * FROM Files WHERE SearchTerm = 'text'
Insert
Slack does not allow inserting new files.
Update
Slack does not allow updating files.
Delete
Files can be deleted by providing the Id of the file.
DELETE FROM Files WHERE Id = 'F71R6DRR1'
Columns
| Name | Type | ReadOnly | References | Description |
| Id [KEY] | String | True |
The Id of the file. | |
| Name | String | True |
The name of the file, which may be null for unnamed files. | |
| Title | String | True |
The title of the file. | |
| Created | Datetime | True |
The creation date of the file. | |
| UserId | String | True |
Users.Id |
The user ID of the member that created this file. |
| Username | String | True |
The username of the file creator. | |
| InitialComment | String | True |
A comment from the file uploader, which is only set when the uploader left a comment at the time of upload. | |
| Size | Integer | True |
The filesize in bytes. Snippets are limited to a maximum file size of 1 megabyte. | |
| Filetype | String | True |
The type of the file. | |
| Mimetype | String | True |
The Mime type of the file. | |
| PrettyType | String | True |
The human-readable version of the type. | |
| CommentsCount | Integer | True |
The number of comments made on the file. | |
| Mode | String | True |
A property that contains one of hosted, external, snippet or post. | |
| PublicChannelIds | String | True |
A list of channel IDs in which the file is currently shared. | |
| GroupIds | String | True |
A list of private groups IDs in which the file is currently shared. | |
| DirectMessageIds | String | True |
A list of instant message IDs in which the file is currently shared. | |
| Editable | Boolean | True |
Indicates whether files are stored in editable mode. | |
| Permalink | String | True |
The URL that points to a single page for the file containing details, comments and a download link. | |
| PermalinkPublic | String | True |
If the file is available to the public, this URL points to the public file itself. | |
| EditLink | String | True |
The page where the file can be edited. This is available for posts and snippets. | |
| UrlPrivate | String | True |
The URL that points to the file contents. | |
| UrlPrivateDownload | String | True |
For editable-mode files, this parameter includes headers to force a browser download. | |
| Thumb480 | String | True |
The URL of a 480x480 thumbnail. | |
| IsExternal | Boolean | True |
Indicates whether the master copy of a file is stored within the system. If the file is external, then the URL property will point to the externally-hosted master file. | |
| ExternalType | String | True |
Indicates the type of external file, such as dropbox or gdoc. | |
| IsPublic | Boolean | True |
Indicates whether the file is public. | |
| PublicUrlShared | Boolean | True |
Indicates whether the file's public URL has been shared. | |
| DisplayAsBot | Boolean | True |
Indicates whether the file should be displayed as a bot. | |
| ImageExifRotation | Integer | True |
Image Exchangeable Image File Format (EXIF) Rotation. | |
| OriginalW | Integer | True |
The width dimensions of the original file. | |
| OriginalH | Integer | True |
The height dimensions of the original file. | |
| DeanimateGif | String | True |
Deanimate gif. | |
| PJpeg | String | True |
The progressive JPEG (PJpeg). | |
| IsStarred | Boolean | True |
Indicates whether the calling user has starred the file, else it is omitted. | |
| HasRichPreview | Boolean | True |
Indicates whether the file has rich preview. | |
| Thumb64 | String | True |
The URL of a 64x64 thumbnail. | |
| Thumb80 | String | True |
The URL of a 80x80 thumbnail. | |
| Thumb160 | String | True |
The URL of a 160x160 thumbnail. | |
| Thumb360 | String | True |
The URL of a 360x360 thumbnail. | |
| Thumb720 | String | True |
The URL of a 720x720 thumbnail. | |
| Thumb960 | String | True |
The URL of a 960x960 thumbnail. | |
| Thumb1024 | String | True |
The URL of a 1024x1024 thumbnail. | |
| Thumb360W | Integer | True |
The width dimensions for a 360x360 thumbnail. | |
| Thumb360H | Integer | True |
The height dimensions for a 360x360 thumbnail. | |
| Thumb480W | Integer | True |
The width dimensions for a 480x480 thumbnail. | |
| Thumb480H | Integer | True |
The height dimensions for a 480x480 thumbnail. | |
| Thumb360Gif | String | True |
An animated thumbnail. | |
| Shares | String | True |
Information about the files that are shared. | |
| PreviewIsTruncated | Boolean | True |
Indicates whether preview is truncated. | |
| Lines | Integer | True |
The total count of lines in the snippet. | |
| LinesMore | Integer | True |
A count of lines not shown in the preview. | |
| UserTeam | String | True |
The URL of a 480x480 thumbnail. | |
| Preview | String | True |
The preview of the file. | |
| PreviewHighlight | String | True |
The preview highlight of the file. |
Pseudo-Columns
Pseudo column fields are used in the WHERE clause of SELECT statements. These offer a more granular control over the tuples that are returned from the data source.
| Name | Type | Description |
| SpecificChannel | String |
Filter files appearing in a specific channel, indicated by its ID. |
| SearchTerm | String |
Filter by this column to retrieve all files that contain the word in the criteria. |
| Types | String |
Filter files by type. Allowed values are all, spaces, snippets, images, gdocs, or zips. The default value is all. The allowed values are all, spaces, snippets, images, gdocs, zips. |