slackr_upload: Send a file to Slack

View source: R/slackr_upload.R

slackr_uploadR Documentation

Send a file to Slack

Description

slackr_upload enables you upload files to Slack and (optionally) post them to one or more channels (if channels is not empty).

Usage

slackr_upload(
  filename,
  title = NULL,
  initial_comment = NULL,
  channels = Sys.getenv("SLACK_CHANNEL"),
  token = Sys.getenv("SLACK_TOKEN"),
  thread_ts = NULL
)

Arguments

filename

path to file.

title

Title of file.

initial_comment

The message text introducing the file in specified channels.

channels

Comma-separated list of channel names or IDs where the file will be shared.

token

Authentication token bearing required scopes.

thread_ts

Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead.

Value

httr response object from POST call (invisibly)

httr response object from POST call (invisibly)

Author(s)

Quinn Weber (ctb), Bob Rudis (aut)

References

https://github.com/mrkaye97/slackr/pull/15/files

See Also

slackr_setup(), slackr_dev(), slackr_save()


hrbrmstr/slackr documentation built on Nov. 10, 2023, 5:32 p.m.