1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "leads": [
10 {
11 "name": "Sarah Chen",
12 "email": "sarah.chen@acmecorp.com",
13 "jobTitle": "VP of Engineering",
14 "companyName": "Acme Corp",
15 "industry": "SaaS",
16 "services": "Cloud infrastructure management",
17 "recentNews": "Recently raised $20M Series B",
18 "painPoints": "Scaling engineering team, reducing deployment friction",
19 },
20 {
21 "name": "James Miller",
22 "email": "james@buildco.io",
23 "jobTitle": "Head of Growth",
24 "companyName": "BuildCo",
25 "industry": "Construction Technology",
26 "services": "Project management software for contractors",
27 },
28 ],
29 "openaiApiKey": "",
30 "anthropicApiKey": "",
31}
32
33
34run = client.actor("ryanclinton/ai-email-writer").call(run_input=run_input)
35
36
37print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
38for item in client.dataset(run["defaultDatasetId"]).iterate_items():
39 print(item)
40
41