1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "leads": [
12 {
13 "fullName": "Alex Morgan",
14 "jobTitle": "COO",
15 "companyName": "Example Manufacturing",
16 "companyUrl": "https://example.com",
17 "notes": "Met at an industry event; evaluating process automation this quarter."
18 }
19 ],
20 "offerDescription": "We automate document-heavy B2B operations by connecting ERP, CRM, email, and approval workflows with human-reviewed AI.",
21 "idealCustomerProfile": "Italian mid-market manufacturers with multi-person operations teams, repetitive document workflows, and an active process-improvement initiative.",
22 "qualificationCriteria": [
23 "Operates document-heavy workflows",
24 "Uses an ERP or CRM",
25 "Has a multi-person operations team"
26 ],
27 "targetRoles": [
28 "COO",
29 "Head of Operations",
30 "Operations Director"
31 ]
32};
33
34
35const run = await client.actor("nextlabs/ai-lead-qualifier-outreach").call(input);
36
37
38console.log('Results from dataset');
39console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
40const { items } = await client.dataset(run.defaultDatasetId).listItems();
41items.forEach((item) => {
42 console.dir(item);
43});
44
45