In this article
...
Use this Snap to upload and share one or more files with a user/group/channel either directly or as a reply to a thread.
Prerequisites
A valid and active account in the Slack Workspace.
Slack Scopes required
Any action you want to perform within a Slack Workspace, additionally needs appropriate Scopes assigned to your app. See the Scope and Permissions article in Slack API documentation for the complete list and each Account page under Configuring Slack Accounts (Doc in Progress) for information on defining Scopes for your app.
...
Uploading and Deleting Files using Slack Snap Pack
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.
Upload File Snap | Output |
---|---|
Now, we connect a Search Snap to locate an uploaded file and collect the file details using a Mapper Snap.
Search Snap | Output |
---|---|
Mapper Snap | Output |
Using the id parameter captured through the Mapper Snap, we can delete the file from the Slack Channel, Private Group, or Direct Message where it has been shared.
Delete File Snap | Output |
---|---|
The file is deleted and the result of this operation is displayed in the Snap output.
...