n8n-nodes-datalegion, and it can run as a regular workflow step or as a tool for n8n’s AI Agent.
The node is not in n8n’s nodes panel yet. It is in n8n’s review, and this page describes it ahead of launch. On a self-hosted instance you can install it by name now, as described under Install. To talk about access, email support@datalegion.ai.
Prerequisites
- An n8n instance, on n8n Cloud or self-hosted
- A Data Legion API key, from API Keys in the dashboard
Install
On n8n Cloud and self-hosted n8n, open the nodes panel (press + or N), search for Data Legion, pick it under More from the community, and select Install. The instance owner or an admin installs it once; every member can then use it. On a self-hosted instance you can also install it by name: Settings > Community nodes > Install, then entern8n-nodes-datalegion.
Credentials
Add a Data Legion API credential and paste your API key. n8n checks the key againstGET /credits, which is free, and shows Connection tested successfully when it works.
To try a workflow without spending credits, turn on Sandbox Mode in the credential (node 0.2.0+). Enrich then returns sample records with every field a real record has, and uses no credits. Turn it off for real lookups. If your API key is limited to certain endpoints, add /sandbox/person/enrich and /sandbox/company/enrich to it.
Operations
Enrich
Enrich looks up one record per input item. Add the identifiers you have under Identifiers; expressions work, so you can map fields from an earlier step.
A domain matches a company more reliably than a name. A birth date can be a full date, a year and month, or a year (
1985-03-15, 1985-03 or 1985). Under Options:
- Minimum Match Confidence drops matches below
high,moderate, orlowconfidence. - Required Fields takes comma-separated fields a match must have, such as
work_emailorphones.type:mobilefor a person anddomain,socials,type:publicorsocials.network:linkedinfor a company. A match without them counts as a no-match. - Industry (company only) narrows a match on company name, for example
software development. It isn’t a lookup on its own.
Output
Every input item produces one output item, so a list keeps every row:matched: true and match_metadata. When nothing matches, the item is { "matched": false }. Route the two with an If node on matched.
Clean, Hash, and Validate
- Clean Data normalizes emails, phone numbers, names, profile URLs, domains, and the other fields you add. Set Default Phone Region (for example
US) for numbers without a country code. - Hash Email normalizes an address and returns its SHA-256, SHA-1, and MD5 hashes.
- Validate Data checks contact and company fields and returns errors, warnings, and suggested fixes before you spend credits on enrichment.
Using the Node as an AI Agent Tool
Connect the Data Legion node to an AI Agent node’s Tool input. Choose the resource and operation, add the identifier the agent should fill, and select Let the model define this parameter on it. The agent then decides when to call the tool and with which value. For example, asked “What industry is hubspot.com in?”, the agent calls Company Enrich withhubspot.com and answers from the record.
To give an assistant the whole Data Legion toolset outside n8n, use the MCP Server.
Errors and Rate Limits
The node shows the API’s own error message. Running out of credits (402) or calling an endpoint the key isn’t scoped to (403) says so, and an invalid key (401) points you to the credential. Invalid input (400 or 422) points you to the values mapped into the node, and a temporary server error (5xx) suggests running again or turning on Retry On Fail. Enrich and the utilities each allow 100 requests per minute. The node sends one request per item, so a long list can reach the limit and get a 429. Turn on Retry On Fail in the node’s settings, or split the list with Loop Over Items and a Wait node. With On Error set to continue, a failed item comes out as{ "error": "..." } and the rest keep going.
See Rate Limiting for details.
The Node or the Data Legion API
The node covers enrichment and the free utilities inside n8n, one record per item. Search, natural-language discovery, and bulk delivery are on the Data Legion API, which n8n’s HTTP Request node can call with the same API key in anAPI-Key header.