Skip to content

[Components] hunter - new components #17083

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import app from "../../hunter.app.mjs";

export default {
key: "hunter-account-information",
name: "Account Information",
description: "Get information about your Hunter account. [See the documentation](https://hunter.io/api-documentation/v2#account).",
version: "0.0.1",
type: "action",
props: {
app,
},
async run({ $ }) {
const response = await this.app.accountInformation({
$,
});

$.export("$summary", "Successfully retrieved account information");
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import app from "../../hunter.app.mjs";

export default {
key: "hunter-combined-enrichment",
name: "Combined Enrichment",
description: "Returns all the information associated with an email address and its domain name. [See the documentation](https://hunter.io/api-documentation/v2#combined-enrichment).",
version: "0.0.1",
type: "action",
props: {
app,
email: {
propDefinition: [
app,
"email",
],
},
},
async run({ $ }) {
const {
app,
email,
} = this;

const response = await app.combinedEnrichment({
$,
params: {
email,
},
});

$.export("$summary", "Successfully retrieved combined enrichment data");
return response;
},
};
206 changes: 206 additions & 0 deletions components/hunter/actions/create-lead/create-lead.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,206 @@
import app from "../../hunter.app.mjs";

export default {
key: "hunter-create-lead",
name: "Create Lead",
description: "Create a new lead in your Hunter account. [See the documentation](https://hunter.io/api-documentation/v2#create-lead).",
version: "0.0.1",
type: "action",
props: {
app,
email: {
propDefinition: [
app,
"email",
],
description: "The email address of the lead.",
},
firstName: {
propDefinition: [
app,
"firstName",
],
description: "The first name of the lead.",
optional: true,
},
lastName: {
propDefinition: [
app,
"lastName",
],
description: "The last name of the lead.",
optional: true,
},
position: {
propDefinition: [
app,
"position",
],
description: "The job title of the lead.",
optional: true,
},
company: {
propDefinition: [
app,
"company",
],
description: "The name of the company the lead is working in.",
optional: true,
},
companyIndustry: {
type: "string",
label: "Company Industry",
description: "The sector of the company.",
options: [
"Animal",
"Art & Entertainment",
"Automotive",
"Beauty & Fitness",
"Books & Literature",
"Education & Career",
"Finance",
"Food & Drink",
"Game",
"Health",
"Hobby & Leisure",
"Home & Garden",
"Industry",
"Internet & Telecom",
"Law & Government",
"Manufacturing",
"News",
"Real Estate",
"Science",
"Retail",
"Sport",
"Technology",
"Travel",
],
optional: true,
},
companySize: {
propDefinition: [
app,
"companySize",
],
description: "The size of the company the lead is working in.",
optional: true,
},
confidenceScore: {
type: "integer",
label: "Confidence Score",
description: "Estimation of the probability the email address returned is correct, between 0 and 100.",
min: 0,
max: 100,
optional: true,
},
website: {
propDefinition: [
app,
"website",
],
description: "The domain name of the company.",
optional: true,
},
countryCode: {
propDefinition: [
app,
"countryCode",
],
description: "The country of the lead (ISO 3166-1 alpha-2 standard).",
optional: true,
},
linkedinUrl: {
propDefinition: [
app,
"linkedinUrl",
],
description: "The address of the public profile on LinkedIn.",
optional: true,
},
phoneNumber: {
propDefinition: [
app,
"phoneNumber",
],
description: "The phone number of the lead.",
optional: true,
},
twitter: {
propDefinition: [
app,
"twitter",
],
description: "The Twitter handle of the lead.",
optional: true,
},
notes: {
type: "string",
label: "Notes",
description: "Some personal notes about the lead.",
optional: true,
},
source: {
propDefinition: [
app,
"source",
],
description: "The source where the lead has been found.",
optional: true,
},
leadsListId: {
propDefinition: [
app,
"leadsListId",
],
description: "The identifier of the list the lead belongs to. If not specified, the lead is saved in the last list created.",
optional: true,
},
},
async run({ $ }) {
const {
app,
email,
firstName,
lastName,
position,
company,
companyIndustry,
companySize,
confidenceScore,
website,
countryCode,
linkedinUrl,
phoneNumber,
twitter,
notes,
source,
leadsListId,
} = this;

const response = await app.createLead({
$,
data: {
email,
first_name: firstName,
last_name: lastName,
position,
company,
company_industry: companyIndustry,
company_size: companySize,
confidence_score: confidenceScore,
website,
country_code: countryCode,
linkedin_url: linkedinUrl,
phone_number: phoneNumber,
twitter,
notes,
source,
leads_list_id: leadsListId,
},
});

$.export("$summary", "Successfully created lead");
return response;
},
};
34 changes: 34 additions & 0 deletions components/hunter/actions/delete-lead/delete-lead.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import app from "../../hunter.app.mjs";

export default {
key: "hunter-delete-lead",
name: "Delete Lead",
description: "Delete an existing lead from your Hunter account. [See the documentation](https://hunter.io/api-documentation/v2#delete-lead).",
version: "0.0.1",
type: "action",
props: {
app,
leadId: {
propDefinition: [
app,
"leadId",
],
},
},
async run({ $ }) {
const {
app,
leadId,
} = this;

await app.deleteLead({
$,
leadId,
});

$.export("$summary", "Successfully deleted lead");
return {
success: true,
};
},
};
Loading
Loading