1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "pipedriveCompanyDomain": "yourcompany",
12 "leads": [
13 {
14 "domain": "growthagency.io",
15 "companyName": "Growth Agency",
16 "city": "Austin",
17 "state": "TX",
18 "country": "United States",
19 "industry": "Marketing & Advertising",
20 "emails": [
21 "hello@growthagency.io"
22 ],
23 "contacts": [
24 {
25 "name": "Sarah Chen",
26 "title": "Founder",
27 "email": "sarah@growthagency.io",
28 "phone": "+1-512-555-0192"
29 }
30 ],
31 "icpScore": 82,
32 "icpGrade": "A"
33 }
34 ],
35 "dealTitle": "New Lead: {{companyName}} (Score: {{icpScore}})",
36 "dryRun": true
37};
38
39
40const run = await client.actor("ryanclinton/pipedrive-lead-pusher").call(input);
41
42
43console.log('Results from dataset');
44console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
45const { items } = await client.dataset(run.defaultDatasetId).listItems();
46items.forEach((item) => {
47 console.dir(item);
48});
49
50