1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "formInputData": {
12 "firstname": "John",
13 "lastname": "Doe",
14 "companyName": "ACME",
15 "companyWebsite": "https://example.com",
16 "message": "Hello, I am John from...",
17 "numberOfEmployees": 10,
18 "linkedinProfile": "https://linkedin.com/in/...",
19 "phoneNumber": "+1234567890",
20 "email": "janedoe@example.com",
21 "howDidYouHearAboutUs": "Google, search engine..."
22 },
23 "message": `Hey t,here 👋
24
25 I’m [Your Name] from [Your Company], and we offer cutting-edge [offers, solutions] tailored for [Your Target Audience]. Our [solutions] handle everything from [Key Function 1] to [Key Function 2], giving you more time to focus on what you do best—[Your Key Business Activity] and growing your business.
26
27 Curious to see how we can transform your operations?
28
29 Let's chat! Test drive our [service, platform] on [Your Website]
30
31 Best,
32 [Your Name]
33 [Your Company]`
34};
35
36
37const run = await client.actor("finderr/leadformsubmitter").call(input);
38
39
40console.log('Results from dataset');
41console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
42const { items } = await client.dataset(run.defaultDatasetId).listItems();
43items.forEach((item) => {
44 console.dir(item);
45});
46
47