A company brief on a webhook, from n8n
Send a company name to an n8n webhook and get a short brief back as JSON. Three Ahel steps on one item, and how their answers stay apart.
This automation answers GET /webhook/company-brief?name=...&country=EE with a short brief as JSON: register facts, the latest quarter's staff and turnover, the management board and the contacts filed with the register. A name the register does not know gets a 404.
Download the workflow fileJSON and import it in n8n under Workflows, Import from File. It needs version 0.2.0 of the Ahel node, on npm since 27 November 2026: Start here has the install steps.
Who it is for
You are building a product, and one screen needs to know who a company is: a CRM sidebar, a form that checks a sign-up, an AI agent that wants facts before it writes. Your product sends one GET, n8n does the lookups, and the answer comes back in one piece.
The steps

- Webhook: company-brief. Method GET, path
company-brief, and Respond set to Using 'Respond to Webhook' Node, so the answer can come from the end of the path. - Run now and Sample question. For testing in the editor. Type a company name into Sample question first.
- Question (Edit Fields) takes
namefrom the query, andcountrytoo, upper case,EEwhen it is missing. - Ahel: find in register. Operation Check a European Company, with the name and the country. Max Cost per Run 0.02.
- Found? (If) checks
found. A miss goes to Answer: not found, which answers status 404 witherror,message,asked_forandcountry. - Ahel: register trace. Run Action with
companies.traceandcompany_keyset to the country and the registry number, as inEE:followed by the number. Max Results 1, Max Cost per Run 0.01, Timeout 90 seconds, and Put Answer Undertrace. - Ahel: tax figures. Run Action with
companies.tax.quarterly, the country and the registry number. Max Results 1, Max Cost per Run 0.01, and Put Answer Undertax. Its On Error setting is Continue, so a company without tax figures still gets a brief. - Write the brief (Code) turns the three answers into one item.
- Answer with the brief (Respond to Webhook) answers with that item.
Three answers on one item
All three Ahel steps work on the same item, and their answers share field names. The register search and the tax figures both answer name, country, registry_number, found, cost_usd and run_id. Without anything else, the tax step would write its fields over the register's, and you would lose what the first step said and what it cost.
Put Answer Under stops that. With it, a step's answer goes under one field, with its own cost_usd and run_id. So after step 7 the item holds the register answer on the item itself, the trace under trace, and the tax figures under tax. The brief step reads each part where it is (shortened, with our comments):
const j = $json; // the register search, on the item
const trace = j.trace || {}; // companies.trace, under "trace"
const tax = j.tax || {}; // companies.tax.quarterly, under "tax"
const cost = (j.cost_usd || 0) + (trace.cost_usd || 0) + (tax.cost_usd || 0);What our run returned
We asked it three times on 26 November 2026, once from the editor and twice through the webhook. Each time the answer was one JSON object with eight fields:
asked_forandbrief, the brief as a few lines of textcompany:name,registry_code,country,legal_form,status,founded,citylatest_quarter:quarter,employees,turnover_eur,labour_taxes_eur,activitymanagement:name,roleandsincefor each person, 8 people on our run, which is as many as the code keepscontacts,sourcesandcost_usd
We also asked once for a name the register does not know. That answered 404, as it should.
What it cost and how long it took
On our run on 26 November 2026, one question cost $0.006 and took 4.5 seconds: $0.004 for the register search, $0.002 for the tax figures, and nothing for the trace. On our run on 26 November 2026, the name the register did not know cost nothing, because a search that finds nothing is not charged.
How to call it
Publish the automation in n8n to make the production URL live. Then, from your product:
curl -sG "$N8N_URL/webhook/company-brief" \
--data-urlencode "name=$COMPANY_NAME" \
--data-urlencode "country=EE"How to change it
- Another country. Pass
country=FI,GBor another country the register search covers. The register facts still come back. The tax figures are Estonian only, solatest_quarterstays empty. - Other wording or fields. Write the brief is plain JavaScript. The register names roles and contact kinds in Estonian, and the code translates the ones it knows.
- Another caller. Anything that can send a GET works: a form, a button in your CRM, a chat bot, an AI agent.
What to watch out for
- The webhook has no authentication in the file. Its Authentication is None, and every question that finds a company is paid for. Before the URL leaves your machine, set Header Auth on the webhook, and give the Ahel credential a key with a daily cap.
- A name is not an identity. The register search answers one match, with
match_confidenceandmatch_quality. If your product sends short or common names, check those before you trust the brief. - One row each, so no results array. Each step asks for one row, so its fields sit on the item or under its field. When a step returns two or more rows, they arrive together under
resultson one item, and you need Split Out. The node does not page either: one run returns at most 100 rows. - 30 requests a minute. One question is three Ahel runs. The node spaces its requests to stay under a workspace's 30 a minute, and waits and tries again when told to slow down, so a burst of questions queues. Give your caller a timeout that allows for it.
Every action used here, with its inputs, is in the Catalog. Open the Catalog to build your own brief.