1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "sequencer": "instantly",
12 "campaign_id": "00000000-0000-0000-0000-000000000000",
13 "leads": [
14 {
15 "email": "jane.doe@example.com",
16 "first_name": "Jane",
17 "last_name": "Doe",
18 "company_name": "Example Inc",
19 "company_domain": "example.com",
20 "linkedin_person_url": "https://www.linkedin.com/in/example",
21 "personalization_line": "Saw you are hiring two SDRs this quarter.",
22 "icp_tier": "A",
23 "icp_score": 88
24 },
25 {
26 "email": "sam.smith@example.org",
27 "first_name": "Sam",
28 "last_name": "Smith",
29 "company_name": "Example Org",
30 "company_domain": "example.org",
31 "icp_tier": "B",
32 "icp_score": 61
33 }
34 ],
35 "dataset_id": "",
36 "min_icp_score": 0,
37 "deduplicate": false,
38 "dry_run": true,
39 "field_mapping": {},
40 "custom_variables": []
41};
42
43
44const run = await client.actor("mambalabs/clay-to-instantly-smartlead-push").call(input);
45
46
47console.log('Results from dataset');
48console.log(`๐พ Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
49const { items } = await client.dataset(run.defaultDatasetId).listItems();
50items.forEach((item) => {
51 console.dir(item);
52});
53
54