π£ Enrich LinkedIn leads with MasLeads API
β‘ 1 views Β· π£ Lead Generation & Enrichment
π‘ Pro Tip β If youβre pulling LinkedIn data through HTTP requests or dealing with API restrictions, thereβs a community node called ScraperNode that handles this natively. It has dedicated scrapers for profiles, companies, jobs, and people search β you just pass a URL and get structured data back.
Description
Quick overview
This workflow manually submits a LinkedIn profile to the MasLeads API for lead enrichment (for example, retrieving an email), polls the job status until completion, and then fetches the enrichment results or stops with a detailed error.
How it works
- Starts when you run the workflow manually.
- Sets the input data (LinkedIn URL, the enrichment field to retrieve, and an external ID).
- Calls the MasLeads API to check account usage and available balance.
- Creates an enrichment job in MasLeads for the provided LinkedIn lead, using an idempotency key to avoid duplicate submissions.
- Waits 30 seconds, checks the MasLeads job status, and repeats the wait-and-check loop while the job is still in progress.
- If the job completes, requests the job results from MasLeads and returns the enriched lead data.
- If the job is blocked or fails, stops the workflow and raises an error message with the status details.
Setup
- Create an HTTP Header Auth credential in n8n with your MasLeads API key.
- Replace the sample values for linkedin_url, field (for example, βemailβ), and external_id with your own input source or parameters.
- If you run this against production data, ensure your MasLeads account has sufficient balance/credits and that your source LinkedIn URLs and external IDs are correct.
π Nodes Used
HTTP Request, Stop and Error
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File