1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "salesforceLoginUrl": "https://login.salesforce.com",
12 "leads": [
13 {
14 "name": "Sarah Chen",
15 "email": "sarah.chen@acmecorp.com",
16 "phone": "+1-415-555-0192",
17 "companyName": "Acme Corp",
18 "jobTitle": "VP of Engineering",
19 "industry": "Technology",
20 "website": "https://acmecorp.com",
21 "city": "San Francisco",
22 "state": "CA",
23 "country": "US",
24 "description": "Met at SaaStr 2025. Interested in automation tools."
25 }
26 ],
27 "dryRun": true
28};
29
30
31const run = await client.actor("ryanclinton/salesforce-lead-pusher").call(input);
32
33
34console.log('Results from dataset');
35console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
36const { items } = await client.dataset(run.defaultDatasetId).listItems();
37items.forEach((item) => {
38 console.dir(item);
39});
40
41