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.