
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@memberjunction/actions-apollo
Advanced tools
Action classes that wrap the Apollo.io data enrichment API for contacts and accounts
Apollo.io data enrichment action classes for MemberJunction that enable automated enrichment of contact and account records using the Apollo.io API.
This package provides two primary action classes that integrate with Apollo.io's data enrichment services:
These actions are designed to work within the MemberJunction framework and can be configured through action parameters to map Apollo.io data to your custom entity fields.
npm install @memberjunction/actions-apollo
APOLLO_API_KEY)APOLLO_API_KEY=your_apollo_api_key_here
The package uses the following configuration values (defined in config.ts):
ApolloAPIEndpoint: 'https://api.apollo.io/v1' - Apollo.io API base URLEmailSourceName: 'Apollo.io' - Source name for enriched emailsGroupSize: 10 - Maximum records per API batch requestConcurrentGroups: 1 - Number of concurrent API request groupsMaxPeopleToEnrichPerOrg: 500 - Maximum contacts to enrich per organizationApolloAPIKey: Read from environment variable APOLLO_API_KEYThis action enriches account/organization records by looking up company information using domain names.
The action accepts the following parameters as JSON strings:
Required:
AccountEntityFieldNameJSON - Maps account entity fieldsOptional:
AccountTechnologyEntityFieldNameJSON - Maps account technology relationship fieldsTechnologyCategoryEntityFieldNameJSON - Maps technology category fieldsContactEntityFieldNameJSON - Maps contact entity fieldsContactEducationHistoryEntityFieldNameJSON - Maps contact education history fieldsAccountEntityFieldNameJSON Structure:
{
EntityName: string; // Target entity name (e.g., "Accounts")
DomainParamName: string; // Field containing company domain
AccountIDName: string; // Primary key field name
EnrichedAtField: string; // Timestamp field for tracking enrichment
ExtraFilter?: string; // SQL filter for selecting records to process
// Optional mapping fields
AddressFieldName?: string; // Street address field
CityFieldNameName?: string; // City field
StateProvinceFieldName?: string; // State/province field
PostalCodeFieldName?: string; // Postal code field
DescriptionFieldName?: string; // Company description field
PhoneNumberFieldName?: string; // Phone number field
CountryFieldName?: string; // Country field
LinkedInFieldName?: string; // LinkedIn URL field
LogoURLFieldName?: string; // Company logo URL field
FacebookFieldName?: string; // Facebook URL field
TwitterFieldName?: string; // Twitter URL field
}
AccountTechnologyEntityFieldNameJSON Structure:
{
EntityName: string; // Technology relationship entity name
AccountIDFieldName: string; // Foreign key to account
TechnologyIDFieldName: string; // Foreign key to technology
MatchFoundFieldName: string; // Field indicating if match was found
EndedUseAtFieldName: string; // Field for marking end of technology use
}
import { ApolloAccountsEnrichmentAction } from '@memberjunction/actions-apollo';
import { ActionEngine } from '@memberjunction/actions';
// Register the action with the engine
const engine = new ActionEngine();
const action = new ApolloAccountsEnrichmentAction();
// Execute the action
const result = await engine.RunAction({
ActionName: 'Apollo Enrichment - Accounts',
Params: [
{
Name: 'AccountEntityFieldNameJSON',
Value: JSON.stringify({
EntityName: 'Accounts',
DomainParamName: 'Domain',
AccountIDName: 'ID',
EnrichedAtField: 'LastEnrichedAt',
// ... other mappings
})
}
],
ContextUser: currentUser
});
This action enriches contact records by matching on name and email combinations.
The action accepts the following string parameters:
Required:
EntityName - Target entity name containing contactsEmailField - Field name containing email addressesFirstNameField - Field name containing first namesLastNameField - Field name containing last namesAccountNameField - Field name containing account/organization namesEnrichedAtField - Field name for tracking enrichment timestampFilterParam - SQL filter for selecting records to processOptional:
domainParam - Field name containing company domainlinkedinParam - Field name for storing LinkedIn URLsEmploymentHistoryFieldMappings - JSON string with employment history field mappingsEducationHistoryFieldMappings - JSON string with education history field mappingsEmploymentHistoryFieldMappings Structure:
{
EmploymentHistoryEntityName: string; // Employment history entity name
EmploymentHistoryContactIDFieldName: string; // Foreign key to contact
EmploymentHistoryOrganizationFieldName: string; // Organization name field
EmploymentHistoryTitleFieldName: string; // Job title field
}
EducationHistoryFieldMappings Structure:
{
EducationHistoryEntityName: string; // Education history entity name
EducationtHistoryContactIDFieldName: string; // Foreign key to contact
EducationtHistoryInstitutionFieldName: string; // Institution name field
EducationtHistoryDegreeFieldName: string; // Degree field
}
import { ApolloContactsEnrichmentAction } from '@memberjunction/actions-apollo';
const result = await engine.RunAction({
ActionName: 'Apollo Enrichment - Contacts',
Params: [
{ Name: 'EntityName', Value: 'Contacts' },
{ Name: 'EmailField', Value: 'Email' },
{ Name: 'FirstNameField', Value: 'FirstName' },
{ Name: 'LastNameField', Value: 'LastName' },
{ Name: 'AccountNameField', Value: 'AccountName' },
{ Name: 'EnrichedAtField', Value: 'LastEnrichedAt' },
{ Name: 'FilterParam', Value: 'Email IS NOT NULL AND LastEnrichedAt IS NULL' },
{ Name: 'domainParam', Value: 'Domain' },
{ Name: 'linkedinParam', Value: 'LinkedIn' },
{
Name: 'EmploymentHistoryFieldMappings',
Value: JSON.stringify({
EmploymentHistoryEntityName: 'ContactEmploymentHistory',
EmploymentHistoryContactIDFieldName: 'ContactID',
EmploymentHistoryOrganizationFieldName: 'Organization',
EmploymentHistoryTitleFieldName: 'Title'
})
}
],
ContextUser: currentUser
});
The package integrates with the following Apollo.io API endpoints:
/organizations/enrich - Organization enrichment/people/bulk_match - Bulk contact matching/mixed_people/search - People search by domain@memberjunction/core - Core MemberJunction functionality@memberjunction/core-entities - Entity definitions@memberjunction/actions - Action framework@memberjunction/global - Global utilitiesaxios - HTTP client for API requestsBatch Processing: The actions automatically batch records to optimize API usage and respect rate limits.
Field Mapping: Carefully map Apollo.io fields to your entity fields to ensure data consistency.
Filtering: Use the filter parameters to process only records that need enrichment, avoiding unnecessary API calls.
Error Monitoring: Monitor the action logs for failed enrichments and rate limit issues.
Data Quality: The actions include validation for email domains and exclude certain titles to maintain data quality.
APOLLO_API_KEY environment variable is setThe actions use MemberJunction's logging system. Monitor logs for:
This package is part of the MemberJunction open-source project. Contributions are welcome following the project's contribution guidelines.
ISC License - see the MemberJunction project license for details.
FAQs
Action classes that wrap the Apollo.io data enrichment API for contacts and accounts
We found that @memberjunction/actions-apollo demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.