import { WebClient } from "https://deno.land/x/slack_web_api@1.0.0/mod.ts";
type Slack = {
token: string;
};
export async function main(
message: string,
name: String,
channel: string,
slack: Slack,
) {
const web = new WebClient(slack.token);
const flow_id = Deno.env.get("WM_FLOW_JOB_ID");
const text = (message = `Flow [${flow_id}](${Deno.env.get(
"WM_BASE_URL",
)}/run/${flow_id}?workspace=${Deno.env.get(
"WM_WORKSPACE",
)}) had an error:\n${name}: ${message}`);
await web.chat.postMessage({
channel,
text,
});
return { message, flow_id };
}
Submitted by admin 497 days ago
import { WebClient } from "https://deno.land/x/slack_web_api@1.0.0/mod.ts";
type Slack = {
token: string;
};
export async function main(
message: string,
name: String,
channel: string,
slack: Slack,
) {
const web = new WebClient(slack.token);
const flow_id = Deno.env.get("WM_FLOW_JOB_ID");
const text = message = `Flow [${flow_id}](${
Deno.env.get("WM_BASE_URL")
}/run/${flow_id}?workspace=${
Deno.env.get("WM_WORKSPACE")
}) had an error:\n${name}: ${message}`;
await web.chat.postMessage({
channel,
text,
});
return { message, flow_id };
}
Submitted by admin 500 days ago
import { WebClient } from "https://deno.land/x/slack_web_api@1.0.0/mod.ts";
import type { Resource } from "https://deno.land/x/windmill@v1.85.0/mod.ts";
export async function main(
message: string,
name: String,
channel: string,
slack: Resource<"slack">,
) {
const web = new WebClient(slack.token);
const flow_id = Deno.env.get("WM_FLOW_JOB_ID");
const text = message = `Flow [${flow_id}](${
Deno.env.get("WM_BASE_URL")
}/run/${flow_id}?workspace=${
Deno.env.get("WM_WORKSPACE")
}) had an error:\n${name}: ${message}`;
await web.chat.postMessage({
channel,
text,
});
return { message, flow_id };
}
Submitted by adam186 628 days ago
import { WebClient } from "https://deno.land/x/slack_web_api@1.0.0/mod.ts";
import type { Resource } from "https://deno.land/x/windmill@v1.70.1/mod.ts";
export async function main(
message: string,
name: String,
channel: string,
slack: Resource<"slack">,
) {
const web = new WebClient(slack.token);
const flow_id = Deno.env.get("WM_FLOW_JOB_ID");
const text = message = `Flow [${flow_id}](${
Deno.env.get("WM_BASE_URL")
}/run/${flow_id}?workspace=${
Deno.env.get("WM_WORKSPACE")
}) had an error:\n${name}: ${message}`;
await web.chat.postMessage({
channel,
text,
});
return { message, flow_id };
}
Submitted by adam186 663 days ago
import { WebClient } from "https://deno.land/x/slack_web_api@1.0.0/mod.ts";
import type { Resource } from "https://deno.land/x/windmill@v1.24.1/mod.ts";
export async function main(
message: string,
name: String,
channel: string,
slack: Resource<"slack">,
) {
const web = new WebClient(slack.token);
const flow_id = Deno.env.get("WM_FLOW_JOB_ID");
const text = message = `Flow [${flow_id}](${
Deno.env.get("WM_BASE_URL")
}/run/${flow_id}?workspace=${
Deno.env.get("WM_WORKSPACE")
}) had an error:\n${name}: ${message}`;
await web.chat.postMessage({
channel,
text,
});
return { message, flow_id };
}
Submitted by rubenfiszel 692 days ago