1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "prospects": [
12 {
13 "name": "Sarah Connor",
14 "title": "VP of Engineering",
15 "company": "CloudScale Data",
16 "website": "https://cloudscaledata.com",
17 "industry": "SaaS & Cloud",
18 "intent_score": 85,
19 "referral_tier": "strong",
20 "signals": [
21 "Series B Funding",
22 "Hiring 10+ Engineers"
23 ]
24 },
25 {
26 "name": "Alex Vance",
27 "title": "Head of Product",
28 "company": "Finova Capital",
29 "website": "https://finovacapital.com",
30 "industry": "Fintech",
31 "intent_score": 75,
32 "referral_tier": "moderate",
33 "signals": [
34 "New Payment Gateway Launch"
35 ]
36 }
37 ]
38};
39
40
41const run = await client.actor("eternallabs/ai-cold-email-sales-outreach-writer-laya-jev-ai").call(input);
42
43
44console.log('Results from dataset');
45console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
46const { items } = await client.dataset(run.defaultDatasetId).listItems();
47items.forEach((item) => {
48 console.dir(item);
49});
50
51