Adds the people who engaged with your posts to HubSpot, only once a verified work email is found for them, and never twice.
Uses
Dropcontact
HubSpotPhantomBuster
Turn people who engage with your posts into CRM contacts
engagementPhantomId to blank.Set engagementPhantomId to blank.maxPeoplePerRun to 25.Set maxPeoplePerRun to 25.engagementPhantomId. Save it as export.Get results for Phantom engagementPhantomId. Save it as export.engagers to export.rows.Set engagers to export.rows.considered to 0.Set considered to 0.addedCount to 0.Set addedCount to 0.engager in engagers:For each engager in engagers:considered multiplied by 1 is greater than or equal to maxPeoplePerRun…If considered multiplied by 1 is greater than or equal to maxPeoplePerRun…Yes
No
No steps
considered.Add 1 to considered.engager.firstName and save it as firstName.Trim engager.firstName and save it as firstName.firstName is nullIf firstName is nullYes
firstName to blank.Change firstName to blank.No
No steps
engager.lastName and save it as lastName.Trim engager.lastName and save it as lastName.lastName is nullIf lastName is nullYes
lastName to blank.Change lastName to blank.No
No steps
engager.companyName and save it as companyName.Trim engager.companyName and save it as companyName.companyName is nullIf companyName is nullYes
companyName to blank.Change companyName to blank.No
No steps
engager.profileUrl and save it as profileUrl.Trim engager.profileUrl and save it as profileUrl.profileUrl is nullIf profileUrl is nullYes
profileUrl to blank.Change profileUrl to blank.No
No steps
firstName lastName and save it as personLabel.Trim firstName lastName and save it as personLabel.personLabel is emptyIf personLabel is emptyYes
Skipped an exported row that carried no name, so there was nobody to look up..Show in the output: Skipped an exported row that carried no name, so there was nobody to look up..No
No steps
verifiedEmails to an empty list.Set verifiedEmails to an empty list.enrichErrorIf a step below fails, save the error as enrichErrorTry
firstName. Save it as enrichment.Enrich contact firstName. Save it as enrichment.verifiedEmails to enrichment.contact.email.Change verifiedEmails to enrichment.contact.email.On error
personLabel plus : enrichError.message.Show in the output: Could not check for a verified work email for personLabel plus : enrichError.message.workEmail to blank.Set workEmail to blank.emailQuality to blank.Set emailQuality to blank.candidate in verifiedEmails:For each candidate in verifiedEmails:candidate.email and save it as workEmail.Trim candidate.email and save it as workEmail.candidate.qualification and save it as emailQuality.Trim candidate.qualification and save it as emailQuality.workEmail is nullIf workEmail is nullYes
workEmail to blank.Change workEmail to blank.No
No steps
emailQuality is not nominative@pro or workEmail is empty or workEmail…If emailQuality is not nominative@pro or workEmail is empty or workEmail…Yes
personLabel - nothing was added to HubSpot. An address is only used when the enrichment tool reports it as that person's own work address.Show in the output: No verified work address came back for personLabel - nothing was added to HubSpot. An address is only used when the enrichment tool reports it as that person's own work address.No
No steps
existingContactId to blank.Set existingContactId to blank.crmDecision to skip.Set crmDecision to skip.lookupErrorIf a step below fails, save the error as lookupErrorTry
workEmail. Save it as existingContact.Find the contact workEmail. Save it as existingContact.existingContact.id and save it as existingContactId.Trim existingContact.id and save it as existingContactId.On error
lookupError.message contains No contact found (ignoring case)If lookupError.message contains No contact found (ignoring case)Yes
crmDecision to create.Change crmDecision to create.No
workEmail plus - leaving them alone rather than risking a duplicate: lookupError.message.Show in the output: Could not check HubSpot for workEmail plus - leaving them alone rather than risking a duplicate: lookupError.message.existingContactId is nullIf existingContactId is nullYes
existingContactId to blank.Change existingContactId to blank.No
No steps
existingContactId isn't emptyIf existingContactId isn't emptyYes
workEmail is already in HubSpot as contact existingContactId - the existing record was left untouched.Show in the output: workEmail is already in HubSpot as contact existingContactId - the existing record was left untouched.No
No steps
crmDecision is not createIf crmDecision is not createYes
workEmail alone: HubSpot did not confirm they are absent from the CRM, so adding them could have created a duplicate.Show in the output: Left workEmail alone: HubSpot did not confirm they are absent from the CRM, so adding them could have created a duplicate.No
No steps
newContactId to blank.Set newContactId to blank.createFailure to blank.Set createFailure to blank.createErrorIf a step below fails, save the error as createErrorTry
workEmail. Save it as createdContact.Create the contact workEmail. Save it as createdContact.createdContact.id and save it as newContactId.Trim createdContact.id and save it as newContactId.On error
createError.message and save it as createFailure.Trim createError.message and save it as createFailure.newContactId is nullIf newContactId is nullYes
newContactId to blank.Change newContactId to blank.No
No steps
createFailure isn't emptyIf createFailure isn't emptyYes
workEmail to HubSpot: createFailure.Show in the output: Could not add workEmail to HubSpot: createFailure.Else if @newContactId isn't empty
addedCount.Add 1 to addedCount.personLabel (workEmail) to HubSpot as contact newContactId.Show in the output: Added personLabel (workEmail) to HubSpot as contact newContactId.Otherwise
workEmail but returned no contact id, so this run cannot confirm the record was created. Check HubSpot before running it again.Show in the output: HubSpot accepted workEmail but returned no contact id, so this run cannot confirm the record was created. Check HubSpot before running it again.considered as text plus people who engaged with your posts and added addedCount as text new HubSpot contacts.Show in the output: Looked at considered as text plus people who engaged with your posts and added addedCount as text new HubSpot contacts.