In this article
...
Parameter Name | Data Type | Description | Default Value | Example | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Label | String |
| Upload File | Upload File | ||||||||
File | String/Expression | Required. Enter the file name or its path in SLDB or Snaplex including the file name to upload the file. The path can use either file protocol or sldb protocol. Alternatively, you can
See File Types article in Slack API documentation for a generic list of file extensions that the upload operation supports. Use the preview icon - to preview the file, when this field contains only one file path. | N/A | car.jpeg, (SLDB project folder) /Pipelines/My_Pipeline.slp (SLDB other folder) sldb:///myfolder/filename.png (SLDB full folder path) file:///snaplogic/files/name.pdf (Snaplex) ../../shared/1234.pdf (SLDB) | ||||||||
Channels | String/Expression/Suggestion | Click the icon and select a channel from the suggested values. To add more channels, enter comma-separated values manually in one of the following formats:
| N/A | #testprivate:G019B3ETYMB | ||||||||
Users | String/Expression/Suggestion | Click the icon and select a recipient from the suggested values. To add more recipients, enter comma-separated values manually in the format:
| N/A | @user.name:W01A94P7MK1 | ||||||||
File Type | String/Expression | Provide a brief description of the file and its format (extension). | N/A | jpeg | ||||||||
Initial Comment | String/Expression | Add any comments related to the file to be uploaded. | N/A | Here is the doc I was talking about. | ||||||||
Timestamp (if thread reply) | String/Expression | To upload the file in reply to a message or a message in a thread, provide the timestamp of the corresponding message. This timestamp must correspond to a message in the channel or the direct conversations with the users, as specified above. | N/A | 1601469028.000100 | ||||||||
Title | String/Expression | Enter the file name with extension in this field. It is displayed along with the uploaded file, in the Slack message. If no value is provided in this field, Slack defaults the value to the file name excluding its file extension. | N/A | car.jpeg | ||||||||
Snap Execution | Drop-down list | Select one of the three following modes in which the Snap executes:
| Execute only | Validate & Execute |
...
Uploading and Deleting Files
This example demonstrates how we can use the Upload File Snap to share files with one or more recipients. To delete a file that you have sent to another Slack user/Channel/private group, you need to use the Delete File Snap to pass the id of the file to be deleted. The same can be done for multiple files, at once.
In this example, we use the Upload File Snap to upload and share a file with members of a Channel.
...
The file is deleted and the result of this operation is displayed in the Snap output.
Downloads
Note | ||
---|---|---|
| ||
|
...