1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "requests": [
12 {
13 "action": "create",
14 "title": "Project kickoff",
15 "start": "2026-11-03T10:00",
16 "duration_minutes": 45,
17 "timezone": "Europe/London",
18 "location": "Zoom",
19 "attendees": [
20 "ana@example.com"
21 ]
22 },
23 {
24 "action": "rrule",
25 "rrule": "FREQ=WEEKLY;BYDAY=MO,WE;COUNT=5",
26 "start": "2026-11-02T09:00",
27 "timezone": "America/New_York"
28 },
29 {
30 "action": "free_slots",
31 "busy": [
32 {
33 "start": "2026-11-03T09:00",
34 "end": "2026-11-03T10:30"
35 },
36 {
37 "start": "2026-11-03T13:00",
38 "end": "2026-11-03T14:00"
39 }
40 ],
41 "from": "2026-11-03T08:00",
42 "to": "2026-11-03T18:00",
43 "duration_minutes": 60,
44 "timezone": "Europe/London"
45 }
46 ]
47};
48
49
50const run = await client.actor("tudorlane/ics-calendar-tools").call(input);
51
52
53console.log('Results from dataset');
54console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
55const { items } = await client.dataset(run.defaultDatasetId).listItems();
56items.forEach((item) => {
57 console.dir(item);
58});
59
60