1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "googleAccessToken": "",
12 "googleRefreshToken": "",
13 "googleClientId": "",
14 "googleClientSecret": "",
15 "customerName": "",
16 "customerPhone": "",
17 "customerEmail": "",
18 "serviceType": "",
19 "searchCriteria": {
20 "q": "Meeting with John Doe",
21 "timeMin": "2025-08-20T00:00:00Z",
22 "timeMax": "2025-08-27T23:59:59Z",
23 "maxResults": 10,
24 "singleEvents": true,
25 "orderBy": "startTime"
26 },
27 "eventId": ""
28};
29
30
31const run = await client.actor("sambehnke/googlecalendar-cancel-appointment-tool").call(input);
32
33
34console.log('Results from dataset');
35console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
36const { items } = await client.dataset(run.defaultDatasetId).listItems();
37items.forEach((item) => {
38 console.dir(item);
39});
40
41