Get the Slack User ID of the caller of the windmill workflow. The user ID can be used to tag the person in the message.
1
import { WebClient } from "https://deno.land/x/[email protected]/mod.ts";
2
3
type Slack = {
4
token: string;
5
};
6
7
export async function main(
8
slack: Slack,
9
) {
10
const web = new WebClient(slack.token);
11
const email = Deno.env.get('WM_EMAIL');
12
return await web.users.lookupByEmail({
13
email
14
})
15
}