1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "domains": [
12 "stripe.com"
13 ],
14 "sampleContacts": [
15 {
16 "email": "john.doe@stripe.com",
17 "firstName": "John",
18 "lastName": "Doe",
19 "source": "crm-row-101"
20 },
21 {
22 "email": "jane.smith@stripe.com",
23 "firstName": "Jane",
24 "lastName": "Smith",
25 "source": "crm-row-102"
26 }
27 ],
28 "targetContacts": [
29 {
30 "fullName": "Alex Taylor",
31 "domain": "stripe.com",
32 "sourceId": "lead-001"
33 },
34 {
35 "firstName": "Morgan",
36 "lastName": "Lee",
37 "domain": "stripe.com",
38 "sourceId": "lead-002"
39 }
40 ]
41};
42
43
44const run = await client.actor("automation-lab/email-pattern-finder").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