List Conversation History  (slack)
One script reply has been approved by the moderators

1 points by rossmccrann 105 days ago | 53 uses

One script reply has been approved by the moderators
This version of script #19 was approved by the moderators as the one that fits the best the script ask: 'List Conversation History'. It is safe to use in your flows in production.
0 points
by rossmccrann 105 days ago
edit by rossmccrann 105 days ago
import * as wmill from "https://deno.land/x/[email protected]/index.ts";
import { WebClient } from "https://deno.land/x/[email protected]/mod.ts";
/*
@param: {string} channel - Conversation ID to fetch history for.
*/

export async function main(
  slack_auth: wmill.Resource<"slack">,
  channel: string,
) {
  const web = new WebClient(slack_auth);

  let response = await web.conversations.history({
    channel: channel,
  });

  return { "response": response };
}
edit/run in windmill raw embed