Get File  (slack)
One script reply has been approved by the moderators

0 points by armanceraudfarge 119 days ago | 59 uses

One script reply has been approved by the moderators
This version of script #16 was approved by the moderators as the one that fits the best the script ask: 'Get File'. 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} file - file ID
@param: {number} count - Number of items to return per page
@param: {numb} page - number of pages to return
*/

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

  let response = await web.files.info({
    file: file,
    count: count,
    page: page,
  });

  return { "response": response };
}
edit/run in windmill raw embed
  • 0
    Why does this need "count" and "page" when the goal is to get a file by its file ID?
    by jaller94 2 days ago