Issue description
I’m using InfluxCloud and want to set up a Task that periodically monitors my data and alerts to a Slack channel. However, I’m having trouble getting the slack.message()
function to function. I cannot use it with my own webhook, and it even fails on the example code.
Steps to reproduce
Create an InfluxCloud account. Copy the example code for the slack.message()
function into a new Task (the Task options don’t matter as we’ll invoke it manually):
import "slack"
option task = {
name: "slack-test",
every: 1h,
}
slack.message(
url: "https://slack.com/api/chat.postMessage",
token: "mySuPerSecRetTokEn",
username: "Fluxtastic",
channel: "#flux",
workspace: "",
text: "This is a message from the Flux slack.message() function.",
iconEmoji: "wave",
color: "good"
)
Invoke the task manually and check its run logs.
Expected output:
Authentication errors.
Actual output:
Error exhausting result iterator; Err: type error @7:1-16:2: missing required argument iconEmoji: type error @7:1-16:2: missing required argument iconEmoji
Note that the iconEmoji
argument ("wave"
) is passed, in fact. I’m getting the same errors if I provide the function with a correct Webhook URL.