diff --git a/components/tomba/README.md b/components/tomba/README.md index 84416691d850c..2ae1107f08226 100644 --- a/components/tomba/README.md +++ b/components/tomba/README.md @@ -1,11 +1,50 @@ # Overview -The Tomba API is a potent tool for email discovery and domain search. With it, you can automate the process of finding and verifying email addresses linked to a domain, which could be pivotal for lead generation, outreach campaigns, or market research. By leveraging the Tomba API on Pipedream, you streamline these tasks into efficient workflows that can interact with numerous other apps and services, such as CRMs, marketing automation tools, or database managers. The synergy between Tomba and Pipedream allows for real-time processing and integration of email data within your existing business systems. +The Tomba API is a comprehensive email finder and verification service that enables you to discover, verify, and enrich email addresses and contact data. With Tomba, you can find email addresses from domains, names, LinkedIn profiles, or blog posts, verify email deliverability, and gather detailed company intelligence. Leverage Pipedream's capabilities to integrate Tomba with hundreds of other apps, creating powerful automated workflows for lead generation, email verification, contact enrichment, and competitive research. # Example Use Cases -- **Lead Generation Automation**: Trigger a workflow when a new company is added to your CRM. Use Tomba to find email addresses associated with the company's domain. Enrich lead data in the CRM and follow up with an automated outreach sequence using an email marketing tool like Mailchimp. +- **Lead Generation Automation**: Trigger a workflow when a new company is added to your CRM. Use Tomba to find email addresses associated with the company's domain, enrich the lead data, and automatically add qualified contacts to your outreach sequences in tools like Mailchimp or HubSpot. -- **Domain Research and Monitoring**: Schedule a regular Pipedream workflow that checks a list of domains and uses Tomba to gather any new email addresses. Store the findings in a Google Sheets document and send a Slack notification to the sales team with any updates or new leads. +- **Email List Verification**: Before launching an email campaign, run your contact list through a Pipedream workflow that uses Tomba's email verifier to validate each address. Automatically remove invalid emails and update your email platform like SendGrid, ensuring higher deliverability rates and protecting your sender reputation. -- **Verification and Clean-up for Marketing Campaigns**: Before launching an email campaign, run your email list through a Pipedream workflow that uses Tomba to verify the validity of each address. Update the campaign list in your email platform, like Sendgrid, to omit invalid or nonexistent emails, ensuring higher deliverability and engagement rates. +- **Competitive Intelligence Gathering**: Set up a scheduled workflow that monitors competitor domains using Tomba's domain search and technology detection features. Store findings in Google Sheets and send Slack notifications to your team with insights about competitor email patterns, employee counts, and tech stacks. + +# Getting Started + +To start using Tomba with Pipedream: + +1. **Sign up for Tomba**: Create an account at [tomba.io](https://tomba.io) and obtain your API key and secret from the dashboard. + +2. **Connect to Pipedream**: In your Pipedream workflow, add a Tomba action and authenticate using your API credentials. + +3. **Choose your action**: Select from 20 available actions including Email Finder, Domain Search, Email Verifier, and Company Search. + +4. **Configure parameters**: Set up your search criteria such as domain names, email addresses, or LinkedIn URLs. + +5. **Test and deploy**: Run your workflow to verify the results, then deploy for automated execution. + +# Troubleshooting + +**Authentication Issues** + +- Verify your API key and secret are correctly entered in the Pipedream connection settings +- Check that your Tomba account has sufficient credits and is not suspended +- Ensure your API keys haven't expired or been regenerated + +**Rate Limiting** + +- Tomba enforces API rate limits based on your subscription plan +- Implement delays between requests in high-volume workflows +- Monitor your usage with the "Get Usage" action to track quota consumption + +**No Results Found** + +- For Email Finder: Try different name variations or check if the domain uses a non-standard email format +- For Domain Search: Some domains may have limited public email exposure +- For LinkedIn Finder: Ensure the LinkedIn URL is publicly accessible and properly formatted + +**Invalid Email Addresses** + +- Use the Email Verifier action to validate emails before adding them to campaigns +- Some emails may exist but have strict spam filters that prevent verification diff --git a/components/tomba/actions/author-finder/author-finder.mjs b/components/tomba/actions/author-finder/author-finder.mjs new file mode 100644 index 0000000000000..51f7428ebba89 --- /dev/null +++ b/components/tomba/actions/author-finder/author-finder.mjs @@ -0,0 +1,36 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-author-finder", + name: "Author Finder", + description: + "Generate or retrieve the most likely email address from a blog post URL. [See the documentation](https://tomba.io/api)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + blogUrl: { + propDefinition: [ + app, + "blogUrl", + ], + }, + }, + async run({ $ }) { + const response = await this.app.authorFinder({ + $, + blogUrl: this.blogUrl, + }); + + $.export( + "$summary", + `Successfully found author information for blog post: ${this.blogUrl}`, + ); + return response; + }, +}; diff --git a/components/tomba/actions/domain-search/domain-search.mjs b/components/tomba/actions/domain-search/domain-search.mjs new file mode 100644 index 0000000000000..7c4e10f34791e --- /dev/null +++ b/components/tomba/actions/domain-search/domain-search.mjs @@ -0,0 +1,66 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-domain-search", + name: "Domain Search", + description: + "Get every email address found on the internet using a given domain name, with sources. [See the documentation](https://tomba.io/api)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + domain: { + propDefinition: [ + app, + "domain", + ], + }, + page: { + propDefinition: [ + app, + "page", + ], + }, + limitDomainSearch: { + propDefinition: [ + app, + "limitDomainSearch", + ], + }, + country: { + propDefinition: [ + app, + "country", + ], + }, + department: { + propDefinition: [ + app, + "department", + ], + }, + }, + async run({ $ }) { + const response = await this.app.domainSearch({ + $, + domain: this.domain, + page: this.page, + limit: this.limitDomainSearch, + country: this.country, + department: this.department, + }); + + $.export( + "$summary", + `Successfully found ${ + response.data?.emails?.length || 0 + } email addresses for domain: ${this.domain}`, + ); + return response; + }, +}; diff --git a/components/tomba/actions/domain-status/domain-status.mjs b/components/tomba/actions/domain-status/domain-status.mjs new file mode 100644 index 0000000000000..ef4c5b7553842 --- /dev/null +++ b/components/tomba/actions/domain-status/domain-status.mjs @@ -0,0 +1,36 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-domain-status", + name: "Domain Status", + description: + "Find domain status if is webmail or disposable. [See the documentation](https://tomba.io/api)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + domain: { + propDefinition: [ + app, + "domain", + ], + }, + }, + async run({ $ }) { + const response = await this.app.domainStatus({ + $, + domain: this.domain, + }); + + $.export( + "$summary", + `Successfully retrieved domain status for: ${this.domain}`, + ); + return response; + }, +}; diff --git a/components/tomba/actions/domain-suggestions/domain-suggestions.mjs b/components/tomba/actions/domain-suggestions/domain-suggestions.mjs new file mode 100644 index 0000000000000..144882a798abc --- /dev/null +++ b/components/tomba/actions/domain-suggestions/domain-suggestions.mjs @@ -0,0 +1,37 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-domain-suggestions", + name: "Domain Suggestions", + description: + "Retrieve a list of suggested domains similar to or related to your search query. This helps discover competitors, similar companies, and related businesses for market research and prospecting. [See the documentation](https://tomba.io/api)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + query: { + propDefinition: [ + app, + "query", + ], + description: "The domain or company name to find suggestions for", + }, + }, + async run({ $ }) { + const response = await this.app.domainSuggestions({ + $, + query: this.query, + }); + + $.export( + "$summary", + `Successfully found domain suggestions for: ${this.query}`, + ); + return response; + }, +}; diff --git a/components/tomba/actions/email-count/email-count.mjs b/components/tomba/actions/email-count/email-count.mjs new file mode 100644 index 0000000000000..4f9e22f9f7ee1 --- /dev/null +++ b/components/tomba/actions/email-count/email-count.mjs @@ -0,0 +1,36 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-email-count", + name: "Email Count", + description: + "Find total email addresses we have for one domain. [See the documentation](https://tomba.io/api)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + domain: { + propDefinition: [ + app, + "domain", + ], + }, + }, + async run({ $ }) { + const response = await this.app.emailCount({ + $, + domain: this.domain, + }); + + $.export( + "$summary", + `Successfully retrieved email count for domain: ${this.domain}`, + ); + return response; + }, +}; diff --git a/components/tomba/actions/email-enrichment/email-enrichment.mjs b/components/tomba/actions/email-enrichment/email-enrichment.mjs new file mode 100644 index 0000000000000..57847ef95239d --- /dev/null +++ b/components/tomba/actions/email-enrichment/email-enrichment.mjs @@ -0,0 +1,33 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-email-enrichment", + name: "Email Enrichment", + description: + "Look up person and company data based on an email. [See the documentation](https://tomba.io/api)", + 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.emailEnrichment({ + $, + email: this.email, + }); + + $.export("$summary", `Successfully enriched data for email: ${this.email}`); + return response; + }, +}; diff --git a/components/tomba/actions/email-finder/email-finder.mjs b/components/tomba/actions/email-finder/email-finder.mjs new file mode 100644 index 0000000000000..2a1c808833ace --- /dev/null +++ b/components/tomba/actions/email-finder/email-finder.mjs @@ -0,0 +1,50 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-email-finder", + name: "Email Finder", + description: + "Generate or retrieve the most likely email address from a domain name, a first name and a last name. [See the documentation](https://tomba.io/api)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + domain: { + propDefinition: [ + app, + "domain", + ], + }, + firstName: { + propDefinition: [ + app, + "firstName", + ], + }, + lastName: { + propDefinition: [ + app, + "lastName", + ], + }, + }, + async run({ $ }) { + const response = await this.app.emailFinder({ + $, + domain: this.domain, + firstName: this.firstName, + lastName: this.lastName, + }); + + $.export( + "$summary", + `Successfully found email for ${this.firstName} ${this.lastName} at ${this.domain}`, + ); + return response; + }, +}; diff --git a/components/tomba/actions/email-format/email-format.mjs b/components/tomba/actions/email-format/email-format.mjs new file mode 100644 index 0000000000000..9fa61ba2a8c6c --- /dev/null +++ b/components/tomba/actions/email-format/email-format.mjs @@ -0,0 +1,36 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-email-format", + name: "Email Format", + description: + "Retrieve the email format patterns used by a specific domain. [See the documentation](https://tomba.io/api)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + domain: { + propDefinition: [ + app, + "domain", + ], + }, + }, + async run({ $ }) { + const response = await this.app.emailFormat({ + $, + domain: this.domain, + }); + + $.export( + "$summary", + `Successfully retrieved email format patterns for domain: ${this.domain}`, + ); + return response; + }, +}; diff --git a/components/tomba/actions/email-sources/email-sources.mjs b/components/tomba/actions/email-sources/email-sources.mjs new file mode 100644 index 0000000000000..b2de366b46c2e --- /dev/null +++ b/components/tomba/actions/email-sources/email-sources.mjs @@ -0,0 +1,33 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-email-sources", + name: "Email Sources", + description: + "Find email address source somewhere on the web. [See the documentation](https://tomba.io/api)", + 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.emailSources({ + $, + email: this.email, + }); + + $.export("$summary", `Successfully found sources for email: ${this.email}`); + return response; + }, +}; diff --git a/components/tomba/actions/email-verifier/email-verifier.mjs b/components/tomba/actions/email-verifier/email-verifier.mjs new file mode 100644 index 0000000000000..37279108b7dfc --- /dev/null +++ b/components/tomba/actions/email-verifier/email-verifier.mjs @@ -0,0 +1,33 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-email-verifier", + name: "Email Verifier", + description: + "Verify the deliverability of an email address. [See the documentation](https://tomba.io/api)", + 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.emailVerifier({ + $, + email: this.email, + }); + + $.export("$summary", `Successfully verified email: ${this.email}`); + return response; + }, +}; diff --git a/components/tomba/actions/get-account/get-account.mjs b/components/tomba/actions/get-account/get-account.mjs new file mode 100644 index 0000000000000..e0ed74c9a09f1 --- /dev/null +++ b/components/tomba/actions/get-account/get-account.mjs @@ -0,0 +1,26 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-get-account", + name: "Get Account", + description: + "Returns information about the current account including usage statistics and plan details. [See the documentation](https://tomba.io/api)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + }, + async run({ $ }) { + const response = await this.app.getAccount({ + $, + }); + + $.export("$summary", "Successfully retrieved account information"); + return response; + }, +}; diff --git a/components/tomba/actions/get-logs/get-logs.mjs b/components/tomba/actions/get-logs/get-logs.mjs new file mode 100644 index 0000000000000..e2261e63b313b --- /dev/null +++ b/components/tomba/actions/get-logs/get-logs.mjs @@ -0,0 +1,45 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-get-logs", + name: "Get Logs", + description: + "Retrieve API request logs for your account with pagination support. [See the documentation](https://tomba.io/api)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + limit: { + propDefinition: [ + app, + "limit", + ], + }, + page: { + propDefinition: [ + app, + "page", + ], + }, + }, + async run({ $ }) { + const offset = (this.page - 1) * this.limit; + + const response = await this.app.getLogs({ + $, + limit: this.limit, + offset, + }); + + $.export( + "$summary", + `Successfully retrieved ${response.data?.length || 0} API logs`, + ); + return response; + }, +}; diff --git a/components/tomba/actions/get-usage/get-usage.mjs b/components/tomba/actions/get-usage/get-usage.mjs new file mode 100644 index 0000000000000..5521624662788 --- /dev/null +++ b/components/tomba/actions/get-usage/get-usage.mjs @@ -0,0 +1,26 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-get-usage", + name: "Get Usage", + description: + "Retrieve API usage statistics and quota information for your account. [See the documentation](https://tomba.io/api)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + }, + async run({ $ }) { + const response = await this.app.getUsage({ + $, + }); + + $.export("$summary", "Successfully retrieved API usage statistics"); + return response; + }, +}; diff --git a/components/tomba/actions/linkedin-finder/linkedin-finder.mjs b/components/tomba/actions/linkedin-finder/linkedin-finder.mjs new file mode 100644 index 0000000000000..c43a6ea10c9b5 --- /dev/null +++ b/components/tomba/actions/linkedin-finder/linkedin-finder.mjs @@ -0,0 +1,36 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-linkedin-finder", + name: "LinkedIn Finder", + description: + "Generate or retrieve the most likely email address from a LinkedIn URL. [See the documentation](https://tomba.io/api)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + linkedinUrl: { + propDefinition: [ + app, + "linkedinUrl", + ], + }, + }, + async run({ $ }) { + const response = await this.app.linkedinFinder({ + $, + linkedinUrl: this.linkedinUrl, + }); + + $.export( + "$summary", + `Successfully found email from LinkedIn profile: ${this.linkedinUrl}`, + ); + return response; + }, +}; diff --git a/components/tomba/actions/location/location.mjs b/components/tomba/actions/location/location.mjs new file mode 100644 index 0000000000000..ddb8a72e2b62c --- /dev/null +++ b/components/tomba/actions/location/location.mjs @@ -0,0 +1,36 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-location", + name: "Location", + description: + "Get employees location based on the domain name. [See the documentation](https://tomba.io/api)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + domain: { + propDefinition: [ + app, + "domain", + ], + }, + }, + async run({ $ }) { + const response = await this.app.location({ + $, + domain: this.domain, + }); + + $.export( + "$summary", + `Successfully retrieved location data for domain: ${this.domain}`, + ); + return response; + }, +}; diff --git a/components/tomba/actions/phone-finder/phone-finder.mjs b/components/tomba/actions/phone-finder/phone-finder.mjs new file mode 100644 index 0000000000000..9633e1c87be0a --- /dev/null +++ b/components/tomba/actions/phone-finder/phone-finder.mjs @@ -0,0 +1,84 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-phone-finder", + name: "Phone Finder", + description: + "Search for phone numbers based on an email, domain, or LinkedIn URL. [See the documentation](https://tomba.io/api)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + searchType: { + type: "string", + label: "Search Type", + description: "Choose the type of search to perform", + options: [ + { + label: "Search by Domain", + value: "domain", + }, + { + label: "Search by Email", + value: "email", + }, + { + label: "Search by LinkedIn URL", + value: "linkedin", + }, + ], + reloadProps: true, + default: "domain", + }, + }, + additionalProps() { + const props = {}; + if (this.searchType === "domain") { + props.domain = { + type: "string", + label: "Domain", + description: "The domain name to search (e.g., stripe.com)", + }; + } else if (this.searchType === "email") { + props.email = { + type: "string", + label: "Email Address", + description: "The email address to verify or search", + }; + } else if (this.searchType === "linkedin") { + props.linkedinUrl = { + type: "string", + label: "LinkedIn URL", + description: "The LinkedIn profile URL", + }; + } + return props; + }, + async run({ $ }) { + const params = {}; + if (this.searchType === "domain") { + params.domain = this.domain; + } else if (this.searchType === "email") { + params.email = this.email; + } else if (this.searchType === "linkedin") { + params.linkedinUrl = this.linkedinUrl; + } + + const response = await this.app.phoneFinder({ + $, + params, + }); + + const searchValue = this.domain || this.email || this.linkedinUrl; + $.export( + "$summary", + `Successfully searched for phone numbers using ${this.searchType}: ${searchValue}`, + ); + return response; + }, +}; diff --git a/components/tomba/actions/phone-validator/phone-validator.mjs b/components/tomba/actions/phone-validator/phone-validator.mjs new file mode 100644 index 0000000000000..96691794747c7 --- /dev/null +++ b/components/tomba/actions/phone-validator/phone-validator.mjs @@ -0,0 +1,43 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-phone-validator", + name: "Phone Validator", + description: + "Validate a phone number and retrieve its associated information. [See the documentation](https://tomba.io/api)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + phoneNumber: { + propDefinition: [ + app, + "phoneNumber", + ], + }, + country: { + propDefinition: [ + app, + "country", + ], + }, + }, + async run({ $ }) { + const response = await this.app.phoneValidator({ + $, + phoneNumber: this.phoneNumber, + country: this.country, + }); + + $.export( + "$summary", + `Successfully validated phone number: ${this.phoneNumber}`, + ); + return response; + }, +}; diff --git a/components/tomba/actions/search-companies/search-companies.mjs b/components/tomba/actions/search-companies/search-companies.mjs new file mode 100644 index 0000000000000..d6f08fcd028dc --- /dev/null +++ b/components/tomba/actions/search-companies/search-companies.mjs @@ -0,0 +1,59 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-search-companies", + name: "Search Companies", + description: + "Search for companies using natural language queries or structured filters. The AI assistant will automatically generate appropriate filters from your query. [See the documentation](https://tomba.io/api)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + query: { + propDefinition: [ + app, + "query", + ], + description: + "Natural language query to search for companies (e.g., 'tech companies in San Francisco with 100+ employees')", + }, + filters: { + propDefinition: [ + app, + "filters", + ], + }, + limit: { + propDefinition: [ + app, + "limit", + ], + }, + page: { + propDefinition: [ + app, + "page", + ], + }, + }, + async run({ $ }) { + const response = await this.app.searchCompanies({ + $, + query: this.query, + filters: this.filters, + limit: this.limit, + page: this.page, + }); + + $.export( + "$summary", + `Successfully searched companies with query: ${this.query}`, + ); + return response; + }, +}; diff --git a/components/tomba/actions/similar/similar.mjs b/components/tomba/actions/similar/similar.mjs new file mode 100644 index 0000000000000..cfe29c10528b5 --- /dev/null +++ b/components/tomba/actions/similar/similar.mjs @@ -0,0 +1,36 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-similar", + name: "Similar Domains", + description: + "Retrieve similar domains based on a specific domain. [See the documentation](https://tomba.io/api)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + domain: { + propDefinition: [ + app, + "domain", + ], + }, + }, + async run({ $ }) { + const response = await this.app.similar({ + $, + domain: this.domain, + }); + + $.export( + "$summary", + `Successfully found similar domains for: ${this.domain}`, + ); + return response; + }, +}; diff --git a/components/tomba/actions/technology/technology.mjs b/components/tomba/actions/technology/technology.mjs new file mode 100644 index 0000000000000..b75425ba7c03f --- /dev/null +++ b/components/tomba/actions/technology/technology.mjs @@ -0,0 +1,36 @@ +import app from "../../tomba.app.mjs"; + +export default { + key: "tomba-technology", + name: "Technology", + description: + "Retrieve the technologies used by a specific domain. [See the documentation](https://tomba.io/api)", + version: "0.0.1", + type: "action", + annotations: { + destructiveHint: false, + openWorldHint: true, + readOnlyHint: true, + }, + props: { + app, + domain: { + propDefinition: [ + app, + "domain", + ], + }, + }, + async run({ $ }) { + const response = await this.app.technology({ + $, + domain: this.domain, + }); + + $.export( + "$summary", + `Successfully retrieved technology stack for domain: ${this.domain}`, + ); + return response; + }, +}; diff --git a/components/tomba/package.json b/components/tomba/package.json index de5ab18cd0e92..50a9d576abd84 100644 --- a/components/tomba/package.json +++ b/components/tomba/package.json @@ -1,15 +1,27 @@ { "name": "@pipedream/tomba", - "version": "0.0.5", - "description": "Pipedream Tomba Components", + "version": "0.2.0", + "description": "Pipedream Tomba Components - Email finder, verifier, enrichment, company search, and account management tools", "main": "tomba.app.mjs", "keywords": [ "pipedream", - "tomba" + "tomba", + "email", + "finder", + "verifier", + "enrichment", + "domain", + "phone", + "linkedin", + "company", + "search" ], "homepage": "https://pipedream.com/apps/tomba", "author": "Pipedream (https://pipedream.com/)", "publishConfig": { "access": "public" + }, + "dependencies": { + "@pipedream/platform": "^3.0.3" } } diff --git a/components/tomba/tomba.app.mjs b/components/tomba/tomba.app.mjs index 10a330dde8978..64b01a95f9d5a 100644 --- a/components/tomba/tomba.app.mjs +++ b/components/tomba/tomba.app.mjs @@ -1,11 +1,563 @@ +import { axios } from "@pipedream/platform"; + export default { type: "app", app: "tomba", - propDefinitions: {}, + propDefinitions: { + domain: { + type: "string", + label: "Domain", + description: "The domain name to search (e.g., stripe.com)", + }, + email: { + type: "string", + label: "Email Address", + description: "The email address to verify or search", + }, + firstName: { + type: "string", + label: "First Name", + description: "The first name of the person", + }, + lastName: { + type: "string", + label: "Last Name", + description: "The last name of the person", + }, + linkedinUrl: { + type: "string", + label: "LinkedIn URL", + description: "The LinkedIn profile URL", + }, + blogUrl: { + type: "string", + label: "Blog Post URL", + description: "The blog post URL to find author email", + }, + phoneNumber: { + type: "string", + label: "Phone Number", + description: "The phone number to validate", + }, + country: { + type: "string", + label: "Country", + description: "Two-letter country code (e.g., US, UK, FR)", + optional: true, + }, + limit: { + type: "integer", + label: "Limit", + description: "Number of results to return (max 100)", + optional: true, + default: 10, + min: 1, + max: 100, + }, + query: { + type: "string", + label: "Search Query", + description: "Natural language query or structured search terms", + }, + filters: { + type: "object", + label: "Search Filters", + description: "Structured filters for company search", + optional: true, + }, + page: { + type: "integer", + label: "Page", + description: "Page number for pagination", + optional: true, + default: 1, + min: 1, + }, + limitDomainSearch: { + type: "string", + label: "Limit", + description: "Specifies the max number of email addresses to return.", + optional: true, + default: "10", + options: [ + "10", + "20", + "50", + ], + }, + department: { + type: "string", + label: "Department", + description: + "Get only email addresses for people working in the selected department(s).", + optional: true, + options: [ + "engineering", + "sales", + "finance", + "hr", + "it", + "marketing", + "operations", + "management", + "executive", + "legal", + "support", + "communication", + "software", + "security", + "pr", + "warehouse", + "diversity", + "administrative", + "facilities", + "accounting", + ], + }, + url: { + type: "string", + label: "URL", + description: "The URL to analyze or search", + }, + searchType: { + type: "string", + label: "Search Type", + description: "Choose the type of search to perform", + options: [ + { + label: "Search by Domain", + value: "domain", + }, + { + label: "Search by Email", + value: "email", + }, + { + label: "Search by LinkedIn URL", + value: "linkedin", + }, + ], + reloadProps: true, + default: "domain", + }, + companyName: { + type: "string", + label: "Company Name", + description: "The company name to search for", + }, + }, methods: { - // this.$auth contains connected account data - authKeys() { - console.log(Object.keys(this.$auth)); + /** + * Get the base URL for Tomba API + * @returns {string} The base URL for API requests + */ + _baseUrl() { + return "https://api.tomba.io/v1"; + }, + /** + * Get headers for API requests including authentication + * @returns {object} Headers object with API credentials + */ + _headers() { + return { + "X-Tomba-Key": this.$auth.api_key, + "X-Tomba-Secret": this.$auth.api_secret, + "User-Agent": "Pipedream/1.0", + "Accept": "application/json", + }; + }, + /** + * Make an HTTP request to the Tomba API + * @param {object} opts - Configuration options for the request + * @param {object} opts.$ - Pipedream step context + * @param {string} opts.path - API endpoint path + * @param {string} [opts.method=GET] - HTTP method + * @param {object} [opts.params] - Query parameters + * @param {object} [opts.data] - Request body data + * @returns {Promise} API response + */ + async _makeRequest({ + $ = this, path, ...opts + }) { + return axios($, { + url: `${this._baseUrl()}${path}`, + headers: this._headers(), + ...opts, + }); + }, + /** + * Find the most likely email address from a blog post URL + * @param {object} opts - Configuration options + * @param {object} opts.$ - Pipedream step context + * @param {string} opts.blogUrl - The blog post URL to analyze + * @returns {Promise} Author information and email address + */ + async authorFinder({ + $, blogUrl, ...opts + }) { + return this._makeRequest({ + $, + path: "/author-finder", + params: { + url: blogUrl, + ...opts, + }, + }); + }, + /** + * Get every email address found on the internet for a domain + * @param {string} opts.domain - The domain to search + * @param {number} [opts.limit=10] - Number of results to return + * @returns {Promise} Array of email addresses with sources + */ + async domainSearch({ + $, domain, ...opts + }) { + return this._makeRequest({ + $, + path: "/domain-search", + params: { + domain, + ...opts, + }, + }); + }, + /** + * Get the status of a domain (e.g., if it's disposable or webmail) + * @param {string} opts.domain - The domain to check + * @returns {Promise} Domain status information + * @description This endpoint checks if a domain is disposable or webmail. + */ + async domainStatus({ + $, domain, ...opts + }) { + return this._makeRequest({ + $, + path: "/domain-status", + params: { + domain, + ...opts, + }, + }); + }, + /** + * Get the number of email addresses found for a domain + * @param {string} opts.domain - The domain to check + * @returns {Promise} Email count information + * @description This endpoint retrieves the number of email addresses. + */ + async emailCount({ + $, domain, ...opts + }) { + return this._makeRequest({ + $, + path: "/email-count", + params: { + domain, + ...opts, + }, + }); + }, + /** + * Enrich email data with additional information + * @param {string} opts.email - The email address to enrich + * @returns {Promise} Enriched email information + * @description This endpoint enriches email data with additional information. + */ + async emailEnrichment({ + $, email, ...opts + }) { + return this._makeRequest({ + $, + path: "/enrich", + params: { + email, + ...opts, + }, + }); + }, + /** + * Find the most likely email address from a domain name, first name, and last name + * @param {string} opts.domain - The domain name to use + * @param {string} opts.firstName - The first name of the person + * @param {string} opts.lastName - The last name of the person + * @returns {Promise} Email address information + * @description This endpoint generates or retrieves the most likely email address. + */ + async emailFinder({ + $, domain, firstName, lastName, ...opts + }) { + return this._makeRequest({ + $, + path: "/email-finder", + params: { + domain, + first_name: firstName, + last_name: lastName, + ...opts, + }, + }); + }, + /** + * Get the email format for a domain + * @param {string} opts.domain - The domain to check + * @returns {Promise} Email format information + * @description This endpoint retrieves the email format used by a specific domain. + */ + async emailFormat({ + $, domain, ...opts + }) { + return this._makeRequest({ + $, + path: "/email-format", + params: { + domain, + ...opts, + }, + }); + }, + /** + * Get the email sources for a specific email address + * @param {string} opts.email - The email address to check + * @returns {Promise} Email sources information + * @description This endpoint retrieves the sources where a specific email address was found. + */ + async emailSources({ + $, email, ...opts + }) { + return this._makeRequest({ + $, + path: "/email-sources", + params: { + email, + ...opts, + }, + }); + }, + /** + * Verify the validity of an email address + * @param {string} opts.email - The email address to verify + * @returns {Promise} Email verification information + * @description This endpoint verifies the validity of an email address. + */ + async emailVerifier({ + $, email, ...opts + }) { + return this._makeRequest({ + $, + path: "/email-verifier", + params: { + email, + ...opts, + }, + }); + }, + /** + * Find a LinkedIn profile based on a LinkedIn URL + * @param {string} opts.linkedinUrl - The LinkedIn profile URL + * @returns {Promise} LinkedIn profile information + * @description This endpoint retrieves information from a LinkedIn profile URL. + */ + async linkedinFinder({ + $, linkedinUrl, ...opts + }) { + return this._makeRequest({ + $, + path: "/linkedin", + params: { + url: linkedinUrl, + ...opts, + }, + }); + }, + /** + * Get the location information for a specific domain + * @param {string} opts.domain - The domain to check + * @returns {Promise} Location information + * @description This endpoint retrieves location information associated with a specific domain. + */ + async location({ + $, domain, ...opts + }) { + return this._makeRequest({ + $, + path: "/location", + params: { + domain, + ...opts, + }, + }); + }, + /** + * Find a phone number based on various parameters + * @param {string} [opts.domain] - The domain associated with the phone number + * @param {string} [opts.email] - The email address associated with the phone number + * @param {string} [opts.linkedinUrl] - The LinkedIn profile URL + * @returns {Promise} Phone number information + * @description This endpoint retrieves phone number information based on provided parameters. + */ + async phoneFinder({ + $, domain, email, linkedinUrl, ...opts + }) { + const params = {}; + if (domain) params.domain = domain; + if (email) params.email = email; + if (linkedinUrl) params.linkedin = linkedinUrl; + + return this._makeRequest({ + $, + path: "/phone-finder", + params: { + ...params, + ...opts, + }, + }); + }, + /** + * Validate a phone number + * @param {string} [opts.phoneNumber] - The phone number to validate + * @param {string} [opts.country] - The country code (e.g., US, UK) + * @returns {Promise} Phone validation information + * @description This endpoint validates a phone number. + */ + async phoneValidator({ + $, phoneNumber, country, ...opts + }) { + return this._makeRequest({ + $, + path: "/phone-validator", + params: { + phone: phoneNumber, + country, + ...opts, + }, + }); + }, + /** + * Find similar domains based on a specific domain + * @param {string} opts.domain - The domain to check + * @returns {Promise} Similar domain information + * @description This endpoint retrieves domains similar to a specified domain. + */ + async similar({ + $, domain, ...opts + }) { + return this._makeRequest({ + $, + path: "/similar", + params: { + domain, + ...opts, + }, + }); + }, + /** + * Get technology stack information for a specific domain + * @param {string} opts.domain - The domain to check + * @returns {Promise} Technology stack information + * @description This endpoint retrieves technology stack information. + */ + async technology({ + $, domain, ...opts + }) { + return this._makeRequest({ + $, + path: "/technology", + params: { + domain, + ...opts, + }, + }); + }, + /** + * Get the account information for the authenticated user + * @returns {Promise} Account information + * @description This endpoint retrieves the account information for the authenticated user. + */ + async getAccount({ + $, ...opts + }) { + return this._makeRequest({ + $, + path: "/me", + ...opts, + }); + }, + /** + * Search for companies based on various parameters + * @param {*} param0 + * @returns {Promise} Company search results + * @description This endpoint searches for companies based on various parameters. + */ + async searchCompanies({ + $, query, filters, limit, page, ...opts + }) { + return this._makeRequest({ + $, + path: "/reveal/search", + method: "POST", + data: { + query, + filters, + limit, + page, + ...opts, + }, + }); + }, + /** + * Get domain suggestions based on a specific query + * @param {string} opts.query - The query to search for domain suggestions + * @returns {Promise} Domain suggestions + * @description This endpoint retrieves domain suggestions based on a specific query. + */ + async domainSuggestions({ + $, query, ...opts + }) { + return this._makeRequest({ + $, + path: "/domain-suggestions", + params: { + query, + ...opts, + }, + }); + }, + /** + * Get usage statistics for the authenticated user + * @returns {Promise} Usage statistics + * @description This endpoint retrieves usage statistics for the authenticated user. + */ + async getUsage({ + $, ...opts + }) { + return this._makeRequest({ + $, + path: "/usage", + params: { + ...opts, + }, + }); + }, + /** + * Get logs for the authenticated user + * @param {string} opts.limit - The maximum number of logs to retrieve + * @param {string} opts.page - The page number for pagination + * @returns {Promise} Logs information + * @description This endpoint retrieves logs for the authenticated user. + */ + async getLogs({ + $, limit, page, ...opts + }) { + return this._makeRequest({ + $, + path: "/logs", + params: { + limit, + page, + ...opts, + }, + }); }, }, };