Skip to content
Open
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
51 changes: 51 additions & 0 deletions components/verifly/actions/create-bulk-job/create-bulk-job.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
import app from "../../verifly.app.mjs";

export default {
key: "verifly-create-bulk-job",
name: "Create Bulk Job",
description: "Submit a list of email addresses for asynchronous bulk verification. Returns a job you can poll for status and results. [See the documentation](https://verifly.email/openapi.json).",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: false,
},
props: {
app,
emails: {
propDefinition: [
app,
"emails",
],
},
filename: {
propDefinition: [
app,
"filename",
],
},
webhookUrl: {
propDefinition: [
app,
"webhookUrl",
],
},
},
async run({ $ }) {
const response = await this.app.createBulkJob({
$,
data: {
emails: this.emails,
filename: this.filename,
webhook_url: this.webhookUrl,
},
});

$.export("$summary", `Successfully created bulk verification job${response.job_id
? ` \`${response.job_id}\``
: ""}`);

return response;
},
};
33 changes: 33 additions & 0 deletions components/verifly/actions/verify-email/verify-email.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import app from "../../verifly.app.mjs";

export default {
key: "verifly-verify-email",
name: "Verify Email",
description: "Verify a single email address for deliverability, syntax, MX, SMTP, disposable, role, catch-all and free-provider signals. [See the documentation](https://verifly.email/openapi.json).",
version: "0.0.1",
type: "action",
annotations: {
destructiveHint: false,
openWorldHint: true,
readOnlyHint: true,
},
props: {
app,
email: {
propDefinition: [
app,
"email",
],
},
},
async run({ $ }) {
const response = await this.app.verifyEmail({
$,
email: this.email,
});

$.export("$summary", `Successfully verified \`${this.email}\` (result: ${response.result ?? "unknown"})`);

return response;
},
};
18 changes: 18 additions & 0 deletions components/verifly/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@pipedream/verifly",
"version": "0.0.1",
"description": "Pipedream Verifly Components",
"main": "verifly.app.mjs",
"keywords": [
"pipedream",
"verifly"
],
"homepage": "https://pipedream.com/apps/verifly",
"author": "Pipedream <support@pipedream.com> (https://pipedream.com/)",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@pipedream/platform": "^3.0.3"
}
}
83 changes: 83 additions & 0 deletions components/verifly/verifly.app.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
import { axios } from "@pipedream/platform";

export default {
type: "app",
app: "verifly",
propDefinitions: {
email: {
type: "string",
label: "Email",
description: "The email address to verify, for example `lead@example.com`.",
},
emails: {
type: "string[]",
label: "Emails",
description: "The list of email addresses to verify in a single bulk job.",
},
Comment on lines +12 to +16

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Add a concrete example for the emails array prop.

This shared prop is reused by the bulk-job action, but the description never shows the expected array shape. In practice that makes it easy for agents/users to pass a single comma-delimited string instead of an actual list. Something like ["lead@example.com", "sales@example.com"] would remove the ambiguity.

As per coding guidelines, prop descriptions must be explicit about formats and examples. As per path instructions, prop description fields must be written for AI agent consumption and include concrete inline examples for non-obvious formats.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@components/verifly/verifly.app.mjs` around lines 12 - 16, The shared prop
definition for emails needs a clearer description because the current text does
not show the expected array format, which can lead users or agents to pass a
comma-delimited string instead of a list. Update the emails prop’s description
in verifly.app.mjs to explicitly describe that it expects an array of strings
and include a concrete inline example like ["lead@example.com",
"sales@example.com"] so the bulk-job action usage is unambiguous.

Sources: Coding guidelines, Path instructions

filename: {
type: "string",
label: "Filename",
description: "An optional name to label the bulk job, for example `leads-2024.csv`.",
optional: true,
},
webhookUrl: {
type: "string",
label: "Webhook URL",
description: "Optional public HTTPS URL that Verifly calls when the bulk job completes.",
optional: true,
},
},
methods: {
_baseUrl() {
return "https://verifly.email/api/v1";
},
_headers(headers = {}) {
return {
"Authorization": `Bearer ${this.$auth.api_key}`,
"Content-Type": "application/json",
...headers,
};
},
_makeRequest({
$ = this, path, headers, ...args
}) {
return axios($, {
url: `${this._baseUrl()}${path}`,
headers: this._headers(headers),
...args,
});
},
verifyEmail({
email, ...args
} = {}) {
return this._makeRequest({
path: "/verify",
params: {
email,
},
...args,
});
},
createBulkJob(args = {}) {
return this._makeRequest({
method: "POST",
path: "/verify/bulk",
...args,
});
},
getJob({
jobId, ...args
} = {}) {
return this._makeRequest({
path: `/jobs/${jobId}`,
...args,
});
},
getCredits(args = {}) {
return this._makeRequest({
path: "/credits",
...args,
});
},
},
};