Edits history of script submission #22527 for ' Find User by Email (slack)'

  • bun
    One script reply has been approved by the moderators
    Ap­pro­ved
    import { WebClient } from "@slack/web-api";
    
    type Slack = {
      token: string;
    };
    export async function main(email: string, slack: Slack) {
      const web = new WebClient(slack.token);
    
      let response = await web.users.lookupByEmail({
        email: email,
      });
    
      return { response: response };
    }
    

    Submitted by hugo989 7 days ago