1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = { "notifications": [
9 {
10 "text": "Deploy finished: {{service}} is live.",
11 "vars": { "service": "api" },
12 "channels": [
13 {
14 "type": "webhook",
15 "url": "https://example.com/notify",
16 },
17 {
18 "type": "slack",
19 "url": "https://hooks.slack.com/services/EXAMPLE/EXAMPLE/EXAMPLE",
20 },
21 ],
22 },
23 {
24 "text": "Daily digest ready.",
25 "channels": [{
26 "type": "discord",
27 "url": "https://discord.com/api/webhooks/EXAMPLE/EXAMPLE",
28 }],
29 },
30 ] }
31
32
33run = client.actor("kopachelli/notifyhub").call(run_input=run_input)
34
35
36print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
37for item in client.dataset(run.default_dataset_id).iterate_items():
38 print(item)
39
40