#' Create a new slack channel
#'
#' @param channel channel name
#' @param token slack API token
#'
#' @return channel name as character
#' @export
#'
create_slack_channel <- function(channel,token=Sys.getenv("SLACK_API_TOKEN")){
res <- httr::POST(url="https://slack.com/api/conversations.create",
body=list( token=token,
name=tolower(channel)))
# print(httr::content(res))
# Sys.sleep(1)
invisible(channel)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.