1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "slWorkspaceIdToken": "T00000000;xoxc-example;workspace-name",
12 "slChannelUrl": "https://app.slack.com/client/T00000000/C00000000",
13 "maxCount": 10,
14 "texAuVariables": {
15 "yourCompanyDescription": "Example company description",
16 "yourUsp": "Example USP"
17 },
18 "connectedAccountId": "example_connected_account_id",
19 "d": "xoxd-example",
20 "user-agent": "Mozilla/5.0 ...",
21 "txSlackUserId": "example-slack-user-id",
22 "User-Agent": "Mozilla/5.0 ...",
23 "txSmSelfProfileUrl": "example-self-profile-id",
24 "proxy": {
25 "ip": "http://proxy.example.com",
26 "port": "1080",
27 "username": "example_username",
28 "password": "example_password"
29 }
30};
31
32
33const run = await client.actor("automationagents/slack-channel-members-export").call(input);
34
35
36console.log('Results from dataset');
37console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
38const { items } = await client.dataset(run.defaultDatasetId).listItems();
39items.forEach((item) => {
40 console.dir(item);
41});
42
43