Search

Upload File

Last Updated: Nov 4, 2020

Articles

Use this function to upload a given file to the slack application with the given title.

Syntax

Upload File (token, channel_id, file_path, title)

Parameters

Input Parameter Name Description
token Authentication token
channel_id ID of the channel to which file should be uploaded
file_path Path of the file to be uploaded
title The message to be uploaded with the file

Returns

Return Value Description
Output
  • On Success: 1, File ID
  • On Failure: 0, Error Message

Sample

Upload File (ABCDE, NC-45, C:/Username, New)

  • Uses the token ‘ABCDCEF’ to authenticate the connection to the Slack application, uploads the file in the path ‘C:/Invoices’ with the title ‘New’.
    Returns ‘File ID’ of the uploaded file.

To view all the Slack functions, click here.

Did you find what you were looking for?