What it does
- Listens for new contacts in HubSpot and reacts the moment one is created.
- Runs your LinkedIn profile scraper in PhantomBuster and waits for the result in a single step.
- Writes the fresh job title, company, location, headline, skills count, and follower count back onto the contact in HubSpot.
- Quietly skips any contact that does not have a LinkedIn URL set, so nothing breaks when the field is empty.
The prompt
Paste it into a new chat in General Input, and a specialist builds it with you.
Build a code workflow that auto-enriches every new HubSpot contact with fresh LinkedIn profile data using PhantomBuster.
Trigger: HubSpot webhook on the contact.creation event. The webhook payload includes the new contact ID.
Steps, in order:
1. Read the new contact from HubSpot using the contact ID from the webhook payload. Fetch the standard LinkedIn URL property (and any custom LinkedIn URL property the user names). If no LinkedIn URL is present, log a 'skipped: no LinkedIn URL' message and exit cleanly. Do not error.
2. Launch a pre-configured LinkedIn Profile Scraper Phantom in PhantomBuster using the Launch Agent with Output (v1) operation. Use blocking mode (output=result-object) so the single call returns the structured scrape result, with the agent ID pulled from a workflow input. Pass the contact's LinkedIn URL as the profileUrls argument (JSON-stringified, as the v1 launch endpoint requires).
3. Parse the structured profile data returned by PhantomBuster. Extract: current job title, current company name, location, headline, skills count, and follower count. Be defensive about missing fields (the LinkedIn scraper does not always return every field) and substitute null when something is absent.
4. Update the HubSpot contact using the Update Contact operation, keyed by the original contact ID from the webhook. Map the parsed fields to HubSpot contact properties. Default the mapping to: jobtitle, company, city/state (split from location), and a custom property each for headline, linkedin_skills_count, and linkedin_follower_count. Make the property mapping easy for the user to tweak in workflow inputs.
This is a deterministic pipeline with one fixed path: webhook in, optional skip, one blocking PhantomBuster call, one HubSpot update. No branching judgment, no LLM reasoning needed.
Make sure the workflow exposes these inputs: the PhantomBuster LinkedIn scraper agent ID, the HubSpot LinkedIn URL property name (default 'linkedin_url' or the standard 'hs_linkedin_url'), and the custom HubSpot property names that should receive headline, skills count, and follower count.
What you'll need
- A HubSpot account where you can add a new contact and a few custom contact properties.
- A PhantomBuster workspace with a LinkedIn Profile Scraper Phantom already set up and connected to your LinkedIn session.
- A LinkedIn URL field on your HubSpot contact record (the standard one or a custom property).
Make it yours
- Pick which HubSpot properties get the scraped fields written into them, including any custom fields you already use.
- Choose a different Phantom (for example a company page scraper) if you want to enrich based on a company URL instead of a personal profile.
- Add a simple filter so only certain contacts get enriched, such as new contacts in a specific lifecycle stage or list.