1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "spreadsheetId": "https://docs.google.com/spreadsheets/d/PASTE_YOUR_SHEET_ID_HERE/edit",
10 "rawRows": [
11 {
12 "id": 1,
13 "name": "Alice",
14 "address": {
15 "city": "Rome",
16 "zip": "00100",
17 },
18 "tags": [
19 "vip",
20 "newsletter",
21 ],
22 },
23 {
24 "id": 2,
25 "name": "Bob",
26 "address": {
27 "city": "Milan",
28 "zip": "20100",
29 },
30 "tags": [],
31 },
32 {
33 "id": 2,
34 "name": "Bob",
35 "address": {
36 "city": "Milan",
37 "zip": "20100",
38 },
39 "tags": [],
40 },
41 ],
42}
43
44
45run = client.actor("loris-barce/google-sheets-sync").call(run_input=run_input)
46
47
48print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
49for item in client.dataset(run.default_dataset_id).iterate_items():
50 print(item)
51
52