PostToSlack: Post an arbitrary message to Slack

Description Usage Arguments Value References

View source: R/api.R

Description

Posts a message to Slack using Incoming Webhooks

Usage

1
2
PostToSlack(channelName, messageToPost, botName = NULL,
  webhookURL = Sys.getenv("SLACK_WEBHOOK"))

Arguments

channelName

A string of the form "@username" or "#channelname". When using "@username", log messages will be sent through Slackbot to that user. When using "#channelname", log messages will be posted to that channel as a bot.

messageToPost

A string of the message to post.

botName

A string of the name of the bot that posts. Default is NULL, which means to use the default bot name that was set up with the Incoming Webhook. See References.

webhookURL

A string of the Slack webhook URL of the form "https://hooks.slack.com/services/XXX/YYY/ZZZ". Default reads the environment variable SLACK_WEBHOOK. See References.

Value

Result of the POST call.

References

Slack documentation on setting up an Incoming Webhook


austin3dickey/slaph documentation built on May 3, 2019, 3:13 p.m.